Skip to content
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

[accessibility] Remove aria labels from non interactive blocks like spacer block. #43378

Closed
dennisheiden opened this issue Aug 18, 2022 · 2 comments
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

Comments

@dennisheiden
Copy link

dennisheiden commented Aug 18, 2022

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:
image

Frontend output:
image

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

@skorasaurus skorasaurus added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Aug 18, 2022
@skorasaurus
Copy link
Member

Hi,

Thanks for reporting and your concern about accessibility.

The spacer block uses the aria-hidden attribute, not aria-label.

That said, the spacer block probably does not need the aria-hidden label, it is superfluous and there is an issue to track that at #30157 (comment)

@skorasaurus skorasaurus added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Aug 18, 2022
@dennisheiden
Copy link
Author

Thank you for your clarification, looks like I was mixing up things but I'm aware of that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants