New Tool Radar

AI Design Workflows

How to Check Touch Target Sizes in an AI-Assisted Interface

Check every touch target in an AI-assisted interface against the 24 by 24 CSS pixel minimum, and check the spacing between targets that are smaller, before you ship it.

Schematic diagram: three steps to check touch target sizes — measure each target, check the gaps, fix the fails — with a practice result of 4 of 6 targets passing and 2 failing.

Check the touch target sizes in an AI-assisted interface by listing every button, link, and icon, measuring each target, and comparing it with the 24 by 24 CSS pixel minimum. For targets smaller than that, check the spacing around them instead: a small target can still pass if it has enough clear space around it.

Small, crowded targets cause real mistakes. The W3C page for this rule puts the problem plainly: “Some people with physical impairments cannot click small buttons that are close together.” Its intent is that targets can be easily activated without accidentally activating an adjacent target.

Schematic diagram: three steps to check touch target sizes — measure each target, check the gaps, fix the fails — with a practice result of 4 of 6 targets passing and 2 failing.

What counts as passing

The W3C rule, Success Criterion 2.5.8 Target Size (Minimum), states that the size of the target for pointer inputs is at least 24 by 24 CSS pixels. There are five exceptions, and the one that matters most for this check is spacing: an undersized target, smaller than 24 by 24 CSS pixels, passes if a 24 CSS pixel diameter circle centred on its bounding box does not intersect another target or the circle of another undersized target.

The same page gives two worked examples for a row of icon buttons: targets of 20 by 20 CSS pixels with a 4 CSS pixel space between them pass, because the 24 pixel circles touch but do not cross; the same 20 by 20 targets with no space between them fail, because the circles intersect. The page also notes a stricter mark, 44 by 44 CSS pixels, under Success Criterion 2.5.5 Target Size (Enhanced), which is a higher level to aim for, not the minimum.

The practice design and the check table

Use a fictional order page for the exercise. The fictional brand is Maple Corner, a small cafe at 12 Maple Lane that does not exist. Its order page has six targets: an Order button, a Menu icon, a Share icon, a Close button, a Help icon, and a footer link in a sentence. Nothing in the table comes from a real client design.

How the table was worked out

Each target was measured in CSS pixels against the 24 by 24 minimum. For undersized targets, the check is the spacing test from the W3C page: draw a 24 pixel diameter circle centred on each target and see whether the circles cross another target or another circle. The footer link is judged under the inline exception, which covers targets in a sentence whose size is constrained by the line height of the surrounding text.

Target Size Gap to nearest target Result
Order button 48 by 48 CSS pixels No neighbour Pass — larger than the 24 by 24 minimum.
Menu icon 24 by 24 CSS pixels No neighbour Pass — meets the 24 by 24 minimum exactly.
Share icon 20 by 20 CSS pixels 4 CSS pixels to the Menu icon Pass — the 24 pixel circles touch but do not cross, as in the W3C example.
Close button 16 by 16 CSS pixels 2 CSS pixels to the Help icon Fail — the 24 pixel circles centred on the two targets overlap, so a tap can hit the wrong one.
Help icon 16 by 16 CSS pixels 2 CSS pixels to the Close button Fail — the same overlap fails this target too; one gap fails both targets in the pair.
Footer link “Privacy” 16 CSS pixels high, in a sentence Text on both sides Pass — inline exception: the size is constrained by the line height of the sentence.

Read the table row by row. Four targets pass and two fail, and both failures are the same pair: the Close button and the Help icon sit 2 CSS pixels apart, so their spacing circles overlap and each fails. The Share icon shows the other side of the rule: at 20 by 20 it is undersized, but its 4 pixel gap is enough for the circles to clear, so it passes.

How to fix a failing row

Enlarge the target

Make the target at least 24 by 24 CSS pixels. In the practice table, enlarging the Close button and the Help icon to 24 by 24 would fix both rows at once, with no change to the spacing.

Add space between targets

If the target must stay small, move its neighbours away until the 24 pixel circles no longer cross. A 16 by 16 target needs its centre at least 24 pixels from the centre of the next undersized target.

Leave inline links alone

Do not enlarge links inside sentences to 24 pixels high; the inline exception covers them, and stretching sentence text makes the page harder to read. Fix the buttons and icons, not the sentence links.

Limits

The check covers only the six targets listed on this one practice page. It does not cover keyboard use, which is a separate check, and it does not cover how targets behave when the page is zoomed: the W3C page states the requirement is independent of zoom, because the CSS pixel size of elements does not change when users zoom in. Expected result. We checked the W3C Understanding page for Success Criterion 2.5.8. We did not run a browser or a measuring tool on the Maple Corner order page.

Sources

  • W3C, Understanding Success Criterion 2.5.8: Target Size (Minimum) — https://w3c.github.io/wcag/understanding/target-size-minimum — states the 24 by 24 CSS pixel minimum, the spacing exception with 24 pixel diameter circles, the 20 by 20 examples with a 4 pixel gap passing and no gap failing, and the 44 by 44 enhanced mark.
See all