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

Implement ARIA change: no longer supported attributes (aria-expanded) on role listbox #4433

Open
spectranaut opened this issue Apr 26, 2024 · 1 comment
Labels
feat New feature or enhancement standards Issues in the ARIA standards objects (lib/standards) wai-aria

Comments

@spectranaut
Copy link

spectranaut commented Apr 26, 2024

Product

axe-core

Feature Description

This change will land in the editors draft soon -- dropping support of aria-expanded on role listbox: w3c/aria#1862

This means the following HTML is no longer valid:

<div role="listbox" aria-label="foo" aria-expanded="true">
</div>

I see that non-global, not supported attributes hit the rule for the HTML: <div id="test" aria-expanded="true"></div>, it seems like the same role should be hit in the scenario above:

  Violation of "aria-allowed-attr" with 1 occurrences!
    Ensures an element's role supports its ARIA attributes. Correct invalid elements at:
     - #test
    For details, see: https://dequeuniversity.com/rules/axe/4.9/aria-allowed-attr
@spectranaut spectranaut added feat New feature or enhancement ungroomed Ticket needs a maintainer to prioritize and label labels Apr 26, 2024
@spectranaut spectranaut changed the title Implement ARIA change: no longer supported attributes (aria-haspopup) on role listbox Implement ARIA change: no longer supported attributes (aria-expanded) on role listbox Apr 26, 2024
@WilcoFiers
Copy link
Contributor

Hey @spectranaut. Thanks for raising that. I've left a comment in the PR requesting this be deprecated instead. I'm reluctant to start failing axe-core over this. People have been adding aria-expanded to listboxes for years. It doesn't hurt to have it there. It actually helps a little with validation, since if aria-expanded=true tells us whether the aria-controls IDREF should be visible.

I think if this goes into the spec we could look at making this part of a best practice.

@WilcoFiers WilcoFiers added wai-aria standards Issues in the ARIA standards objects (lib/standards) and removed ungroomed Ticket needs a maintainer to prioritize and label labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or enhancement standards Issues in the ARIA standards objects (lib/standards) wai-aria
Projects
None yet
Development

No branches or pull requests

2 participants