HTML & CSS · Senior · Question 38 of 75
When are ARIA attributes needed, and when is it better to do without them?
- 1ARIA is needed on every element, or screen readers won't read it
- ✓Correct answer: If a native element exists, use it; ARIA is for custom widgets
- 3ARIA replaces elements, so
<div role="button">is better than<button>
Explanation
ARIA only changes how an element is described to assistive technologies; it adds no behavior: <div role="button"> doesn't get focus or Enter/Space activation. Incorrect ARIA is worse than none. For tabs, comboboxes and trees, which have no native equivalents, follow the APG patterns.