Search topics
Tap targets too small and too close together
A pointer target needs at least 24 by 24 pixels, or enough space that a 24-pixel circle around it touches nothing else. These icon buttons have neither.
width: 16px; height: 16px The problem
People with tremors, large fingers or an imprecise pointer press the wrong button, or miss it
A shopping basket shows each item on one line: "Linen napkins, Qty 2", then three icon buttons to decrease the quantity, increase it, and remove the item. The buttons are drawn at 16 by 16 pixels and sit 2 pixels apart. On a phone, a tap aimed at plus lands on remove often enough that the item disappears. With a mouse, the same row needs a careful, steady hand.
WCAG 2.5.8 Target Size (Minimum) asks for pointer targets of at least 24 by 24 CSS pixels. A smaller target still passes if a 24-pixel circle centred on it does not intersect another target or the circle of another undersized target. Here each button is 16 pixels and their centres are only 18 pixels apart, so the circles overlap and neither route passes. None of the exceptions apply: these are not links inside a sentence, there is no larger equivalent control on the page, and the size is a design choice, not something essential.
Anyone tapping with a thumb on a moving bus meets the same problem, and older users miss small targets more often too.
3 of 10 groups affected
- No vision (not affected)
- Low vision (affected)
- Colour vision (not affected)
- No hearing (not affected)
- Hard of hearing (not affected)
- No speech (not affected)
- Motor (affected)
- Reach, strength (affected)
- Cognitive (not affected)
- Seizures (not affected)
- Limited reach and strength People with tremors or limited fine motor control miss small targets. A missed tap that triggers the neighbouring action, like removing the item, costs work and trust.
- Limited manipulation People using a head pointer, eye tracking or a mouth stick need room to land on a target.
- Limited vision People with low vision hit small targets less often.
Size and spacing are geometry, so a scanner can measure them: axe-core's target-size rule flags this row. What it can't judge are the exceptions: whether a larger control for the same action exists elsewhere on the page, or whether the small size is essential. It measures the element's box, so it doesn't see a hit area extended with a pseudo-element. Automated click tests hit the exact centre of an element, so they never slip onto a neighbour. A generated design often shrinks icon buttons to match the text size, and the result looks tidy in a screenshot. A scan finds the small targets; measuring the hit areas and tapping with a real finger confirms the fix.
What the checkers report
- axe DevTools
- All touch targets must be 24px large, or leave sufficient space
- Lighthouse
- Touch targets do not have sufficient size or spacing.
- Tap targets are not sized appropriately (versions before 12)
Try it
Raise the quantity to 5 by tapping plus
Try it on a phone, or turn on Show target areas. Dashed circles that overlap mean a slip can press the neighbour, like remove.
Broken Can you fix this?
The fix
Give every tap target at least 24 pixels of room
<div class="line-actions"> <button type="button" aria-label="Decrease quantity">−</button> <button type="button" aria-label="Increase quantity">+</button> <button type="button" aria-label="Remove Linen napkins">×</button></div>What is wrong3 points
- The buttons are hard to hit. Each target is 16 by 16 pixels, below the 24-pixel minimum.
- A slip presses the neighbour, such as remove. The centres are only 18 pixels apart, where the spacing route needs 24, so a 24-pixel circle around each button overlaps its neighbour's circle.
- The row fails both the size and the spacing route.
Bigger buttons
<div class="line-actions"> <button type="button" aria-label="Decrease quantity">−</button> <button type="button" aria-label="Increase quantity">+</button> <button type="button" aria-label="Remove Linen napkins">×</button></div>How it is fixed3 steps
- Give each button a
min-widthandmin-heightof 32 pixels, comfortably above the 24-pixel minimum. The visible button is the whole hit area, so people can see how much room they have. - Add
flex-shrink: 0, which stops a narrow screen from squeezing the buttons back down. - Widen the gap to 4 pixels, so the buttons sit apart.
This fixes the Before and passes 2.5.8, and the HTML does not change.
Use bigger buttons. They do the same job as the larger hit area with less CSS and nothing invisible to break, and they also make the target easier to see, a step towards the 44-pixel size of 2.5.5. Keep the larger hit area for when the visible size is fixed, for example by a design system you can't change: it passes, but people still aim at a small shape, and because the area can't be seen, a later change to the gap can make areas overlap without anyone noticing. Spacing is the smallest change and stops wrong presses, but it is not enough on its own: the target stays small, so people with tremors still miss it more often, and the pass breaks as soon as a row or another control moves within reach of the circle.
Measure the hit area in CSS pixels, not the icon inside it: padding and pseudo-elements count, and margins do not. The 24 by 24 square has to fit inside the target, so rounded corners count against it: a 24-pixel circle is undersized, and a round button needs about 34 pixels across to pass on size alone. A pseudo-element that runs outside a parent with overflow: hidden is clipped, and so is its hit area. Do not let extended hit areas overlap a neighbour or a nearby link; where two areas overlap, the one on top wins, and the other target shrinks.
The criterion has exceptions: links inside a sentence, controls whose size the browser sets and you have not changed, and targets with an equivalent larger control on the same page. Do not rely on an equivalent hidden in a menu. In component libraries, set the minimum on the shared icon button, not on each use, so a new row cannot shrink it again.
Design ideas
A tidy basket line can still be easy to hit
Four ways to draw the basket line’s controls and the links near them. Point at each one: the fill that appears is the area that takes the click, and on the two that fail, dotted circles show the 24-pixel circles the spacing rule measures. Tab to them too, and press the buttons.
In the design file
- Draw buttons at their real size, at least 24 by 24 pixels. The guide’s fix uses 32 pixels, and 34 for a round button.
- When the clickable area is bigger than the icon, draw it as its own shape, such as a 28-pixel square around a 16-pixel icon.
- Keep at least 24 pixels between the centres of neighbouring buttons, including those in the rows above and below.
- Draw the row on a 320-pixel-wide screen, with the buttons still at full size.
Passes
Linen napkins 2 A quantity stepper pill The number sits in a soft pill between the two 36-pixel round buttons that change it, and remove is a 36-pixel circle of its own, each filled on hover. A round button needs 34 pixels across to hold the 24-pixel square, so 36 leaves room to spare.- A quantity menu and a Remove word No icon buttons at all: a 36-pixel-tall quantity menu in a soft pill, and Remove as an underlined word in a box 32 pixels tall that fills on hover, 12 pixels apart. Two wide targets replace three small ones, and a word can’t be mistaken for minus.
Fails
- A remove × on the photo’s cornerWCAG 2.5.8 A white 18-pixel circle perched on the corner of the product photo, which links to the product, so the 24-pixel circle around the button lands on another target: a slip opens the product page, or removes the item. Move it clear of the photo, or make it 34 pixels across.
- Page numbers that touchWCAG 2.5.8 Each number is a link 16 pixels wide and 20 tall, the current one a 20-pixel dot, and they touch, 16 to 18 pixels centre to centre, so every circle overlaps the next. A pager is a row of links, not a sentence: give each number 24 pixels, or space them out.
Verify the fix
4 checks.
Test with: Target measurement, Touch, Mouse, Zoom
Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared button styles change.
Limits
This is a starting pattern, not a guarantee for every application. 24 pixels is the minimum at level AA; 44 pixels, as in 2.5.5, is easier for most people, and tap targets smaller than 44 by 44 pixels takes this same row on to that size. The guide covers icon buttons in one row; grids, sliders and drag handles need their own checks. A target big enough to hit can still act on the wrong press: buttons that act on press and can't be cancelled covers taking a slip back. Test with the people and devices your users actually have.
This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.
EaseWeb service
Fixed it? Keep it from coming back.
I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.