SVG icons: restore attributes required for accessibility #9269
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] Bug
An existing feature does not function as intended
[Type] Regression
Related to a regression in the latest release
#8916 changed many SVG icons, hardcoding them instead of using the
Dashicon
component. Thus, all the new icons now miss a few HTML attributes that are required for accessibility:role="img" aria-hidden="true"
to ensure they're hidden from assistive technologiesfocusable="false"
to work around an IE 11 bug where all the SVG icons within focusable elements are considered by IE focusable themselves, so there's the need to press the Tab key twice when navigating using the keyboardI'm not sure what are the plans for all these hardcoded SVG icons. For sure, using the
Dashicon
component was ideal to standardize all the default props and rendered HTML attributes. If these new icons are going to stay hardcoded across the codebase (which I see less ideal), then there's the need to add to all of them the missing attributes.The text was updated successfully, but these errors were encountered: