Skip to content

False positives when using aria-roledescription #3649

@tesk9

Description

@tesk9

Product

axe-core

Product Version

4.4.3

Latest Version

  • 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']`

Metadata

Metadata

Assignees

No one assigned

    Labels

    info neededMore information or research is needed to continueprA 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