Skip to main content

aria-prohibited-attr

Ensure that prohibited ARIA attributes are not used.

Severity: Serious

Description

Some ARIA attributes are prohibited due to potential conflicts with native HTML semantics or because they can create confusion for assistive technologies. In other cases, certain ARIA attributes are not allowed to be used with certain ARIA roles. The aria-prohibited-attr rule flags any use of such prohibited attributes in your web content.

Success criteria

For this accessibility check to pass, your website must not use prohibited combinations of role and attribute.

Example

In the following example, the aria-label attribute is used in a presentation role. This is a prohibited combination, which breaks the aria-prohibited-attr rule.

Incorrect sample - button - aria-label
Copy icon Copy snippet

In contrast, the following code snippet does not use an aria-label attribute.

Hence, this code snippet doesn’t break the aria-prohibited-attr rule.

Correct sample
Copy icon Copy snippet

How to fix?

You can follow these options to fix issues if this rule gets flagged:

  • Remove the prohibited attribute.
  • Use another role in which the attribute is allowed.
  • Use plain text to convey the information.
  • Use other attributes that are not prohibited.

Reference

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy