Repository navigation
feat(audit): evaluate role-less clickable views on Android - #4780
Conversation
Android nodes the helper reports as clickable or long-clickable with no control role (a React Native Pressable without an accessibilityRole) are now evaluated as controls for small-target and missing-name. A clickable container whose only actionable descendant is already a control reports once, on the container, following the same-role child rule. iOS is unchanged. The audit folds the helper's retained clickability evidence back onto the published nodes, since regular Android snapshots omit the raw tap facts. Closes #4759
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 2d48b3b. The verdict and the full list are in the summary comment.
|
Thanks for this. At 2d48b3b there are three problems to fix before merge. CI is green (20 checks, 0 not passing) and there are no conflicts. The covered-control pass still ignores role-less clickables. The tests do not cover the route production uses. Every new test in snapshot-audit.test.ts passes Shared-name findings are likely wrong for clickable containers. A role-less clickable container is named from its first named descendant (accessibleName), but TalkBack announces such a container by joining its descendants' text. Two feed cards or list rows with the same first text child (an author, "Sponsored", a repeated title) get the same name, land in one The open inline thread on Not blocking, and you can take or leave these: make Please attach the raw live output (backend and the two small-target findings). The live run covered only small-target on role-less TextViews in the dev-client launcher. Missing-name, the container collapse, and list-row or whole-screen wrappers (for example RN TouchableWithoutFeedback keyboard-dismiss roots, clickable RecyclerView rows) were not run on a device, and the TalkBack joining behavior is not reproduced on device. Before merge: route |
Route coveredRole through auditRole so a covered role-less Android touchable gets its covered-control finding. Exclude the role-less clickable role from the shared-name count: its name comes from its first named descendant while TalkBack joins every descendant's text, so two rows with an equal first child announce different names. Make longClickableByNodeIndex required on the exact android-helper evidence, the shape its only producer always writes. Document the clickable role and the shared-name exclusion in the audit help, cliDetail, and commands.md, and word the container collapse per finding kind.
|
Pushed 1. 2. Added the 3. 4. Live device output. Re-captured on Raw
|
This comment has been minimized.
This comment has been minimized.
|
The PR is ready at 09d2721, and the earlier findings from #4780 (comment) are now fixed. Not blocking, and you can take or leave it: the shared-name skip in https://github.com/callstack/agent-device/blob/09d2721/packages/capture-kit/src/snapshot/snapshot-audit.ts#L134 keys on role === "clickable" instead of on where the name came from, so two role-less Android touchables that carry the same own contentDescription (for example two icon-only Pressables both labeled "Delete") are never grouped and raise no ambiguous-name finding; you could skip grouping only when ownName(node) is undefined, or keep it as is since the docs state the exclusion plainly. The open thread #4780 (comment) no longer applies: coveredRole now resolves through auditRole and a covered clickable android.view.View test asserts the role, so you can resolve it. The live run covered only small-target on role-less TextViews through the strip-and-restore route. Covered-control, the shared-name skip, missing-name and container collapse for role-less touchables were not run on device; unit tests cover them. Coverage runs the capture-kit and contracts tests this change touches. |
|
Optional item applied at 5c749d7.
|
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
Still ready at 5c749d7. The change since 09d2721 lets a role-less Android touchable join the shared-name check when it has a name of its own, so two icon-only touchables both labeled "Delete" are reported again. One named only by its descendants stays excluded. The new test covers that case, and the help and command docs say the same. The label stays. |
* origin/main: (70 commits) refactor(apple-runner): one RUNNER_ERROR_CODES row per runner error code with parity/docs gates (callstack#4774) fix(android): require acknowledgements for test IME typing (callstack#4722) feat(scroll): add scroll refresh for pull-to-refresh (callstack#4770) refactor(host-kit): add request Scope and use it for the wait capture deadline (callstack#4794) fix(android): let permission all change nothing on an app that declares no permissions (callstack#4796) fix(cli): replace the CLI session and generated remote config instead of rewriting them in place (callstack#4797) fix(host-kit): accept a group-writable script directory the user owns (callstack#4799) fix(cli): escape control characters at the CLI's stdout and stderr writes (callstack#4778) fix(audit): do not report rows under a persistent bar that scrolling reveals (callstack#4775) fix(daemon): refuse an unsafe state directory before first use (callstack#4783) refactor: settle remaining single-deadline races through settleWithin (callstack#4788) refactor(host-kit): settle deadline races via settleWithin with R87 race ratchet (callstack#4766) fix(android): authenticate and bound persistent snapshot helper sessions (callstack#4729) fix(daemon): bound upload ingress and finalization (callstack#4721) chore(gates): ratchet wire-published reason literals by value (R89) (callstack#4779) feat(audit): evaluate role-less clickable views on Android (callstack#4780) fix(mutation): keep umask-setting tests out of Stryker's thread pool (callstack#4785) feat(audit): report controls that share one accessible name (callstack#4771) fix(contracts): pair open runtime hints with their apply operation (callstack#4754) refactor(daemon): report startup progress over the launch channel instead of marker files (callstack#4777) ...
Summary
auditrecognized Android controls only by role, so a role-less clickable or long-clickable view (a React NativePressablewithoutaccessibilityRole) produced nosmall-targetand nomissing-namefinding. The audit now folds the helper's retained clickability evidence back onto the captured nodes and evaluates such a node as aclickablecontrol. A clickable container whose only actionable descendant is already a control reports once, on the container. iOS is unchanged.commands.mdno longer says generic clickable containers on Android are not evaluated, and the audit help states the new rule. 8 files. No scope expansion. Closes #4759Validation
Head
2d48b3bdc0.pnpm check:affected --run— all runnable checks passed,exactCommit=true. Coverage, provider integration, and device lanes are CI obligations.emulator-5554(Pixel_7_CI, Android 16), branch-builtnode bin/agent-device.mjs, sessionroleless.snapshot -i --jsonshowsandroidSnapshot.backend=android-helper,helperVersion=0.21.42-dev, density 2.625.audit --jsonon the dev-client launcher reportssmall-target role=clickableforINFO(38.5x32dp) andRESET(41.9x48dp); the snapshot captures both as role-lessandroid.widget.TextView, so neither reported before this change. Raw outputs saved under.tmp/evidence/.com.callstack.agentdevicelabdev 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.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.