The 'First Rule of ARIA' Every Interviewer Listens For
A candidate is asked how they'd decide between adding ARIA attributes to
a generic <div> versus just using a native HTML element for a new
control. There's a well-known guiding principle in the ARIA spec itself
for this exact decision.
What is it?
The correct answer is "If a native element already has the needed behavior, use it instead of ARIA."
This is often summarized as the first rule of ARIA: if a native HTML element or attribute already has the behavior or semantics you need, use it rather than reaching for ARIA on a generic element. ARIA can describe a custom widget, but it never grants the built-in keyboard behavior a native element gets automatically — you'd still have to wire that up by hand.
Always adding ARIA "to be safe" ignores that ARIA on top of an already- semantic native element is redundant at best and can conflict with native semantics at worst. Adding ARIA to every interactive element by default is the opposite of the rule, not an application of it. Avoiding native elements entirely in modern component libraries throws away the free behavior the rule is built around.
Share this question