Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
media system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Feb 2019 at 06:11 UTC
Updated:
8 Oct 2019 at 18:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andrewmacpherson commentedPlease remember to add the accessibility tag! Some of these can be fixed by community members who would like to work on accessibility, but that won't happen if it isn't tagged.
Please split this into 2 issues. They can be addressed separately.
Comment #3
andrewmacpherson commentedComment #4
andrewmacpherson commentedSplitting this into 2 issues.
I filed #3035408: Identify purpose of vertical tabs in MediaLibraryWidget dialog for assistive tech users. for "Vertical tabs menu is not presented as navigation".
This one is for "Clicking vertical tabs doesn’t shift the user to the new content, next element becomes the ‘Select media’ button"
Comment #5
andrewmacpherson commentedComment #6
andrewmacpherson commented@seanb - I can't replicate this.
You just say "using VoiceOver" #2988431-12: [Meta] Accessibility plan for Media Library Widget. Can you say which browser and OS you used as well? (I guess you mean macOS, but iOS VoiceOver is quite different in many ways).
Using a keyboard but no assistive technology:
I get the same result using all of these browsers:
In the click handler for the vertical tab links we have:
document.getElementById('media-library-content').focus();My manual testing tallies with this, it's currently behaving as intended.
Whether it's the right behaviour is another matter. I think it might be better to shift focus to the first tabbable control inside
#media-library-content, i.e. the add-files input. We can do this with the:tabbableselector from jQuery.ui.coreI'll do manual testing with some screen readers next.
Comment #7
andrewmacpherson commentedAnother round of manual testing, this time with Win 10 browsers from #7, and JAWS 2018
There are a few unusual announcements, however the keyboard focus tab behaviour is the same as in #6 without JAWS.
I think the Firefox is reading the entire of #media-library-content because that's the element we focus. This will likely be improved by focussing the file input instead as I suggested in #6.
The IE/Chrome/Opera announcements puzzle me. I don't know why they announce the show as table/grid links. I hope this might also be improve by focussing the add-files input instead.
One of the microsoft browsers (didn't note which) announced "entering form" at one point, which is the first meaningful role inside #media-library-content. It didn't do it again. I think I might have accidentally pressed a key to advance to the next form. I'm not so proficient at JAWS as I am at NVDA.
Comment #8
seanbSorry, I have been using MacOs with Google Chrome to test.
Makes sense. I am currently struggling with shifting the focus from the vertical tab to the content. In almost all other issues we are specifically not changing the focus automatically. Can you recommend some more reading about this? I think it would be really great if I could understand this a bit better.
Comment #9
seanbHere is a patch that moves the focus from the
#media-library-contentelement to the first tabbable element inside it as suggested in #6.Comment #10
phenaproximaThis is an incorrect use of assertJsCondition(). I think we're supposed to just pass it the JavaScript string to evaluate, not the evaluation result.
Additionally, I feel like this issue might benefit from a fail patch.
Comment #11
seanbFixed #10. Not really sure what a fail test would prove, we are changing the behavior and this could be viewed as an improvement instead of a bugfix. But, fail patch is attached anyway, just saying :)
Comment #14
rainbreaw commentedI have tested 3035331-11.patch using Mac OS X Safari, VoiceOver, and keyboard tab / space key only, and it is working well.
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.
Comment #15
xjmI talked about this with @phenaproxima and @seanb, and we agreed that we should file a separate followup issue for this part. Thanks @rainbreaw!
Comment #16
rainbreaw commentedI retested what I tested above a few months ago, and think this one is in good shape. Everything is still working in a logical manner when interacting with just the keyboard or just a screen-reader+keyboard.
Comment #17
xjmComment #18
xjmLooks like we still need the followup filed (or linked here if it already exists) and the patch also needs a reroll I think. Thanks!
Comment #19
oknateHere's a reroll.
I dropped this line, as it looks like it's been refactored away.
Comment #21
phenaproximaFiled #3083090: In the media library, announce the type of media being selected to address @rainbreaw's request in #14.
Comment #22
oknateFixing the test. I don't know why, but it looks like the '.active-tab' text changed?
<span class="active-tab visually-hidden"> (selected)</span>The test was looking for
$this->assertTrue($menu->hasLink('Type One (active tab)'));. Which doesn't happen now.I tried
$this->assertTrue($menu->hasLink('Type One (selected)'));and that didn't work, but this worked:I don't see any precedence for this in core. Is this good enough? Any suggestions on how to better check active tab?
Comment #23
oknateThis replaces #22 with something closer to the original patch. The reason " (active tab" wasn't working was due to changes here:
#3035408: Identify purpose of vertical tabs in MediaLibraryWidget dialog for assistive tech users.
Comment #24
phenaproximaYup, this is the right reroll, and the updated test coverage matches the changes that have occurred in core. :) This is ready to go!
Removing the "needs accessibility review" tag, since that has long since been completed and, indeed, re-verified.
Comment #25
webchickIssue credit.
Comment #27
webchickAwesome! Thanks for the fix, as well as the thorough testing here!
Committed and pushed to 8.8.x. Thanks!