aria-deprecated-role
Ensure that deprecated or abstract ARIA roles are not used.
Description
The Web Accessibility Initiative (WAI) periodically marks certain roles as deprecated in the WAI-ARIA specification. Also, there are a few abstract roles that are not to be used for web content. The aria-deprecated-role
rule flags any use of such deprecated or abstract roles in your web content.
Success criteria
For this accessibility check to pass, your website must not use the following roles:
- deprecated roles
- abstract roles
Example
In the following example, the deprecated role directory
is used, which breaks the aria-deprecated-role
rule.
In contrast, the following code snippet uses list
, which is not deprecated:
Hence, this code snippet doesn’t break the aria-deprecated-role
rule.
How to fix?
You can follow these steps to fix issues if this rule gets flagged:
-
Check if any of the roles used in your web content is deprecated. If so, replace it with a non-deprecated role.
-
Check if you have used any abstract roles in your web content. Abstract roles are not included in the API binding and hence must be removed from your web content.
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!