1. Web Content Accessibility Guidelines (WCAG 2.2 POUR Principles)
Web Accessibility (a11y) ensures that web applications can be used by everyone, including people with visual, auditory, motor, or cognitive disabilities. The **WCAG 2.2** standard is structured around four core principles (**POUR**):
1. Perceivable
Information must be presentable to users in ways they can perceive (text alternatives for images, transcripts for audio, color contrast ≥ 4.5:1).
2. Operable
Interface controls must be operable via keyboard (`Tab`, `Space`, `Enter`). Provide visible focus indicators and skip navigation links.
3. Understandable
Information and operation must be understandable. Form inputs must feature clear labels and explicit error messages.
4. Robust
Content must be robust enough to be interpreted reliably by screen readers (NVDA, JAWS, VoiceOver) and future user agents using semantic HTML.
Semantic HTML vs Non-Accessible Markup
Test color contrast and alt-text validation on sample elements:
2. Accessible Names: aria-label, aria-labelledby & aria-describedby
Screen readers compute an Accessible Name for every interactive element. When native HTML labels are unavailable (e.g. icon-only buttons), ARIA attributes supply the accessible name and description.
Screen Reader Navigation Hierarchy & Accessible Name Calculation Flow
Applying ARIA Labeling Attributes
Click to test computed accessible names on ARIA-labeled elements:
3. ARIA Landmark Roles & Page Structure
Screen reader users navigate web pages primarily by jumping between Landmarks. HTML5 semantic tags automatically map to native ARIA landmark roles.
ARIA Landmark Map & Screen Reader Landmark Navigation
Skip Navigation Link Pattern
Click to highlight all ARIA landmark regions detected on the active page:
4. Live Regions (aria-live) & Focus Management
When content updates dynamically on screen (toast alerts, chat messages, form validation), screen readers must be notified without stealing keyboard focus.
| Attribute Value | Screen Reader Speech Behavior |
|---|---|
aria-live="polite" |
Waits until screen reader finishes reading current speech queue before announcing changes. |
aria-live="assertive" |
Interrupts current screen reader speech immediately to read urgent alert payloads. |
aria-atomic="true" |
Forces screen reader to announce the entire region contents instead of just modified text nodes. |
Live Region & Focus Management Pattern
Trigger polite vs assertive live announcements to observe screen reader queues:
5. Interactive Project: Accessibility Auditor & Keyboard Navigation Tester
Run a real-time accessibility audit on the active DOM page to detect WCAG compliance issues, missing form labels, unlabelled buttons, and missing ARIA landmarks.
Automated DOM Accessibility Auditing Script
Click below to scan the active page for accessibility compliance violations live:
Hands-On Challenge: Fix Accessibility Violations in an Unaccessible Form
Fix an unaccessible registration form by adding explicit <label for="..."> tags, aria-describedby validation error messages, and aria-live status alerts.
Chapter 20 Key Takeaways
- Follow WCAG 2.2 POUR principles (Perceivable, Operable, Understandable, Robust).
- First rule of ARIA: Prefer native semantic HTML elements over custom ARIA roles.
- Use
aria-labelandaria-labelledbyfor explicit accessible names; usearia-describedbyfor secondary helper text. - Structure pages with ARIA Landmark roles (`role="banner"`, `role="navigation"`, `role="main"`).
- Use
aria-live="polite"for non-disruptive announcements andaria-live="assertive"for urgent alerts.