What does the first rule of ARIA — use a native element instead of ARIA when you can — mean in practice, and when is reaching for ARIA actually the right call?
technical-conceptual · Mid level · software-engineering
What the interviewer is really asking
Assesses whether the candidate understands that native HTML elements carry built-in semantics, keyboard behavior, and focus management for free, that ARIA only changes how assistive tech reads an element without adding behavior, and can judge when ARIA is genuinely needed.
What to say
- Explain that native elements like button, a, and input come with role, keyboard interaction, and focus handling built in, so reusing them is safer than recreating them.
- Make clear ARIA changes only the accessibility tree — it adds no keyboard behavior or focus, so a div with role=button still needs all the key handling and tabindex you'd otherwise get free.
- Say ARIA is the right tool when no native element expresses the pattern, such as tabs, a live region for async updates, or labeling a custom composite widget.
What to avoid
- Sprinkling ARIA roles on elements to 'make them accessible' without realizing it adds no behavior, only relabels them.
- Building a div-based button and assuming role=button alone makes it usable by keyboard and screen-reader users.
- Treating accessibility as an afterthought or something a tool fully automates rather than a markup decision.
Example answers
Strong: A native button gives you focusability, Enter and Space activation, and the right role for free, so I reach for it before any ARIA. ARIA only edits the accessibility tree, so when I inherited a div role=button I had to add tabindex and keydown handlers to make it actually work. I reserve ARIA for patterns with no native equivalent, like wiring up a tablist or announcing async results through a live region.
Weak: Accessibility is mostly about adding ARIA roles and aria-labels to elements so screen readers can understand them. I'd go through the components and add the right roles to the divs we use for buttons and menus.