Skip to content

aria-required-children should not permit mixing child roles #3468

@WilcoFiers

Description

@WilcoFiers

Axe-core's aria-required-children rule shouldn't pass the following:

<div role="list">
  <li>Item 1</li>
  <span role="link">Item 2</span>
</div>

WAI-ARIA is a little vague about whether or not you're allowed to do this. There are scenarios, such as for radiogroup where owned elements might not all need to be of the required owned elements type, but for something like lists and trees, that doesn't seem right.

Failing the above example is required for consistency with the ARIA required owned elements ACT rule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ACT RulesfixBug fixesprA pr has been created for the issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions