Block mover icons miss reqiured attributes for accessibility #5247
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
The block mover icons were refactored in #4631 and now a
svg
icon is passed directly as a prop.The problem of passing icons this way is they lack the attributes
aria-hidden="true" role="img" focusable="false"
All the Dashicons use these attributes by default. Also icons passed directly should use them.
One of the consequences is that without
focusable="false"
the icons are focusable in Internet Explorer so there's the need to tab twice when navigating with the keyboard.Also, icons should be hidden from assistive technologies so they also use
aria-hidden="true" role="img"
.I'd suggest to consider a way to check for the presence of these attributes when passing icons directly.
The text was updated successfully, but these errors were encountered: