Skip to content

Setting allowImplicit: false option on aria-allowed-roles fails all roles #3213

@straker

Description

@straker

Consider the following code:

<div role="button">Button</div>

This passes aria-allowed-role. But if you configure the rule to not allow implicit roles, it now fails

axe.configure({
  checks: [
    {
      id: 'aria-allowed-role',
      options: {
        allowImplicit: false
      }
    }
  ]
});

The reason is that the final if statement in the check will always pass unless the element is a tr node inside a grid.

Metadata

Metadata

Assignees

Labels

configurationrules / checks customisationfixBug fixesprA pr has been created for the issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions