-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use aria-hidden="true" for arrow icons in sidebar #1387
Comments
I'm going to re-open this (it was reverted in #1537) as it still happens with Firefox + NVDA (nothing is announced) and JAWS re-announces the whole thing including the component label, while it should just announce the state change "expanded" or "collapsed". |
Does it help if we just rotate the SVG with CSS? Not actually change it at all. |
No it wouldn't help because the browser repaints the element anyways. |
I'm reducing the scope of this issue to the scenario highlighted above: the sidebar icons should be hidden from assistive technology using |
Note: the icons have been changed in f9e82d0 I guess it doesn't make a difference and the Firefox+NVDA issue is still there (becaus there's still a re-rendering). Testing it again would be nice. |
I tested with WordPress 4.9.8 and Gutenberg 4.1.0-rc.2 using Firefox 62.0.3 on macOS 10.13.6 and found that the Settings > Document > Featured Image > svg icon to toggle the panel open/closed does have the @afercia I also tried testing with VoiceOver on my Mac to see what would get read aloud when tabbing through the document settings component panels, and I found that it did said "text" for the panel heading and the icon was ignored. (2m16s) It's quite possible I did it wrong though! To the point of this specific issue being about icons, I believe that the |
@designsimply thanks for testing! However, the proposal here is to add a span element with aria-hidden=true around the SVG icon. The bug to solve is Firefox + NVDA don't announce the |
Note that a fix (nvaccess/nvda#8869) just landed in NVDA alpha builds which
should fix issues related to announcements failing due to re-framing. I
haven't tested this specific case, though. Please note that I'm not the
author of that fix; I just thought this info might be helpful.
|
@jcsteh thanks for chiming in and for the update! |
@designsimply can you please take a look and see if this has addressed this issue, please? Thank you! |
@catehstn @designsimply I'm not fully convinced testing against a software that is in alpha state is the best path forward. I'd recommend to wait the NVDA fix gets actually released. I see it's in the 2018.4 milestone which, at the time of writing this, is scheduled for November 22. Thank you. |
Firefox and NVDA suffer from a bug where the value change of an
aria-expanded
attribute doesn't get announced when the element it is applied to gets "repainted". This was first noticed for CSS generated icons but seems it applies also to the SVG icons in the sidebar meta boxes because they're updated on the fly when a meta box opens:Technical details on:
nvaccess/nvda#5247
Trying to summarize the feedback from @jcsteh :
When a meta box is closed, it uses a
dashicons-arrow-right
that is then updated on the fly to a
dashicons-arrow-down
when the meta box opens:This triggers the bug and the
aria-expanded
state change is not announced. We've fixed this in WordPress core in a few places, simply wrapping the icon in a span with anaria-hidden="true"
attribute. I'd propose to use the same fix in Gutenberg, on a case by case basis where icons are updated on the fly and there's some ARIA state change screen readers should announce.The text was updated successfully, but these errors were encountered: