Small touch targets cause frustration for users with motor impairments, large fingers, or anyone using a mobile device in a hurry.
Interactive elements like buttons, links, or form controls are too small or too close together. WCAG 2.2 requires touch targets to be at least 24x24 CSS pixels, with the enhanced requirement being 44x44 pixels. When targets are smaller or overlap, users struggle to activate the right element.
Run this in Console to find undersized targets:
document.querySelectorAll('a, button, input, select, textarea, [role="button"]').forEach((el) => {
const rect = el.getBoundingClientRect()
if (rect.width < 24 || rect.height < 24) {
console.log(`${el.tagName}: ${rect.width.toFixed(0)}x${rect.height.toFixed(0)}px`, el)
}
})
The simplest fix adds padding to reach minimum size:
/* Before: Small tap target */
.icon-button {
padding: 4px;
}
/* After: Accessible tap target */
.icon-button {
padding: 12px;
min-width: 44px;
min-height: 44px;
}
For buttons and links, enforce minimum dimensions:
button,
a,
[role="button"] {
min-height: 44px;
min-width: 44px;
}
/* For inline links, ensure adequate line-height */
a {
padding: 8px 0;
display: inline-block;
}
When targets are close together, add margin:
.button-group button {
margin: 4px;
min-height: 44px;
min-width: 44px;
}
/* Or use gap with flexbox */
.button-group {
display: flex;
gap: 8px;
}
<template>
<!-- Use min-h and min-w utilities -->
<UButton class="min-h-11 min-w-11">
<UIcon name="i-heroicons-heart" />
</UButton>
<!-- For icon-only buttons, ensure adequate size -->
<button class="p-3 min-h-[44px] min-w-[44px]">
<span class="sr-only">Like</span>
<UIcon name="i-heroicons-heart" />
</button>
</template>
For React with styled-components or CSS modules:
const IconButton = styled.button`
min-height: 44px;
min-width: 44px;
padding: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
`
padding: 8px 0 with display: inline-block.Target size issues often appear alongside:
Touch target issues multiply across sites with repeated UI patterns like navigation, footers, and card layouts. Unlighthouse audits every page on your site, helping you identify which templates and components need attention rather than checking pages one by one.