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

False negative: 'aria-required-children' rule does not ensure all the child elements have an appropriate role #2576

Closed
iamrafan opened this issue Oct 21, 2020 · 1 comment

Comments

@iamrafan
Copy link
Contributor

aria-required-children checks only if at least one child has the appropriate role rather than making sure all the children of a particular role have the appropriate roles

For example if an element with role list has one child with role listitem and other children with inappropriate roles, aria-required-children does not fail on these children

Expectation: Fail all child elements with inappropriate roles. Case1 and Case3 in the example should fail

Actual: The rule checks only if at least on child has the appropriate role

Demo link: https://codepen.io/iamrafan/pen/qBNawdg

axe-core version: 4.0.2
axe version: 4.6.1
@WilcoFiers
Copy link
Contributor

@iamrafan Hey Guru. ARIA doesn't require this. The description of required owned elements is somewhat problematic. I have been trying to get the ARIA working group to update their spec to clarify on this issue w3c/aria#1033. As of today, The requirement is that at least one descendant (jup, doesn't even have to be a child) has the required role. It's pretty busted, and I hope they can get around to fixing this, but I don't want to change how axe-core works without seeing how the ARIA working group thinks it should be.

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

2 participants