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

list > group > listitem should not be allowed #3708

Closed
WilcoFiers opened this issue Oct 8, 2022 · 2 comments
Closed

list > group > listitem should not be allowed #3708

WilcoFiers opened this issue Oct 8, 2022 · 2 comments
Assignees
Labels
ACT Rules fix Bug fixes pr A pr has been created for the issue standards Issues in the ARIA standards objects (lib/standards)
Milestone

Comments

@WilcoFiers
Copy link
Contributor

As of WAI-ARIA 1.2, groups are no longer allowed in lists. This is soon changing in ACT as well. We should make sure the following fails axe-core:

<div role="list">
  <div role="group">
    <div role="listitem">list item</div>
  </div>
</div>

To fix this, remove group from list and listitem in standards/aria-roles.js, and fix any tests that fail.

@WilcoFiers
Copy link
Contributor Author

This was done a while back. Needs QA though.

@padmavemulapati
Copy link

Validated with the latest axe-core develop branch code base,

role=group are no longer allowed inside lists and listitems.
Test snippet:

 <div role="list" id="target"><ul role="group"><li role="listitem">Item</li></ul></div>

aria-required-children should fail here as this is holding role=group as child for role=list.

Also:
Require aria-controls on combobox.
Require focusable separators to have aria-value now.
Require combobox, radio, seperator now require aria-checked. The default value of false is no longer assumed.
Test snippet:

<!--aria-req-parent should pass here-->
   <div role="tree"><div role="none"><div role="group"><div role="none"><div role="group"><div role="treeitem" id="target">Nothing here.</div></div></div></div></div></div>
   <!--aria-req-attr should fail when role=seperator--> 
   <span role="radio" id="aratrr_fail">I am BLUE!</span>
<div role="separator" id="violation" tabindex="0"></div>
<div id="target-fail" role="combobox" aria-expanded="invalid-value"></div>

Image

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACT Rules fix Bug fixes pr A pr has been created for the issue standards Issues in the ARIA standards objects (lib/standards)
Projects
None yet
Development

No branches or pull requests

2 participants