Contrast and button size: the WCAG 2.2 benchmarks

Look at a phone screen outdoors, in full sun, held in one hand. Light gray on white disappears. The small button gets missed. The WCAG 2.2 rules give figures for this. I take them from the W3C site, with what I draw from them for an app.

Inès FadmiProduct Designer UI/UX, 2 min

Photo: Mike Petrucci mikepetrucci, CC0. Photo credits

Text contrast

At level AA, normal text needs a contrast ratio of at least 4.5 to 1 between the text and its background. Large text needs 3 to 1.

The W3C defines large text: at least 18 points, or 14 points bold. In CSS pixels, that comes to about 24 pixels, or 18.5 pixels bold.

Buttons and icons

The text criterion covers text only. Interface components, such as a button or a field outline, fall under another criterion, non-text contrast.

The W3C page gives as an example buttons a little above 3 to 1, which meet it. A lone icon on a light background therefore passes more easily than pale gray text, but it still has to be seen.

Target size

At level AA, a target touched with a pointer measures at least 24 by 24 CSS pixels. The W3C allows exceptions: a smaller target passes if a 24 pixel circle centered on it touches no other target, or if an equivalent control exists on the same page.

Level AAA goes further: 44 by 44 CSS pixels. Targets inside a sentence are exempt.

Where I land

I went back and forth between the two figures. Twenty-four pixels is enough to pass level AA. But a hand carrying a bag or a dog leash is not precise, and a thumb is not a cursor.

I keep 44 pixels. It is the AAA level and it is the rule we follow at FIFTY M for buttons.

A test outdoors

Lower your phone’s brightness, go outside, open your app’s home screen. A contrast that passes in front of a computer can fail outdoors.

Then touch every button with your thumb, without looking where it lands. The one you miss, make it bigger.

Sources