-
Notifications
You must be signed in to change notification settings - Fork 4k
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
SVGs are focusable in IE #15330
Comments
Accessibility feedback is clear: it's a known issue that all the SVG icons need a |
As alternative solution arrows might be added via css as background. This can be achieved by overriding: https://github.com/airbnb/react-dates#overriding-styles |
I have opened a PR in |
@nicolad @karlgroves does there need to be also the |
@backwardok AFAIK aria-hidden removes element altogether from accessibility tree, not just make it unfocusable. If IE would not have any quirks I think there will be no need for this kind of double guarding. |
@nicolad from the description in the issue, this is about keyboard tab behavior, which is unrelated to @karlgroves is there an issue with screen readers reading out svgs that have no textual content that's prompting the need to also have |
That's possible, but the icons rendered in the Gutenberg calendar don't have
@backwardok SVG icons in Gutenberg are purely decorative and the necessary information is provided via the control (generally a button) that wraps the icon. To make sure the SVG icons are actually perceived as images and also ignored by all the various browser/screen reader combos, we're using |
@afercia what version of react-dates do you have? I know that in previous versions, the focusable attributes were getting stripped out in optimization, so we removed that step (react-dates/react-dates#1350) in 18.0.2. Using |
Version:
Yep, I'm pretty familiar with this 🙂 Based on testing and research (admittedly ran a while ago) not all browsers expose a native role for SVGs. Using |
Since you're using a version of react-dates that stripped out the |
Seems like upgrading to version 18.0.2 of react-dates could fix this issue. According to their changelog the breaking changes shouldn't affect us. Shall we give it a go? |
Updated and tested here: #21256 (comment) |
Note: the SVG icons that need to be tested are the one within the date-picker (the "calendar") as shown in the screenshot in a previous comment. |
Good observation. |
Adding comment here as well as that PR, but |
IE11 support is being dropped, context:
I'm closing this issue as it's not something we'll be investing in. |
SVGs are focusable in IE
Issue description
The next-month and previous-month buttons within the datepicker contain
SVG elements, which are focusable in IE11 because of an anomaly in how
IE handles SVG.
This issue also occurs with the "Previous" and "Next" post
navigation links on published pages.
This causes additional tab stops for keyboard users. These Tab stops are
also not described for assistive technologies, because they have no
accessible names.
The SVG's role ("graphic" or "diagram") may be exposed to screen
reader users, but when they are used as decorative icons they should not
be announced at all.
Issue Code
Remediation Guidance
Add
focusable="false"
andaria-hidden=true
to the SVGelements, so that they're not focusable nor announced by assistive
technologies.
Recommended Code
Note: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-11 in Tenon's report
The text was updated successfully, but these errors were encountered: