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

aria-required-children incorrectly fails on aria-hidden elements within a menu #3972

Closed
kensgists opened this issue Mar 31, 2023 · 3 comments

Comments

@kensgists
Copy link

aria-required-children fails when there is a menu with non-menuitem children that are aria-hidden="true"

For example, the following produces a clean menu > menuitem accessibility tree, but axe marks the aria-hidden elements as aria-required-children failures:

<div role="menu">
    <div aria-hidden="true" id="cats">Cats</div>
    <div role="menuitem" aria-describedby="cats">Calico</div>
    <div role="menuitem"  aria-describedby="cats">Domestic Shorthair</div>
    <div role="menuitem"  aria-describedby="cats">Russian Blue</div>
    <div aria-hidden="true" id="dogs">Dogs</div>
    <div role="menuitem" aria-describedby="dogs">Rottweiler</div>
    <div role="menuitem"  aria-describedby="dogs">Schnauzer</div>
    <div role="menuitem"  aria-describedby="dogs>Pit Bull</div>
</div>

Note that giving role="menuitem" to the aria-hidden="true" children does not produce aria-required-children failures; however, it should not be necessary to do this. It is valid ARIA (and passes the Nu Checker) to include the non-roled aria-hidden="true" elements.

@straker
Copy link
Contributor

straker commented Apr 3, 2023

Thanks for the issue. I believe this was recently resolved in #3949.

@kensgists
Copy link
Author

Great to hear, @straker.

And thanks to you, @WilcoFiers and the others for the hard work and diligence with axe

@WilcoFiers
Copy link
Contributor

Confirmed. Yeah this has been fixed for the next release. Thanks for reporting @kensgists!

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

No branches or pull requests

3 participants