What is ARIA in web accessibility?
ARIA stands for Accessible Rich Internet Applications. It is a technical specification from the W3C that defines a set of HTML attributes: roles, states, and properties that can be added to HTML elements to communicate their purpose and behavior to assistive technologies like screen readers. ARIA fills the gaps where native HTML semantics are insufficient to describe the behavior of complex interactive components. A custom dropdown built from div elements has no inherent semantic role that a screen reader can understand, but adding role="listbox" and appropriate ARIA attributes communicates its purpose and state.
When should you use ARIA?
The first rule of ARIA, stated in the ARIA specification itself, is: do not use ARIA if you can use native HTML instead. Native HTML elements like button, input, select, and nav carry built-in accessibility semantics that work correctly across browsers and assistive technologies without any additional attributes. ARIA is appropriate when building custom interactive components that have no native HTML equivalent, when native HTML elements cannot be used for technical reasons, when additional state information needs to be communicated such as aria-expanded for accordion components, and when dynamic content changes need to be announced to screen reader users using ARIA live regions.
What are the most commonly needed ARIA attributes?
aria-label and aria-labelledby provide accessible names for elements that lack visible text labels. aria-describedby associates additional descriptive text with an element. aria-expanded communicates the open or closed state of accordions, dropdowns, and disclosures. aria-hidden removes decorative elements from the accessibility tree so screen readers skip them. aria-live creates regions that announce dynamic content changes. aria-required communicates required form fields. role attributes communicate the semantic type of custom components. Each of these should be used precisely and tested with real screen readers because incorrect ARIA implementation can create worse experiences than no ARIA at all.