Skip to content
Back to blog
Field notes · image

WCAG 2.2 Contrast Requirements Are the Numbers from 2008

WCAG 2.2 kept every contrast ratio: 4.5:1 and 3:1 for AA text, 7:1 and 4.5:1 for AAA, 3:1 for controls. What each covers, and the one new focus rule.

5 min readSimon Wong

WCAG 2.2 became a W3C Recommendation on 5 October 2023 and added nine success criteria. None of them changes a contrast ratio. The text thresholds are the ones WCAG 2.0 set in 2008, and the 3:1 rule for controls arrived with WCAG 2.1 in 2018. On a white background, three grays cover the whole text table. #949494 (3.03:1), #767676 (4.54:1) and #595959 (7.00:1) are the lightest grays that reach 3:1, 4.5:1 and 7:1.

Every Contrast Rule in WCAG 2.2

Success criterionLevelApplies toMinimum
1.4.3 Contrast (Minimum)AANormal text4.5:1
1.4.3 Contrast (Minimum)AALarge text3:1
1.4.6 Contrast (Enhanced)AAANormal text7:1
1.4.6 Contrast (Enhanced)AAALarge text4.5:1
1.4.11 Non-text ContrastAAControl boundaries, states, meaningful graphics3:1
2.4.13 Focus AppearanceAAAFocus indicator, focused vs unfocused3:1

The Understanding documents call these thresholds and say the computed value is not rounded: 4.499:1 fails 4.5:1, and 2.999:1 fails 3:1. The ratio itself comes from relative luminance; the formula, worked by hand, shows where the 4.54 for #767676 comes from.

The 4.5 has a stated origin. Understanding 1.4.3 starts from 3:1, the minimum for normal vision in an ANSI standard, and multiplies it by 1.5, the contrast sensitivity loss associated with 20/40 acuity. The same reasoning for 20/80 acuity gives about 7:1, which became the AAA level.

Large Text Starts at 24 px

WCAG defines large-scale text as at least 18 point, or 14 point bold. Those are CSS points, and 1 pt is 1.333 px, so the thresholds are 24 px regular and about 18.66 px bold. A common mistake reads "18" as 18 px. A 20 px regular heading is normal text and needs 4.5:1, while a 20 px bold heading counts as large and needs 3:1.

WCAG does not give a numeric font weight for "bold"; 700 is the safe reading. For Chinese, Japanese and Korean fonts, the definition accepts whatever size is equivalent to 18 pt or 14 pt bold.

What Counts as Text

1.4.3 covers more than body copy. The Understanding document names placeholder text, and text that appears on hover or focus. Tailwind CSS v3 sets placeholders to gray-400 (#9CA3AF) by default, which is 2.54:1 on white and fails AA.

Four kinds of text are exempt:

  • text in an inactive control, such as a disabled button
  • pure decoration that carries no information
  • text that is not visible to anyone
  • text inside a picture with significant other visual content, such as a sign in a street photo (a headline over a hero image is not exempt; see text over image contrast)

Logotypes are exempt too, with a limit. The Understanding document gives the example of company logos shown in low contrast until hovered and says that pattern still fails, because the faded state is a design choice, not part of the logo.

Contrast does not cover hue. Red text and green text with the same luminance score the same ratio, and a separate criterion (1.4.1 Use of Color) handles color as the only signal. To see what a palette looks like to color-blind users, try the color blindness simulator.

Non-text Contrast: Borders, Icons, Focus Rings

1.4.11 asks for 3:1 between a component and the colors next to it. The border of a control only needs that contrast when nothing else shows the control is there. A button with readable text needs no visible boundary. A text input marked only by its border does. Tailwind v3's default border color, gray-200 (#E5E7EB), is 1.24:1 on white; gray-300 (#D1D5DB) is 1.47:1. The example in the Understanding document uses #767676.

The same 3:1 applies to icons and chart parts needed to understand the content, and to focus indicators against the background they sit on. Thin lines are a known trap: anti-aliasing can render a 1 px line lighter than its CSS color, so a border that passes on paper can look fainter on screen.

AAA: No Color Reaches 7:1 Against Both Black and White

Multiply any color's ratio against white by its ratio against black and you always get 21:

(L + 0.05) / 0.05  ×  1.05 / (L + 0.05)  =  1.05 / 0.05  =  21

Two numbers whose product is 21 cannot both be 7 or more. The best a color can do against both is √21, about 4.58:1. That is why a single accent color cannot meet AAA on a light theme and a dark theme at once. Only 292,107 of the 16.7 million sRGB colors, 1.7%, reach even 4.5:1 against both.

Against white alone, 36.4% of sRGB colors pass AA for normal text and 18.4% pass AAA. WCAG 2.2 itself says it is not recommended to require AAA conformance across entire sites, because some content cannot meet every AAA criterion. A practical split is AAA for long body text and AA everywhere else.

The One New Contrast Rule: Focus Appearance

2.4.13 Focus Appearance is new in WCAG 2.2, at level AAA. When a focus indicator is visible, part of it must:

  • be at least as large as a 2 CSS px thick outline around the unfocused component, and
  • have 3:1 contrast between the same pixels in the focused and unfocused states.

The second test compares a pixel with itself before and after focus, not the ring with the page background. A 2 px #767676 outline on a white page passes: each outline pixel changes from white to a gray at 4.54:1. The criterion does not apply when the browser's default focus indicator is left unmodified.

Where APCA Fits

APCA, the contrast method proposed for WCAG 3, is not part of WCAG 2.2, so it cannot make a pair conform or fail. It answers a different question, weighing font size and polarity, and it rates dark-mode pairs at 4.5:1 far lower than light-mode pairs. See what APCA Lc levels allow for the comparison.

Try It

Open the Contrast Checker and set the background to #FFFFFF. With #949494 as the text, the ratio reads 3.03: AA large passes, AA normal fails. Change it to #767676: 4.54, AA normal and AAA large pass, AAA normal fails. Change it to #595959: 7.00, all four pass. Then try Tailwind's old placeholder gray, #9CA3AF: 2.53, all four fail.