Skip to main content

aria-roledescription

aria-roledescription must only be present for elements having a role.

Severity: Serious

Description

The usage of the aria-roledescription attribute should be limited to elements that have either an implicit or explicit role. The aria-roledescription property provides authors with the ability to customize how assistive technologies localize and announce the name associated with an element’s role. It is important to note that the purpose of the aria-roledescription attribute is not to alter the element’s semantics, but rather to specify its existing semantics.

Why is it important?

The aria-roledescription attribute is used to provide a human-readable description of the purpose or behavior of an element with an ARIA role or element with an inherent role. This is useful where the default role name may not fully convey its functionality to users of assistive technologies. aria-roledescription attribute is used to provide additional context for assistive technology users in such cases. If an element has no implicit or explicit role, using aria-roledescription would not be appropriate or useful. Screen readers will not interpret or announce the aria-roledescription attribute because there is no associated role to describe. The aria-roledescription attribute is specifically intended to enhance the understanding of an element’s role for assistive technology users but is not a subtitute to the implicit or explicit role of an element.

How to fix?

Use aria-roledescription only when an elements has-

  1. Implict ARIA role - <button> and <img> are examples of elements with implict ARIA roles.
  2. Explicit ARIA role - The role attribute is used to add an explicit role.

References

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