IntermediateLesson 7 of 126 min read

Designing for Thumbs: Touch Targets, Spacing and a Mobile Audit

Make controls easy to hit on a phone by following touch-target size guidance, check the sizes in a page automatically with a DOM audit, and compare the results with an independent parse of the style sheet.

In this lesson you will

  • Apply touch-target size guidance
  • Keep spacing between targets
  • Place key actions in thumb reach
  • Audit target sizes automatically

About 28 minutes

Fingers are not mouse pointers

Most of Still Water Yoga’s bookings come from phones, used with one thumb, often while walking. A mouse pointer is a single pixel, and a fingertip covers an area of about 10 millimetres wide, so controls that work on a desktop can be frustrating on a phone. Guidelines from platform makers suggest targets of at least about 44 by 44 points on iOS and 48 by 48 density-independent pixels on Android, and the accessibility guidelines require at least 24 by 24 CSS pixels at level AA, with space around smaller ones, and recommend 44 at the stricter level. These are minimums: the most important target, the booking button, should be larger.

Size is only half of it. Targets also need space between them, since a mis-tap that hits the neighbour is as bad as a miss: the cancel button must not sit next to the confirm button with no gap. Finally, where things are matters. On a large phone held in one hand, the thumb reaches the lower middle of the screen easily, and the top corners with difficulty, so frequent actions belong low and in reach, and destructive ones away from where a thumb rests. A design review can check sizes automatically, since a script can read the width, height and padding of each control and flag those that are too small, which is what the audit below does.

Source Minimum target
WCAG 2.2 level AA 24 x 24 CSS px (or spacing)
WCAG 2.x enhanced level 44 x 44 CSS px
Apple guidance 44 x 44 points
Material guidance 48 x 48 dp
Gap between targets At least 8 px (common practice)
const { JSDOM } = require('jsdom');
const dom = new JSDOM(`<!doctype html><html><head><style>
button, a.btn, input { box-sizing: border-box; }
.book { width: 100%; height: 56px; }
.icon { width: 24px; height: 24px; padding: 0; }
.icon-pad { width: 24px; height: 24px; padding: 10px; }
.link { display: inline-block; padding: 4px 8px; font-size: 16px; line-height: 24px; height: 32px; }
.close { width: 44px; height: 44px; }
.small { width: 20px; height: 20px; }
</style></head><body>
<button class="book">Book a class</button>
<button class="icon" aria-label="Menu"></button>
<button class="icon-pad" aria-label="Search"></button>
<a class="btn link" href="/timetable">Timetable</a>
<button class="close" aria-label="Close"></button>
<button class="small" aria-label="Info"></button>
</body></html>`);
const w = dom.window, d = w.document, px = v => parseFloat(v) || 0;
const items = [...d.querySelectorAll('button, a')].map(el => {
  const c = w.getComputedStyle(el);
  const width = px(c.width) , height = px(c.height);
  const boxW = c.boxSizing === 'border-box' ? width : width + px(c.paddingLeft) + px(c.paddingRight);
  const boxH = c.boxSizing === 'border-box' ? height : height + px(c.paddingTop) + px(c.paddingBottom);
  return { name: el.getAttribute('aria-label') || el.textContent.trim(), cls: el.className, w: boxW, h: boxH, aa: boxW >= 24 && boxH >= 24, enhanced: boxW >= 44 && boxH >= 44 };
});
items.forEach(i => console.log(i.name.padEnd(14), (i.w + ' x ' + i.h).padEnd(10), i.aa ? 'AA ok  ' : 'too small', i.enhanced ? 'enhanced ok' : ''));
console.log('DATA ' + JSON.stringify(items));
Book a class   100 x 56   AA ok   enhanced ok
Menu           24 x 24    AA ok   
Search         24 x 24    AA ok   
Timetable      0 x 32     too small 
Close          44 x 44    AA ok   enhanced ok
Info           20 x 20    too small 

The audit read the computed width and height of every button and link of a small page and compared them with the two thresholds. The booking button is 56 pixels high and as wide as its container, comfortably above 44. The close button is exactly 44 by 44, which passes the enhanced level. The menu and search icons are 24 by 24 pixels, which meets the AA minimum and falls short of 44: the search icon had 10 pixels of padding, but because the box-sizing is border-box the padding sits inside the 24 pixels and does not make it larger, a common misunderstanding. The timetable link is 32 pixels high, which passes AA and not the enhanced guidance. And the info button, at 20 by 20, fails even the minimum: Timetable, Info.

To fix the weak ones without changing the look, designers enlarge the hit area while keeping the icon small: an icon of 24 pixels inside a button of 44 pixels, with padding around it, or a transparent pseudo-element that extends the clickable area. The fix for the info button is to size it at 44 by 44 and keep its icon at 20. Whatever the method, check that neighbouring targets do not overlap, and leave at least 8 pixels between them.

Independent check: the sizes were also derived in Python by parsing the style sheet text and reading the declared width and height of each class, and for all the fixed-size controls they agree with the sizes the DOM reported. The result lists are the same: too small [‘Timetable’, ‘Info’], below the enhanced size [‘Menu’, ‘Search’]. The audit sees only declared sizes. A real device, a finger and a user are the final test, and you should try your page on a phone with one thumb.

Check by hand with the search icon: width 24, height 24, border-box, so the box is 24 by 24 whatever the padding of 10, which is 20 pixels left over for the icon, 4 pixels wide. With content-box sizing the padding would add 20 to each dimension and give a 44 by 44 button, so the same CSS declaration behaves differently under different box-sizing rules, which lesson 4 of the Front-end course explains.

Do not hide small targets close together

A row of tiny icons spaced 2 pixels apart is a mis-tap generator. Space and size matter together: more space can compensate for a smaller target, but not for a tiny one.

Put the main action in the thumb zone

On a phone, a fixed “Book” button at the bottom of the screen is easier to reach than one in the top corner, and it is always visible. Keep it clear of the system gesture area.

About this course

Every calculation in this lesson was run while the course was written, in JavaScript (Node.js 22) and checked independently in Python 3.13 (and, where it says so, with real files). Design guidelines are rules of thumb and tools change, so check current documentation, and test your own designs with real people. Guidance numbers come from the platform and accessibility guidelines at the time of writing. They change, so check WCAG, Apple and Google documentation for the current values.

Practice

Audit your own site’s buttons with the browser developer tools and list those below 44 pixels. Redesign the info button with a larger hit area. Move the main action of a page to the lower half and test with one thumb.

Check what you learned

Five quick questions. Pick an answer and you will see straight away whether it is right and why.

What is the common minimum touch target size in platform guidance?

  1. 10 pixels
  2. 100 pixels
  3. 1 pixel
  4. About 44 to 48 pixels

WCAG AA requires 24 CSS pixels as a floor.

Why do targets also need spacing?

  1. It looks nicer only
  2. CSS requires it
  3. A mis-tap on a neighbour is as bad as a miss
  4. Phones need it

At least about 8 pixels.

Where does a thumb reach most easily on a large phone?

  1. The top corners
  2. The very top
  3. The lower middle of the screen
  4. The edge only

Put frequent actions there.

What does border-box do to a 24px button with 10px padding?

  1. The box becomes 44 pixels
  2. The box stays 24 pixels
  3. The padding disappears
  4. The box becomes 14

The padding sits inside.

How can you enlarge a hit area without changing the look?

  1. Remove the icon
  2. Bigger box or pseudo-element around a small icon
  3. Change the colour
  4. Use a smaller font

Keep the icon small and the target large.

Summary

  • Fingers need targets of about 44 to 48 pixels, with space around them.
  • Place frequent actions where the thumb reaches.
  • Audit declared sizes automatically, and test on a real device.
  • Enlarge the hit area, not necessarily the icon.

Next lesson

Lesson 8 covers usability laws: Fitts and Hick.

Questions

Do these sizes apply to links in text?

Inline links in a sentence are exempt from some size rules, though they still need to be usable. Navigation links and buttons should meet the sizes.

How do I test on real devices?

Use a real phone, and ask someone who does not know the site to complete a task while you watch. Device emulation in the browser helps with sizes but not with fingers.

What about tablets and desktops?

The same targets are comfortable for mice too. Many people use touch screens on laptops, so design every size with touch in mind.

Progress is saved in this browser.