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.
Consider the following code:
This passes
aria-allowed-role. But if you configure the rule to not allow implicit roles, it now failsThe reason is that the final
ifstatement in the check will always pass unless the element is atrnode inside agrid.