Repository navigation
Web HIG tip #12: Make targets big enough to hit #27
frozonfreak
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Open your site on a phone and try to tap the "×" that closes a banner, the edit icon in a table row, or the second of three pagination numbers. If you hit the wrong one, or have to zoom in first, the target is too small. People with tremors, limited dexterity, or a phone in one hand on a moving bus miss it much more often.
Web HIG tip #12 (Quick #75 / HIG-A11Y-007): Interactive targets MUST be at least 24×24 CSS px. Primary touch actions SHOULD use 44×44 CSS px.
Why it matters
A target is the area that responds to a click or tap, not the icon you can see:
The full HIG covers this in §5.4, Target Sizes, and it separates two levels on purpose. 24×24 CSS px is the MUST (HIG-A11Y-007, severity error), aligned with WCAG 2.2 Success Criterion 2.5.8 Target Size (Minimum), Level AA. The WCAG-defined exceptions apply, and the HIG does not redefine them. 44×44 CSS px is a SHOULD, an ergonomic recommendation for primary touch actions. It is not a WCAG AA floor and is not part of HIG-A11Y-007 enforcement, so a 32px secondary button is not a defect. Quick #20 is the companion rule: targets must not overlap in ways that cause mis-taps.
The rule of thumb
Ask: if I tap the middle of the gap between two controls, do I know which one I'll get?
Grow the hit area, not the icon. Padding is usually all it takes.
The visible icon stays the same size. The button around it grows, and that is the part that receives the tap.
Do this instead
<button>or<a>, not the<svg>inside itmin-inline-size/min-block-sizeto reach 24×24, and aim for 44×44 on primary touch actions such as submit, add to cart, and the main navigation toggleIconButton,Chip,Pagination) so every use inherits it, and use your spacing tokens rather than one-off pixel values (Quick #63)Quick check for your app
Open a page on example.com in your browser's device mode, or on a real phone. Inspect each icon button, close control, chip, and pagination link, and read the box size of the element that has the click handler. Anything under 24×24 needs more size or more space around it. Then try the primary actions with your thumb, one-handed: those are the ones that should reach 44×44. A tool can measure boxes, but only trying it tells you whether the controls are easy to hit.
The Web HIG is an open set of guidelines for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.
All reactions