axe-core
axe-core copied to clipboard
aria-required-children: be less permissive of divs as child nodes
ARIA required context role, failed example 3
In the ARIA required context role ACT rules, failed example 3 currently isn't being failed by axe-core. Specifically, I think aria-required-children should have caught this:
<div role="list">
<div aria-live="polite">
<div role="listitem">List item 1</div>
<div role="listitem">List item 2</div>
</div>
</div>
Because of its global attribute, that div[aria-live] should not be ignored in the accessibility tree. How browsers do this varies. Firefox considers this a section inside a list.
Should fail due to #3468, just need to add to the getOwnedRoles function to check for tabindex > -1 or is focusable (should we make this it's own function called includedInAccessibilityTree? We do this type of check often enough it might make sense). Adding null to the list or return roles should be sufficient in this case to trigger the error message.
Validated with the latest develop branch code base,
aria-required-children failing now for the child elements which are unlisted
and with 4.3.5 we are reproducing the issue