Skip to content
Andrew Hick edited this page Nov 8, 2024 · 16 revisions

2.5.8 Target Size (Minimum)

The size of the target for pointer inputs is at least 24 by 24 CSS pixels, except where:

  • Spacing: Undersized targets (those less than 24 by 24 CSS pixels) are positioned so that if a 24 CSS pixel diameter circle is centered on the bounding box of each, the circles do not intersect another target or the circle for another undersized target;
  • Equivalent: The function can be achieved through a different control on the same page that meets this criterion;
  • Inline: The target is in a sentence or its size is otherwise constrained by the line-height of non-target text;
  • User agent control: The size of the target is determined by the user agent and is not modified by the author;
  • Essential: A particular presentation of the target is essential or is legally required for the information being conveyed.

When this is applicable

When there are interactive elements (targets) that can be used with a pointer.

If content is hidden but can be shown (for example within a menu), you will need to make sure to include it in your testing.

Check target size and spacing

Check targets are at least 24 pixels wide and 24 pixels high.

For any smaller targets, check that the centres of all targets are at least 24 pixels away from each other.

If the space between smaller targets is not obvious, a way to check precisely is to:

  1. draw rectangles just big enough to contain each element
  2. draw 24 pixel diameter circles at the centres of those rectangles
  3. check that there is no overlap between those circles

You can also try the following methods.

Check with bookmarklets

The Target Size Bookmarklet from Steve Faulkner helps to quickly identify visually whether a component is likely to overlap with another component. It shows a green circle with a darker green border for any targets that are at least 24 by 24 pixels, and a purple circle for any smaller targets. Where any circles overlap, and none of the exemptions apply, the success criterion fails.

An alternative that does not rely on colour to communicate results is the 24x24 circle cursor bookmarklet from Adrian Roselli. This method is more manual.

Other ways to check

  • Use the select tool in your browser's inspector to help identify the dimensions and spacing of each element. For example, in Chrome, this is the arrow icon at the top of the DevTools window.
  • Measure the spacing by taking a screenshot at 100% zoom and checking the distance between the centre of adjacent components in an image editing application.
  • A further alternative is the Web Developer toolbar, which includes a ruler and other tools: open the toolbar and select Miscellaneous > Display Ruler.

Exceptions

It's not a fail if:

  • there's an equivalent control elsewhere which meets this criterion
  • two areas overlap but carry out the same function - they should be considered as the same target and pass this criterion (for example, a checkbox and its label would count as a single target)
  • the target is within text (not counting punctuation)
  • the target size is set by the browser
  • the target size is essential, for example interactive data points in a graph
  • there is a single input where the value changes depending on how you interact with it, like a gradient colour picker or slider (<input type="range">)

Best practice

Mobile app testing

There are different ways you can test target size on mobile apps.

Automatically detect sizes on Android

On Android, target sizes can be tested using the accessibility scanner, which detects elements below 48x48 pixels (dp). If an element's size is smaller than this then it will mention the dimensions.

Check sizes manually with other software

If you need to check sizes manually, you can also:

  • take screenshots and review the images on a desktop, using an image editing application
  • use accessibility inspector tools such as Xcode or Android Studio - 24 CSS pixels is roughly the same as the equivalent device units (24pt on iOS and 24dp on Android)

Be careful when using screenshots: pixel density varies on mobile devices, so the number of pixels in a screenshot may not match the number of pixels on screen.

You will need to take into account the pixel density in order to match the number of pixels on screen with the number of device pixels. Look up the dimensions of your device to work out the ratio you need to zoom to. For Apple devices you can refer to the Apple Layout Guidelines.

Measure the physical screen

If the target size cannot be detected using software then the physical screen can be measured as follows:

Example pagination components tested against Success Criteria 2.5.8

Passes Level AAA with Android recommended 48px touch targets

An example pagination component comprising 6 large touch targets to move between pages

Passes Level AAA
with Apple recommended 44px touch targets

The same component comprising 6 slightly smaller but still large touch targets

Passes Level AA with 24px touch targets

The same component comprising 6 medium size touch targets with space between each target

Passes Level AA with adjacent 24px touch targets

No horizontal separation between targets is required in this Success Criteria

The same component comprising 6 medium size touch targets without space between each target. Targets are in an alternating colour to show the region they cover

Passes Level AA with 18px touch targets

As each target is in 24px of space horizontally and vertically, this design conforms with the Success Criteria

The same component with small touch targets. Red rings demarcate 24px of space, showing each target is separated from the next by the minimum space required in the success criteria

An example design that fails Level AA

Links require at least 24px separation vertically and horizontally unless they are part of text.

A redesigned component with very small touch targets. Red rings demarcate 24px of space, showing each target is not separated enough from the next link, meaning the links in the component fail the success criteria

Clone this wiki locally