Problem/Motivation
In reviewing #3035331-14: Improve keyboard focus behaviour of vertical tabs in MediaLibraryWidget, @rainbreaw had this to say:
My Media field allows for Audio, Image, and Video. When I use the space key on the Add Media button in the field on a clean form, it loads the modal, with the Audio tab selected.
The screen reader tells me which tab is selected, and the visuals clearly indicate which tab is focused.
Pressing the tab key gets me to the next vertical tab, and tells me which one it is ("link, Video") and so on.
The thing that I wish, however, is that once I get into the select media button, that it would tell me what type of media I'm selecting. I have to remember that I was on Audio first, and then tabbed through the image and video options without selecting them, if I want to be sure of what type of content I'm adding.
After a bit of discussion, we agreed to open a follow-up (i.e., this issue) for that last bit.
Proposed resolution
The checkboxes that select media items in the library should announce the type of media they are selecting to screen readers and other assistive tech.
Remaining tasks
Figure out the best way to do this, then make it happen.
User interface changes
TBD, but the media library will be a little clearer to assistive tech/screen readers.
API changes
None anticipated.
Data model changes
None anticipated.
Release notes snippet
TBD
Comments
Comment #3
xjmAccessibility issues generally aren't features; they're bugs or at least tasks. Calling it a major task for now since it sounds like this could make the form less confusing for non-sighted users, but if it's more of a "would be nice but not a big deal" we can downgrade it back to normal/could-have.
Also adding issue credit for @rainbreaw who identified this issue.
Comment #4
andrewmacpherson commentedI'm not entirely sure I understand what's proposed.
The problem section here talks about the "Select media button" (Rain's old comment from another issue), but the proposed solution talks about the checkboxes. The issue summary needs clarification.
Based on Rain's comment, at first I thought it meant the footer button which completes the dialog. That button is called "Insert selected", so I guess that's not the one. FWIW, I don't think this button should change.
So if it's the checkboxes...
Early designs for the media library grid view included the bundle name as a little badge, but it was axed in the name of keeping the grid clutter free. It's one of the reasons we kept the table listing on admin/content/media-table, which does include the bundle as a column. In the media library dialog, neither the grid nor the table view show the bundle name, but there's a mandatory filter (the "tabs") so it only ever shows items of one bundle.
So is this about including the bundle name in the checkbox name for every media item?
I'm not sure about this. It arguably adds clarity, but also adds verbosity. Whichever it is, we're getting into very fine detail here. (I'm not even sure we need the word "select" in the checkbox name, because that's implied by the checkbox role and appearance. I think we kept that for consistency with some other listing or operation, but I forget which.)
It would be a departure from patterns elsewhere. The part about having to remember the filter choice you made is true everywhere we have filters. We don't keep repeating the entity bundle all the way down the list.
<title>. That's probably a failure of WCAG page title, so I'll file an issue for that.Comment #13
chris matthews commentedBased on @andrewmacpherson's comments in #4 from 4 years ago I think the status for this issue should at least be changed to Postponed until Andrew's feedback is addressed.
Comment #14
anicotoHi my name is Ana (@anilu) and we are at Drupalcon Atlanta mentored contribution workshop and are working in documentation for Media core module
Comment #15
smustgrave commentedwanted to bump 1 more time.