WCAG Encyclopedia

The WCAG 2.2 encyclopedia

Every WCAG criterion, shown.

The Web Content Accessibility Guidelines are the standard most accessibility laws and audits point to. This encyclopedia covers all 55 Level A and AA success criteria, the testable checks a web page has to pass: each one restated in plain language, shown broken and then fixed, and filed under the principle it belongs to.

  • 55criteria
  • 31at Level A
  • 24at Level AA
  • 6new in 2.2

Check a colour pair

Pick a text colour and a background. Everything below is drawn in those two colours and measured live.

Text colour
Background
Contrast ratio11.74 : 1

The contrast ratio compares how bright the two colours are. 1 : 1 means the colours are identical, so text in them is invisible; 21 : 1 is black on white, the most there is. The higher the number, the easier it is to read.

On the scale from 1 : 1 to 21 : 1, 11.74 : 1 is at or above 7 : 1: enough for every threshold.

Why the thresholds differ
  • Body text needs 4.5 : 1 (1.4.3, Level AA). That is any text below large size.
  • Large text needs 3 : 1 (1.4.3). Large means at least 24px, or 18.66px and bold. Bigger, heavier letters stay readable with less contrast.
  • At Level AAA, body text needs 7 : 1 (1.4.6), for people with moderately low vision.
  • Borders and icons need 3 : 1 (1.4.11): the edge of a field or checkbox, a focus ring or an icon, against what is next to it. You have to see that they are there, not read them.
  • PassesBody text, AA · 1.4.3Body text needs at least 4.5 : 1. This pair has 11.74 : 1.
  • PassesLarge text, AA · 1.4.3Large text needs at least 3 : 1. This pair has 11.74 : 1.
  • PassesBody text, AAA · 1.4.6Body text at AAA needs at least 7 : 1. This pair has 11.74 : 1.
  • PassesBorders and icons, AA · 1.4.11Borders and icons need at least 3 : 1. This pair has 11.74 : 1.

1.4.3 passes

Done well, done badly

Colour contrast is one of the failures audits find most often, so it gets the checker above. Each pair shows the same message twice: the usual mistake on the left, the fix on the right. Load any pair into the checker to try your own fix.

Open the full colour check
  • Pale grey on white

    Badly · 2.05 : 1. #B5B5B5 text on #FFFFFF.
    Opening hoursWell · 6.48 : 1. #5E5E5E text on #FFFFFF.

    Looks refined on a bright monitor and disappears on a phone in sunlight.

  • White on yellow

    Badly · 1.45 : 1. #FFFFFF text on #F8D17D.
    Opening hoursWell · 11.74 : 1. #1A1C1C text on #F8D17D.

    Yellows are light colours. Dark text works on them; white text never does.

  • Pastel link on white

    Badly · 1.76 : 1. #9CCADE text on #FFFFFF.
    Opening hoursWell · 7.14 : 1. #1F5E7A text on #FFFFFF.

    Keep the hue, drop the lightness. The link stays on brand and becomes readable.

  • Red on green

    Badly · 1.40 : 1. #D0312D text on #3A9A3A.
    Opening hoursWell · 8.19 : 1. #FFFFFF text on #245A24.

    Similar lightness, different hue. For many colour-blind readers the two become one.

  • Muted text in dark mode

    Badly · 2.08 : 1. #5A5B5F text on #2A2B2D.
    Opening hoursWell · 8.01 : 1. #C3C3BE text on #2A2B2D.

    Secondary text drifts towards the background. Lift it until it reads.

  • Soft red error message

    Badly · 2.28 : 1. #FF8A80 text on #FFFFFF.
    Opening hoursWell · 6.66 : 1. #A83226 text on #FFFFFF.

    A friendly coral feels gentle and fails as text. Errors must be the easiest thing to read.

Four principles

WCAG groups every success criterion under four principles: content has to be perceivable, operable, understandable and robust. Each principle has a colour and a number here, so the grouping survives greyscale.

The index

Every Level A and AA success criterion in WCAG 2.2. Search by number, name, or the way it usually goes wrong.

Showing 6 of 55 criteria.

See all 55 criteria

Try it: fade the text

Each criterion page has a live exhibit you can break yourself. This one is about grey text.

Read 1.4.3 in full

1.4.3 · Level AA · Perceivable

Contrast (Minimum)

Body text needs at least 4.5:1 against its background. Text at 24px, or 18.66px and bold, needs 3:1. Measure it rather than judging by eye — a screen at full brightness in a dim room is the most forgiving possible viewing condition, and it is the one you are designing in.

Opening hours

Monday to Friday, nine until five. Closed on public holidays.

Raise the slider to fade the text towards the background. The ratio and results update as you move it.
Contrast ratio11.94 : 1

The contrast ratio compares how bright the two colours are. 1 : 1 means the colours are identical, so text in them is invisible; 21 : 1 is black on white, the most there is. The higher the number, the easier it is to read.

On the scale from 1 : 1 to 21 : 1, 11.94 : 1 is at or above 7 : 1: enough for every threshold.

Why the thresholds differ
  • Body text needs 4.5 : 1 (1.4.3, Level AA). That is any text below large size.
  • Large text needs 3 : 1 (1.4.3). Large means at least 24px, or 18.66px and bold. Bigger, heavier letters stay readable with less contrast.
  • At Level AAA, body text needs 7 : 1 (1.4.6), for people with moderately low vision.
  • Borders and icons need 3 : 1 (1.4.11): the edge of a field or checkbox, a focus ring or an icon, against what is next to it. You have to see that they are there, not read them.
  • PassesBody text, AA · 1.4.3Body text needs at least 4.5 : 1. This text has 11.94 : 1.
  • PassesLarge text, AA · 1.4.3Large text needs at least 3 : 1. This text has 11.94 : 1.
  • PassesBody text, AAA · 1.4.6Body text at AAA needs at least 7 : 1. This text has 11.94 : 1.

1.4.3 passes

Three contrast thresholds

People often treat contrast as one number. WCAG has three thresholds, and they measure different things.

  • 1.4.3 · Level AA

    Text

    4.5 : 1

    Body text against its background. Large text, 24px or 18.66px bold, needs 3 : 1.

  • 1.4.6 · Level AAA, not in the index

    Enhanced text

    7 : 1

    The stricter version, for people with moderately low vision who don’t use magnification.

  • 1.4.11 · Level AA

    Controls and graphics

    3 : 1

    Field borders, focus rings, icons and chart lines against whatever is next to them.

New in 2.2

WCAG 2.2 added 6 criteria at Levels A and AA. Most are about focus, pointers and forms that ask too much.

This site meets the criteria it explains.

A site about accessibility that fails it would be worse than no site at all. Every page is checked before it ships, and the broken examples are fenced off so they cannot trip anyone up.

  • Checked on every releaseEach page is scanned against WCAG 2.2 AA before deploy. A failure blocks the release.
  • Keyboard firstEvery demo works without a mouse, and focus is always visible.
  • Broken examples are labelledEach failing exhibit is described in text, so a screen reader hears what is wrong instead of the mess itself.
  • Motion is optionalAnimations stop when your system asks for reduced motion.