What is ARIA and how does it improve web accessibility?
Answer
ARIA (Accessible Rich Internet Applications) is a set of HTML attributes defined by W3C that add accessibility information for assistive technologies like screen readers when native HTML semantics are insufficient. There are three types: Roles define what an element is (role="navigation", role="dialog"). Properties describe characteristics (aria-label="Close dialog", aria-required="true"). States describe current conditions (aria-expanded="true", aria-disabled="true"). The first rule of ARIA is: use native HTML elements whenever possible (<button>, <nav>), as they have built-in semantics. Only use ARIA when native elements cannot achieve the needed behavior.
Previous
What are HTML data attributes (data-*)?
Next
What is the difference between display:none, visibility:hidden, and opacity:0?
More HTML / CSS Questions
View all →- Intermediate How does the CSS cascade work?
- Intermediate What is BEM (Block Element Modifier) methodology in CSS?
- Intermediate What are CSS custom properties (CSS variables)?
- Intermediate What is the difference between em, rem, px, vh, and vw units in CSS?
- Intermediate How does Flexbox differ from CSS Grid? When would you use each?