--- name: accessibility description: Web accessibility patterns and WCAG 2.1/2.2 compliance. Use to build accessible components, audit a UI for a11y issues, fix screen reader or keyboard problems, check contrast, or add ARIA. allowed-tools: Read Grep Glob Bash user-invocable: false --- # Web Accessibility Accessibility is a quality attribute, not a feature to bolt on at the end. Consider it from the first line of markup. Legislation in most jurisdictions (ADA, EAA, Section 508, EN 301 549) requires digital products to be accessible. ## WCAG principles: POUR The Web Content Accessibility Guidelines organize all success criteria under four principles. Every accessibility requirement maps to at least one. | Principle | Question it answers | Examples | |---|---|---| | **Perceivable** | Can users sense the content? | Text alternatives for images, captions for video, sufficient color contrast, resizable text | | **Operable** | Can users interact with every control? | Keyboard operability, enough time to complete tasks, no seizure-triggering animations, clear navigation | | **Understandable** | Can users comprehend the content and UI behavior? | Readable language, predictable navigation, input assistance and error messages | | **Robust** | Does it work across assistive technologies? | Valid markup, proper use of ARIA, compatibility with screen readers and other tools | --- ## Conformance levels WCAG defines three levels. Each higher level includes all criteria from the levels below it. | Level | Target audience | Typical requirement | |---|---|---| | **A** | Bare minimum, removes the most severe barriers | Most legal and procurement requirements start here | | **AA** | Industry standard, addresses the majority of barriers for most users | Required by ADA, EAA, Section 508, and most organizational policies | | **AAA** | Highest standard, not achievable for all content types | Aspirational; apply selectively where feasible | For most projects, **target Level AA**. It meets most real-world needs and avoids requirements that conflict with some content types. --- ## Semantic HTML fundamentals Native HTML elements carry built-in semantics, keyboard behavior, and screen reader announcements. Using the right element is the single most effective accessibility technique. | Instead of | Use | Why | |---|---|---| | `