Sub topic 10
Sizing and spacing interactive targets
This chapter assumes you know how to read a wireframe, you have used common components such as buttons, links and form controls, and you can read basic CSS. It covers the size and spacing of the things people click, tap and press, and how to specify them before visual design begins.
Why target size is a wireframe decision
A target is any area that responds to a pointer: a button, a link, a checkbox, a tab or an icon control. Small or crowded targets cause missed taps and accidental activations. They affect people with tremors, limited dexterity or low vision. They also affect anyone using a phone one-handed on a bus, or a trackpad in a cramped seat.
Size and spacing are structural. If a wireframe packs ten icon buttons into a toolbar with no gaps, a developer cannot fix that later without changing the layout. Deciding it at the wireframe stage costs far less. Target size follows from the keyboard work in the previous chapters, because the same controls need to be both reachable by keyboard and large enough to hit with a pointer.
What WCAG 2.2 requires
WCAG 2.2 has two target size criteria.
| Criterion | Level | Requirement |
|---|---|---|
| 2.5.8 Target Size (Minimum) | AA | Targets are at least 24 by 24 CSS pixels, or have enough spacing around them |
| 2.5.5 Target Size (Enhanced) | AAA | Targets are at least 44 by 44 CSS pixels |
A CSS pixel is a unit that browsers scale with the device, so it is not a physical screen pixel. Measure your wireframe in CSS pixels, not in the pixel density of your design tool's export.
The AA criterion has exceptions. A target under 24 pixels still passes when one of these holds:
- Spacing. A 24 CSS pixel diameter circle centered on the target's bounding box does not intersect another target or another target's circle.
- Equivalent. The same function is available through another control on the page that does meet the size.
- Inline. The target sits inside a sentence or block of text, such as a link in a paragraph.
- User agent control. The browser determines the size, as with a default checkbox you have not restyled.
- Essential. A particular presentation is legally or functionally required.
The spacing exception is the one designers use most. It lets you keep a compact row of small icons if each is surrounded by enough clear space.
Size versus spacing
Size is the clickable area. Spacing is the empty distance between neighboring targets. They trade off against each other, which is why the exception exists.
Consider a 16 pixel icon button. With no spacing it fails. If you surround it with enough clear space that a 24 pixel circle around it touches nothing else, it passes. You can reach the same pass by enlarging the clickable area to 24 pixels while keeping the 16 pixel icon drawn inside it.
That second approach is usually better. The visible glyph stays small, the hit area grows, and nobody mis-taps into a neighbor.
Specifying hit area apart from the visible shape
Wireframes usually show the visible shape. The hit area is the region that responds, and it can extend past the shape. When you draw a small icon, annotate the hit area separately, for example "icon 16 px, hit area 44 by 44 px".
Developers can then implement this with padding, so the visible design stays the same.
.icon-button {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 44px;
min-height: 44px;
padding: 0;
background: transparent;
border: 0;
}
.icon-button svg {
width: 16px;
height: 16px;
}
.toolbar {
display: flex;
gap: 8px;
}Here the icon stays 16 pixels, the button is at least 44 by 44, and the toolbar adds an 8 pixel gap. Padding on the control extends the hit area. Margin does not, because margin is outside the element and does not respond to clicks.
Inline links and text
Links inside a paragraph are exempt from the minimum, because the line height and wrapping of text are hard to control. This exemption does not cover standalone links, such as a list of links in a footer or a row of tags. Those are separate targets and must meet the size or the spacing rule.
A practical approach is to give list-style links vertical room:
- Use a line height of at least 1.5 for link lists.
- Add padding above and below each link so rows are at least 24 pixels tall, and 44 where touch is likely.
- Avoid placing a small link right beside a button.
Common problem areas
Check these first when you review a wireframe.
- Icon-only toolbars. Edit, copy and delete icons placed side by side are a frequent failure. Delete next to copy also raises the cost of a mis-tap.
- Checkboxes and radio buttons. The box is small. Make the label part of the target, so the whole row responds. The label is also a persistent visible name, which the forms chapter covers.
- Close buttons on dialogs and banners. These are often drawn at 12 to 16 pixels in a corner. Enlarge the hit area.
- Pagination and calendar cells. Dense grids of numbers need both size and gaps.
- Table row actions. Compact tables put several actions in one row. Consider a single "More actions" menu button with a larger target.
- Sliders and drag handles. Provide a handle of at least 24 pixels. Provide a non-dragging alternative too, because WCAG 2.2 criterion 2.5.7 (Dragging Movements, AA) requires a way to operate drag interactions with a single pointer without dragging.
- Targets near screen edges. On touch devices, controls pressed against the edge are hard to hit. Keep some margin.
Spacing and error cost
Where a mis-tap is expensive, add more room than the minimum. A "Delete account" button should not sit tightly beside "Save". Increase the gap, give the destructive action a different position or style, and require confirmation. Larger gaps reduce errors for everyone, and they help people who hit controls imprecisely.
Keep related targets grouped and unrelated ones separated. Consistent spacing also helps people scanning by eye.
Interaction with other requirements
Target size connects to other parts of your design:
- Focus visibility. A larger target gives the focus outline more room. The outline should not be clipped by a container with hidden overflow.
- Reflow and zoom. At 400 percent zoom, targets grow with the page. Fixed-height rows can still crowd, so test them.
- Hover-only controls. Controls that appear only on hover cannot be reached by touch or tab order, so show them persistently or reveal them on focus too.
- Pointer cancellation. Activate on release, not on press, so a user can slide away from a wrong target before letting go. This is WCAG 2.5.2.
Annotating target sizes
Add a short note on each wireframe region that has dense controls. A useful annotation names the element, the hit area and the gap:
- "Row actions: 3 icon buttons, hit area 44 by 44 px, 8 px gap."
- "Close button: icon 16 px, hit area 44 by 44 px, top-right, 8 px from the edge."
- "Checkbox rows: label and box share one target, row height at least 44 px."
Without these notes, a developer sees only the drawn icon and sizes the button to match.
Checking early
You can check targets on a low-fidelity wireframe with a simple method. Draw the control at real scale in your tool, set the frame to a real device width and look at the numbers. Then, for each small control, ask whether the hit area is at least 24 pixels square, or whether a 24 pixel circle around it is clear of its neighbors.
A quick table in your annotations helps:
| Control | Visible size | Hit area | Gap to neighbor | Result |
|---|---|---|---|---|
| Close icon | 16 by 16 | 44 by 44 | 8 px | Pass |
| Row delete icon | 16 by 16 | 16 by 16 | 4 px | Fail |
| Pagination number | 20 by 20 | 32 by 32 | 4 px | Pass |
The failing row needs a bigger hit area or more space. A real phone test later confirms what the numbers suggest.
Exercise
A toolbar in your wireframe has three icon buttons, each drawn 20 by 20 CSS pixels with a 2 pixel gap between them. Does it meet WCAG 2.2 Target Size (Minimum), and how would you fix it without changing the icon size?
Show answer
It fails. Each target is under 24 pixels, and with a 2 pixel gap a 24 pixel circle around each icon would overlap its neighbors, so the spacing exception does not apply. Keep the 20 pixel icons and enlarge each button's hit area with padding to at least 24 by 24 pixels, preferably 44 by 44 for touch. Annotate this as "icon 20 px, hit area 44 by 44 px". Increasing the gap also works, but the larger hit area is the more robust fix.
Exercise
A designer says the "Remove" link in each row of a table is fine because links in text are exempt from the size rule. Is the designer right?
Show answer
No. The inline exception covers links inside a sentence or block of text. A standalone "Remove" link in a table cell is its own target, so it must be at least 24 by 24 CSS pixels or have enough spacing from other targets.