ARIA & Accessible HTML in HTML
From the HTML cheat sheet ยท Accessibility ยท verified Jul 2026
ARIA & Accessible HTML
Essential ARIA attributes and semantic patterns for accessible web pages
html
<!-- Label elements properly -->
<label for="email">Email:</label>
<input type="email" id="email" aria-required="true">
<!-- Describe with ARIA -->
<button aria-label="Close dialog">ร</button>
<!-- Hide decorative content -->
<img src="divider.png" alt="" aria-hidden="true">
<!-- Live regions for dynamic updates -->
<div role="alert">Form submitted successfully!</div>๐ก The best ARIA is no ARIA โ use semantic HTML elements first (button, nav, main, label)
โก aria-label is for elements with no visible text; aria-labelledby points to existing text
๐ Always use alt="" (empty) for decorative images โ missing alt is an accessibility violation
๐ข aria-live="polite" announces changes without interrupting; "assertive" interrupts immediately
ariaaccessibilitya11y