Accessibility and ARIA
Over 1 billion people worldwide have a disability. Web accessibility means making websites usable by everyone — blind users with screen readers, people with motor disabilities using keyboards only, and more.
Semantic HTML is the Foundation
<!-- BAD: div has zero meaning for screen readers --> <div class="btn" onclick="submit()">Submit</div> <!-- GOOD: button is announced as "Submit, button" --> <button type="submit" onclick="submit()">Submit</button>
ARIA Roles and Labels
ARIA (Accessible Rich Internet Applications) adds semantic meaning when HTML alone is not enough:
<!-- aria-label describes element for screen readers --> <button aria-label="Close menu">X</button> <!-- aria-hidden removes element from screen readers --> <span aria-hidden="true">📸</span> <!-- aria-expanded announces open/closed state --> <button aria-expanded="false" aria-controls="menu"> Open Menu </button> <nav id="menu" role="navigation">...</nav>
Skip Navigation Link
<!-- First element on page — lets keyboard users skip nav --> <a href="#main-content" class="skip-link"> Skip to main content </a> <nav>...navigation links...</nav> <main id="main-content">...</main>
Google's crawlers behave like screen readers — they cannot see images or run heavy JavaScript. Accessible HTML with proper semantic structure is crawled more efficiently and ranked better.
Do not use ARIA if a native HTML element exists. Use a real <button> not <div role="button">. Native elements come with built-in keyboard support and accessibility for free.
The UN Convention on the Rights of Persons with Disabilities (2006) recognizes digital accessibility as a human right. In many countries websites must be accessible by law or face significant legal penalties.