Problem/Motivation
This is a follow up of #2981044: Unify the grid/table views of the media library. From comment 45.2:
The tabbing order of the view is messed up. The grid and table buttons come before the name filter in the DOM, but visually they come after the apply-filters button This will confound sighted keyboard users. Make the tabbing order match the visual reading order.
Having the tab order match the visual order is A-level WCAG criteria, but we cannot actually fix this until Media Library is stable and can therefore add an accessible template to Seven. This issue should fix the DOM order and be commited asap after the media library is marked stable.
Proposed resolution
Add a views template to Seven for the Media library to fix the DOM order.
Remaining tasks
Create a patch and have it ready to be committed when the media library is marked stable.
User interface changes
No visual changes, just the DOM order should change.
API changes
None.
Data model changes
None.
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | interdiff-3035994-18-23.txt | 684 bytes | jeroent |
| #23 | 3035994-23.patch | 4.24 KB | jeroent |
| #21 | 3035994-21.txt | 1.28 KB | phenaproxima |
| #18 | 3035994-18.patch | 4.23 KB | bnjmnm |
| #18 | interdiff_11-18.txt | 1.67 KB | bnjmnm |
Comments
Comment #2
seanbComment #3
andrewmacpherson commentedWhat's the correct tag to mark this as a minor release blocker?
Comment #4
phenaproximaI'm not sure, but I'm marking this as a triaged critical per the discussion summarized in #2981044-64: Unify the grid/table views of the media library. Once this is unblocked, we should escalate its priority to critical.
Comment #5
seanbPatch is attached to change to order of the views header and the exposed filters.
Comment #6
steinmb commented#2981044: Unify the grid/table views of the media library is in.
Comment #7
phenaproximaThis is actually postponed on Media Library becoming stable, so it’s not quite time to open this back up yet. :)
Comment #9
mgiffordFixing tagging.
Comment #10
xjmI added this to the scope of #3082690: Mark Media Library as a stable core module. We might end up with this issue marked as a duplicate of that one as they should probably be fixed in the same patch (rather than as a followup) since it's a critical accessibility issue.
Comment #11
bnjmnmAlthough this is technically postponed, this is work that can continue as it can't be committed until media library is stable in #3082690: Mark Media Library as a stable core module but the actual development does not depend on that issue.
This patch adds a test and addresses four @todo's that reference this issue.
Comment #12
wim leersThis looks ready :)
Is the tag still applicable here?
Comment #13
seanbThe solution had been discussed, but as far as I know the patch in this issue has not been shown to the A11Y team. So I think we should still do that and make sure the solution solves the concerns.
Comment #14
andrewmacpherson commentedI've been watching this issue sure enough; it was me who asked for this in one of the UX calls. The "needs accessibility review" tag was appropriate, because we knew this issue could be postponed for many months and the module code could have changed in the meantime.
The solution is correct, and straight-forward enough. Flexbox order is a huge problem when it's used to rearrange interactive elements (or containers with interactive elements). The relevant WCAG success criteria are 1.3.2 Meaningful Sequence (level A) and 2.4.3 Focus Order (level A).
I manually tested patch #11 today, and it's working as intended.
The test in #11 is a bit spurious:
That's not actually what we're interested in. By itself, the DOM order doesn't matter here. What matters is that the DOM order, the tabbing order, and the visual presentation order are in harmony. From Understanding 2.4.3 Focus Order:
The test in #11 doesn't really protect that. Later changes could disrupt the tabbing order with tabindex attributes, or disrupt the visual focus order with flexbox order. Either of these would be bad for SC 2.4.3 Focus Order, but the test here would still pass. Unless we can get a test which looks at the the whole combination of DOM order, tabbing order, and visual order, then I don't think it's worth having a test at all.
Comment #15
wim leersGreat! That means accessibility review is now completed, and this is only blocked on A) the module becoming stable, B) the test being improved based on #14. Consider this virtually marked :)
Comment #16
xjmCool -- let's update the tests on this now. @phenaproxima suggested keeping this issue rerolled once it's RTBCable, and ready for commit when we mark the module stable.
Comment #17
andrewmacpherson commentedJust to clarify #14 - I don't think this is possible to test.
Comment #18
bnjmnm#17 Makes sense, here's the patch without a test.
Comment #19
wim leersSo that means this is virtually RTBC, but it cannot be committed until the Media Library module is marked stable. Marking to avoid us continuing to look at this until that time.
Comment #20
wim leersTo clarify: this is blocked on #3082690: Mark Media Library as a stable core module becoming unblocked 🤓
Comment #21
phenaproximaAt @lauriii's request, posting a diff between Classy's views-view.html.twig and the variant we're adding to Seven in this patch.
Comment #22
lauriiiThanks for the diff @phenaproxima!
This looks unrelated change. Let's revert this. Other than that, this looks great!
Comment #23
jeroentMade changes as suggested by @lauriii in #22.
Comment #24
phenaproximaThanks, @JeroenT!
@lauriii, @bnjmnm, and I reviewed this issue in Zoom today. Except for the indentation issue (now fixed), Lauri said this is committable. So consider that a "virtual" commit, blocked on making Media Library stable. 🎉
Beyond any needed rerolls, there is no need for any further work on this patch.
Comment #25
phenaproximaMarking this issue fixed, because it has been "virtually committed" by @lauriii and rolled into the big patch being built in #3082690: Mark Media Library as a stable core module. No further work should take place here; I'll transfer credit into the other issue.