Open source · Accessibility

Touch Target Auditor

Measure interactive targets across route screenshots and component fixtures.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Check the size of interactive hit areas, the space between them and whether any two overlap — from a measurement capture document somebody exported, against a rules document that supplies every threshold.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

# a capture that satisfies its rules, including one documented exception
node bin/touch-target-auditor.mjs \
  --capture examples/clean/capture.json \
  --rules examples/clean/touch.rules.json \
  --now 2026-09-18
# exit 0

# two undersized targets whose hit areas overlap
node bin/touch-target-auditor.mjs \
  --capture examples/broken/capture.json \
  --rules examples/broken/touch.rules.json \
  --now 2026-09-18
# exit 1

# a target whose rectangle came from screenshot pixels
node bin/touch-target-auditor.mjs \
  --capture examples/screenshot-only/capture.json \
  --rules examples/screenshot-only/touch.rules.json \
  --now 2026-09-18
# exit 2 -- incomplete, not clean

Read the result

--now is required and there is no default: this tool reads no clock of its own. It is the instant used for exception expiry and for the capture's age, so the same documents always produce the same verdict, and a run that omits it is a configuration error (exit 2, empty stdout).

Scope

Exceeding a limit is an incomplete result with a finding naming the limit. Nothing is silently truncated and nothing is a pass.