Menu

Every tap target under 24px on our site is exactly 20px tall, and all 621 of them pass WCAG only because of the spacing rule
📰

Every tap target under 24px on our site is exactly 20px tall, and all 621 of them pass WCAG only because of the spacing rule

DEV Community: css·Daniel Pertu·about 22 hours ago
#JO0JgenY
#devtocss#devto#dev#target#links
Reading 0:00
15s threshold

WCAG 2.2 added a success criterion that is unusually easy to measure: 2.5.8, Target Size (Minimum), level AA. Every target should be at least 24 by 24 CSS pixels, with a short list of exceptions. Unlike contrast, which needs a colour model, or focus order, which needs a real keyboard, this one is getBoundingClientRect() and a comparison.

So I ran it over all 76 public pages of Nakodo at a phone viewport, expecting a messy long tail of near misses. What came back was the opposite of messy, and the interesting part turned out to be the exception rather than the rule.

The setup

390 by 844, device scale factor 3, mobile flag on, set through the DevTools protocol rather than by resizing a window, so the emulation is the same every time:

await page .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.