Isidor SelectionCriteria before scores

Small Studio

Touch targets in puzzle grids: how big a grid fits a phone at 24 pixels per cell?

WCAG 2.2 asks for pointer targets of at least 24 by 24 CSS pixels. A table shows how large a square grid can be on example phone widths before its cells fall below that size.

A puzzle grid on a phone is a set of small buttons, and small buttons are where mistaken taps happen. WCAG 2.2 has a numeric criterion for this, which makes it easy to check.

The criterion

The W3C’s Understanding document for Success Criterion 2.5.8, Target Size (Minimum), a Level AA criterion, states that the size of the target for pointer inputs is at least 24 by 24 CSS pixels, with exceptions. It lists the exceptions as spacing (undersized targets positioned so that a 24-pixel circle centred on each does not intersect another target or circle), equivalent (another control that does the same job and meets the size), inline, user-agent controlled, and essential (where size and spacing are fundamental to the information, as with pins on a digital map).

CSS pixels are not device pixels; use the viewport width in CSS pixels that your browser reports.

The calculation

For a square grid with no gaps between cells that spans the screen width minus a side margin, cell size is (width - total margin) / n. We assume a 16 CSS pixel margin on each side, so 32 in total; that is our assumption, not part of the criterion.

Screen width (CSS px) Available width Largest grid with 24 px cells Cell size at 9 x 9 at 12 x 12 at 15 x 15 at 16 x 16 at 20 x 20
320 288 12 x 12 32.0 24.0 19.2 18.0 14.4
360 328 13 x 13 36.4 27.3 21.9 20.5 16.4
390 358 14 x 14 39.8 29.8 23.9 22.4 17.9
412 380 15 x 15 42.2 31.7 25.3 23.8 19.0

Cell sizes are the available width divided by the grid size, rounded to one decimal. The largest grid is the available width divided by 24, rounded down (288 / 24 = 12; 328 / 24 = 13.7; 358 / 24 = 14.9; 380 / 24 = 15.8).

What this shows

  • A 9 by 9 grid is comfortable on every width in the table, at 32 to 42 pixels per cell.
  • A 15 by 15 grid fails the 24-pixel size on the three narrower widths (19.2, 21.9 and 23.9) and passes only at 412.
  • A 20 by 20 grid does not reach 24 pixels on any of these widths, so on a phone it needs zooming, scrolling or a different input method. Cells that are smaller than 24 pixels and touch each other cannot rely on the spacing exception, because the circles of neighbouring cells overlap.

Ways studios meet the criterion

  1. Let the player zoom the grid or scroll it, so that cells reach the target size.
  2. Provide a cursor or selection mode, where the player moves a highlighted cell with larger controls. The “equivalent” exception in the criterion describes such an alternative, which must meet the size requirement.
  3. Limit grid size on small screens.
  4. Whichever you choose, explain it in the game’s help text.

How to check a game

  1. Open the game on a phone, or in a browser’s device mode with the screen width set to 360.
  2. Count the cells across the grid, and measure the grid’s width in CSS pixels with the browser’s inspector.
  3. Divide width by cell count. If the result is below 24, check whether an exception applies.
  4. Record the numbers in the judging notes. This tests one criterion only and does not cover other touch problems such as accidental taps near edges.

Sources

Written for: A small studio or judge wants to know whether a tap-based puzzle grid is large enough on a phone, with a simple calculation that can be checked without special tools.

AI assistance recorded as: AI draft, not edited. Review status: approved.