WCAG
// Definition
Web Content Accessibility Guidelines — the international standard for accessible web content, organised into four principles (Perceivable, Operable, Understandable, Robust). Levels A, AA, and AAA define increasing conformance. Most regulations target WCAG 2.1 or 2.2 Level AA.
// Why it matters
WCAG is the standard most accessibility law points to, organised under POUR (Perceivable, Operable, Understandable, Robust) at levels A/AA/AAA. QA targets AA as the common legal bar. It matters because "accessible" is otherwise subjective — WCAG gives testable success criteria you can pass/fail against.
// How to test
// Automated axe pass catches ~30-40%; the rest is manual
import 'cypress-axe'
cy.visit('/checkout')
cy.injectAxe()
cy.checkA11y(null, { runOnly: ['wcag2a', 'wcag2aa'] }) // fail on AA violations
// Then manual: keyboard-only walkthrough + screen-reader pass (axe can't judge these)// Common mistakes
- Treating an automated axe pass as full WCAG compliance (it's ~a third)
- Chasing AAA everywhere when AA is the actual target
- Auditing once at the end instead of per-feature as you build
// Related terms
ARIA Attributes
HTML attributes (role, aria-label, aria-describedby, aria-live) that expose semantics and state to assistive technologies. The first rule of ARIA is: don't use ARIA — prefer native HTML elements when they convey the same meaning.
Screen Reader Testing
Verifying an interface works with assistive technology that reads content aloud — VoiceOver, NVDA, JAWS, TalkBack. Catches missing labels, broken focus order, and content visible only to sighted users.
Colour Contrast Ratio
The luminance ratio between text and background, expressed as 1:1 to 21:1. WCAG AA requires 4.5:1 for normal text and 3:1 for large text. Easily measured by automated tools and a frequent fail on marketing sites.
Learn more · Non-Functional Testing Overview
Chapter 4 · Lesson 1: WCAG Standards and Levels A, AA, AAA