Measure the page the reader gets
4 November 2026 · Testing & verification · the engineering team
The story
Our public sites each have a browser smoke test: the main site, the blog and the docs. We added measurements to them. Each site has two pages measured, in light and dark, at a phone size of 390 by 844 and a desktop size of 1280 by 800. The checks are contrast, touch target size, overdraw, no horizontal scroll, and a page that still fits with the root font size set to 32 pixels. The measuring code and its budgets are copied from the shared UI library's own tests. Each check is its own test for each page, colour scheme and size.
The first run found problems in our own pages. The blog's category links, its post title links and the featured card link on the main site were too small to tap, and now reach 44 pixels. The step and layer numbers now take the foreground ink colour. The prototype panel grid and the document headings pushed the page wider than the screen at a 32 pixel root, and no longer do. Reds that trace to the shared library are not ours to fix. We mark each one as a skipped test that names its finding, and an environment switch runs them anyway. Because each check is its own test, a parked red parks only the check it fails. The other four checks keep measuring that page.
Then the measure itself needed the same scrutiny. The touch check counted links inside sentences, which WCAG's target size guidance exempts, so we left inline links in prose out of it. It also measured a card link by its text box, when the link stretches over the whole card through a pseudo-element. We now measure that link by the card's box, the area the reader can actually tap. With both changes the touch check runs unparked on every page, and the two filed findings for those cases became notes to the library about its measure. The copied helper's own notes record a related lesson: a navigation bar measured mid-transition read 2.9 to 1, and 6.59 to 1 once its colours settled. The helper now waits for repeated readings to agree and for animations to stop before it measures.
The pattern
A design says what the page should look like. A browser says what it paints. Contrast, tap size, one element drawn over another and a sideways scrollbar are facts about the paint, so they are computed in the page, from the colours and boxes the browser reports, at the sizes and schemes readers use.
A measurement can be wrong in either direction. It can fail the page for something the reader does not experience, or pass a page the reader struggles with. When the measure disagrees with the reader, change the measure, and change it by a stated rule, not by skipping one element by name. Keep the budgets in one place, so every site is held to the same numbers.
Try it
Pick one page and write down the numbers it should meet: a contrast ratio for text, a minimum tap size, no sideways scroll. Load it in a real browser in light and dark at a phone width and a desktop width, and compute each number from the rendered page. Wait until the colours stop changing before you read them. For each failure, decide whether the page or the measure is wrong. If it is the page, fix it. If it is the measure, change the rule and write the reason next to it.