aria-prohibited-attr
Ensure that prohibited ARIA attributes are not used.
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.
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.
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
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!