axe-core
axe-core copied to clipboard
False positives when using aria-roledescription
Product
axe-core
Product Version
4.4.3
Latest Version
- [X] I have tested the issue with the latest version of the product
Issue Description
Expectation
aria-roledescription should be allowed on any element that has "a valid WAI-ARIA role or has an implicit WAI-ARIA role," according to ARIA 1.1's roledescription section
Actual
I believe that the checks for aria-roledescription limit the supported WAI-ARIA roles to:
"supportedRoles": [
"button",
"img",
"checkbox",
"radio",
"combobox",
"menuitemcheckbox",
"menuitemradio"
]
which leaves out a fair number of roles, including the "region" role that's used in the ARIA 1.1. example of a "slide".
How to Reproduce
Provide a code sample or link to a webpage that reproduces the issue. Without this, your issue may be closed without investigation.
Add the following HTML node to a page:
<mark aria-roledescription="Claim highlight">Bats are vital pollinators</mark>
Run axe devtools or any of the other tools that use axe-core, and you'll get an error:
![Screen Shot of axe devtools output with Issue 'Ensure aria-roledescription is only used on elements with an implicit or explicit role' highlighting `mark[aria-roledescription='Claim highlight']`](https://user-images.githubusercontent.com/8811312/188992164-f0aaa14e-9605-4fe4-a241-123fc54be4a1.png)
Thanks for the issue. When we created the check two years ago, assistive technologies didn't support it very well for non-interactive elements. That may have changed in the past years, so we can recheck support.
After rechecking, the attribute is fully supported so we'll disable the rule and deprecate it..
Thanks!
Validated with the latest axe-core develop branch code base, aria-roledescription is deprecated , so that with the latest axe.run is not showing aria-roledescription with the below code snippet:
<p aria-roledescription="my paragraph" id="fail1">paragraph</p>
<div aria-roledescription="my div" id="fail2">div</div>
<div
role="presentation"
aria-roledescription="my presentation"
id="fail3"
></div>
<div role="none" aria-roledescription="my none" id="fail4"></div>
Where with the earlier axe version (let us 4.6.3 production version) we can see the failure for aria-roledescription
