[accessibility] Remove aria labels from non interactive blocks like spacer block. #43378
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Status] Duplicate
Used to indicate that a current issue matches an existing one and can be closed
Please have a look into the specification here:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label
"The aria-label attribute defines a string value that labels an interactive element."
and
"Not all elements can be given an accessible name. Neither aria-label nor aria-labelledby should be used with non-interactive elements or inline structural role such as with code, term, or emphasis nor roles whose semantics will not be mapped to the accessibility API, including presentation, none, and hidden. The aria-label attribute is intended for interactive elements only. Use aria-label to ensure an accessible name is provided when none is visible in the DOM for all interactive elements, like links, videos, form controls, landmark roles, and widget roles."
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label
Spacer Block Markup:
Frontend output:
What is your proposed solution?
Remove aria-labels from non-interactive blocks.
Environments:
a) WordPress 6.0.1
b) WordPress 6.0.1 + Gutenberg 13.9
The text was updated successfully, but these errors were encountered: