AddThisFeature

Touch Target Checker

Find the controls that are too small or too crowded to hit reliably on a phone.

moderate Accessibility & Internationalization

What it adds

A development-time audit reporting the measured hit area and neighbour spacing of every interactive element.

What your agent is told to do

5
  1. 1

    Measure the element's actual activation area — the region that responds to a tap — rather than the icon or glyph drawn inside it, since padding and pseudo-element extensions frequently make a small icon a perfectly adequate target.

  2. 2

    Check the gap between adjacent targets as well as their size. Two comfortable buttons sitting flush against each other still produce mis-taps, and the report must say which of the two problems it found.

  3. 3

    Report the offending elements with enough context to locate them — the route, the component, and a way to highlight the element on the page — rather than a count of failures.

  4. 4

    Evaluate at touch-capable viewport sizes and pointer modes. Desktop layouts are allowed to be denser, and flagging every compact desktop toolbar produces a report nobody reads.

  5. 5

    Do not flag decorative or non-interactive elements, and do not flag controls that are duplicated by a larger target covering the same action. A checker that reports hundreds of false positives gets switched off within a week.

Edge cases it handles

7
  • The measurement must be of the real hit area including padding and any invisible extension, not the rendered icon, or every well-built icon button is reported as a failure.
  • Spacing between neighbouring targets is a separate failure from insufficient size, and conflating them hides the cases where the fix is a gap rather than a bigger button.
  • Denser desktop layouts are legitimate, so the checker must apply the touch thresholds only where touch input is plausible and must not push mobile sizes onto desktop toolbars.
  • Decorative elements, disabled controls that cannot be activated, and elements whose action is duplicated by a larger surrounding target should be excluded from the report.
  • Elements hidden behind a collapsed menu, an inactive tab, or a closed drawer are never measured unless the audit opens them, which is where the smallest controls usually hide.
  • Overlapping targets that fully or partially cover one another are worse than small ones and need their own finding.
  • This feature reports; Display Density owns whether the app has a compact mode and what it is allowed to shrink. Compact mode must reduce padding and line height without dropping below the audit's thresholds.

Definition of done

9
  • The audit measures the activation area rather than the visual glyph.
  • Insufficient size and insufficient spacing are reported as distinct findings.
  • Touch thresholds apply only at touch-capable viewports and pointer types.
  • Decorative, disabled, and duplicated controls are excluded.
  • Each finding identifies the route and component and can highlight the element in place.
  • Controls inside collapsed menus, drawers, and inactive tabs are included in the audit.
  • Overlapping interactive areas are reported separately.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.