What is the purpose of the HTML “aria-*” attributes?
Last Updated :
31 Jan, 2024
The HTML “aria-*” attributes, part of WAI-ARIA (Web Accessibility Initiative – Accessible Rich Internet Applications), are used to enhance the accessibility of web content. These attributes provide additional information to assistive technologies, such as screen readers, in interpreting and presenting content to users with disabilities.
Syntax
<button aria-label="Close" aria-disabled="true">X</button>
Features
- Accessibility Enhancement: “aria-*” attributes help make web content more accessible to people with disabilities.
- Role, State, and Property Attributes: The “aria-*” attributes cover roles (
role
), states (aria-*
), and properties (aria-*
).
- Screen Reader Compatibility: Assistive technologies, such as screen readers, use these attributes to convey additional information to users.
- Common “aria-*” Attributes: Examples include
aria-label
, aria-describedby
, aria-hidden
, aria-haspopup
, etc.
Share your thoughts in the comments
Please Login to comment...