The First Rule of ARIA: Don't Use ARIA
What you'll learn: Why native HTML should always be your first choice, and when ARIA actually becomes necessary.
The Golden Rule
The first rule of ARIA is paradoxical but crucial: don't use ARIA if you can use native HTML instead. This means that before reaching for aria-label, role, or any ARIA attribute, you should ask yourself: "Does standard HTML already solve this problem?"
Why Native HTML Wins
Native HTML elements come with built-in accessibility features that browsers and assistive technologies understand automatically. A <button> element inherently:
- Announces itself as a button
- Responds to keyboard (Enter and Space)
- Works with screen readers out of the box
- Is focusable by default
When you use <div role="button">, you're recreating all this functionality manually—and you'll probably miss something.
Think of It Like Building Codes
Imagine you're building a house. Native HTML is like using pre-approved, code-compliant materials. ARIA is like custom-building something from scratch—it might work, but you're responsible for ensuring it meets every safety standard. Why take that risk when the pre-approved option exists?
When ARIA Becomes Necessary
ARIA fills gaps where HTML lacks semantic meaning. You need ARIA when:
- Creating custom widgets HTML doesn't support (complex tree views, tabs)
- Enhancing dynamic content (live regions for updates)
- Adding context HTML can't convey (describing relationships between elements)
But even then, check if a native solution exists first. A <details> element beats aria-expanded on a div every time.
Key Takeaway: Always use native HTML semantics first—<button> over <div role="button">, <nav> over <div role="navigation">. Only add ARIA when HTML genuinely cannot express what you need, because native elements provide better, more reliable accessibility for free.