feat(audit): evaluate role-less clickable views on Android

Merged
TH
7d ago
+371-22

Summary

audit recognized Android controls only by role, so a role-less clickable or long-clickable view (a React Native Pressable without accessibilityRole) produced no small-target and no missing-name finding. The audit now folds the helper's retained clickability evidence back onto the captured nodes and evaluates such a node as a clickable control. A clickable container whose only actionable descendant is already a control reports once, on the container. iOS is unchanged. commands.md no longer says generic clickable containers on Android are not evaluated, and the audit help states the new rule. 8 files. No scope expansion. Closes #4759

Validation

Head 2d48b3bdc0.

  • Gate: pnpm check:affected --run — all runnable checks passed, exactCommit=true. Coverage, provider integration, and device lanes are CI obligations.
  • Focused vitest: capture-kit, platform-android, command-surface, command-runtime capture — 330 files / 3084 tests passed. New tests cover the 30dp role-less clickable, the unnamed long-clickable, and the container-wrapping-a-button collapse.
  • Live evidence: emulator-5554 (Pixel_7_CI, Android 16), branch-built node bin/agent-device.mjs, session roleless. snapshot -i --json shows androidSnapshot.backend=android-helper, helperVersion=0.21.42-dev, density 2.625. audit --json on the dev-client launcher reports small-target role=clickable for INFO (38.5x32dp) and RESET (41.9x48dp); the snapshot captures both as role-less android.widget.TextView, so neither reported before this change. Raw outputs saved under .tmp/evidence/.
  • Limitation: the installed com.callstack.agentdevicelab dev client crashes on this checkout's Metro bundle (gesture-handler v3 binding mismatch), so the lab app screens were unreachable; the dev-client launcher provided the role-less clickables instead.

Audited screen


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.