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

Remove aria-expanded from radios with conditional content when JS is enabled #2823

Closed
wants to merge 1 commit into from
Closed

Conversation

ttbarnes
Copy link
Contributor

@ttbarnes ttbarnes commented Sep 2, 2022

This PR removes the aria-expanded attribute from radios with conditional content.

Without this change, accessibility tools such as AXE and Lighthouse flag a critical issue:

ARIA attribute is not allowed: aria-expanded="false"

Currently, aria-expanded is not supported for radio buttons. This may change: w3c/aria#1404

@querkmachine
Copy link
Member

Hi @ttbarnes, thanks for the contribution.

We currently don't intend to remove aria-expanded from conditional reveals as—despite being an invalid use under the the current ARIA specification—we've found that some screen readers do expose this information to users, and we haven't noticed any detrimental affects from the attributes being present.

In this instance, we believe the benefit to screen reader users outweighs being invalid according to the spec and, as you note, the spec may change in future to accommodate how we're using it.

Further information about our research and testing is in #979. The validation error in Axe is also listed as a known issue.

@ttbarnes
Copy link
Contributor Author

ttbarnes commented Sep 2, 2022

Thank you @querkmachine - makes sense, closing this PR 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants