ARIA Basics
ARIA (Accessible Rich Internet Applications) adds accessibility information to elements when HTML alone isn't enough. But remember: native HTML is always preferred.
The First Rule of ARIA
Loading HTML Playground...
Rule #1: If you can use native HTML, do it.
<button>over<div role="button"><nav>over<div role="navigation"><main>over<div role="main">
ARIA Labels
Loading HTML Playground...
Common labeling attributes:
aria-label- Provides invisible labelaria-labelledby- Points to element with labelaria-describedby- Points to description
ARIA Landmarks
Loading HTML Playground...
Landmark roles help screen reader users navigate:
banner- Headernavigation- Navmain- Main contentcomplementary- Asidecontentinfo- Footersearch- Search area
ARIA for Dynamic Content
Loading HTML Playground...
Live region values:
polite- Announce when convenientassertive- Announce immediately (use sparingly)
ARIA States
Loading HTML Playground...
Common states:
aria-expanded- Expanded/collapsedaria-selected- Selected itemaria-checked- Checked statearia-disabled- Disabled statearia-hidden- Hidden from screen readers
ARIA for Forms
Loading HTML Playground...
Form ARIA:
aria-required- Field is requiredaria-invalid- Field has erroraria-errormessage- Error message reference
Skip Links
Loading HTML Playground...
Skip links let keyboard users bypass repetitive content.
Exercise: Add ARIA Attributes
Improve the accessibility with appropriate ARIA:
Loading HTML Exercise...
ARIA enhances accessibility when native HTML isn't enough - use it wisely!

