# Test the hit area, not just the button art

> Make game controls easier to hit by separating visual artwork from interactive bounds and checking size, spacing and overlap on touch devices.

- URL: https://oneshotgems.ai/topics/game-touch-targets
- Category: For game developers
- Type: Guide
- Updated: October 5, 2026

A control can look large while its actual hit region is a tiny part of the artwork. In a browser game, define the interactive bounds deliberately and test them with a finger, not only a precise mouse pointer. The right target depends on its role, spacing and surrounding motion, but clear hit regions reduce accidental misses and make input easier to reason about.

## Separate visible shape from hit region

For a small icon such as a pause button, let the clickable container extend beyond the painted symbol. Keep neighboring actions far enough apart that a finger does not activate both ambiguously. In a canvas game, draw the object and calculate its hit region from the same layout data; duplicating coordinates in separate code paths invites drift.

WCAG 2.2 Success Criterion 2.5.8 uses 24 by 24 CSS pixels as a minimum with defined exceptions, including spacing and equivalent controls. Evaluate it as an accessibility requirement, not a design ceiling: a moving target or primary action may need more area. Do not rely on color or a subtle border alone to show where touch registers.

## Check hit testing at real screen sizes

Test taps near each edge and corner, between adjacent controls and while the play surface scales. Confirm that the visible control, DOM hit region and game-world coordinate refer to the same action. For tiny moving objects, consider forgiving hit testing that is larger than the art while still preserving meaningful separation from hazards.

Test different viewport sizes with touch. A mouse can land where a finger cannot. Convert pointer positions into the surface’s coordinate system and verify after resizing. W3C’s explanation documents the criterion and exceptions.

## Questions

**Should every game target be at least 24 pixels?** WCAG 2.2 Success Criterion 2.5.8 defines a 24 by 24 CSS pixel minimum with exceptions. A game should evaluate the criterion and choose larger hit areas when its context needs them.

**Can a hit area be larger than its artwork?** Yes. A padded interactive region can make a small icon easier to activate, provided overlapping controls still have clear, predictable outcomes.

## Follow your curiosity

- [Design Touch Controls for Web Games](https://oneshotgems.ai/topics/touch-controls-for-web-games): Plan touch interaction around browser gestures, readable feedback and deliberate pointer state so a game responds predictably on phones.
- [Build Responsive Layouts for Browser Games](https://oneshotgems.ai/topics/responsive-game-layouts): Adapt a game surface to its container without tying simulation state to screen dimensions, and test the layout across changing viewports.
- [Design a Mobile Game for One-Thumb Play](https://oneshotgems.ai/topics/one-thumb-mobile-game-design): Reduce one-thumb play to a workable action set, account for hand position and screen occlusion, then test the mechanic in realistic grips.

## Further reading

- [W3C: Target Size (Minimum)](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum)
- [MDN: Pointer events](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events)

---
Canonical page: https://oneshotgems.ai/topics/game-touch-targets
