From 4ebad68da37bcf0b4ed430c7ebd60adf8d7c3e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 19 Nov 2026 11:18:17 +0100 Subject: [PATCH 1/2] docs(help): match audit findings to the snapshot by element name --- src/commands/schema/cli-help-workflows.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/schema/cli-help-workflows.ts b/src/commands/schema/cli-help-workflows.ts index 224f498e76..6ff8ec3f77 100644 --- a/src/commands/schema/cli-help-workflows.ts +++ b/src/commands/schema/cli-help-workflows.ts @@ -212,9 +212,9 @@ Scope: Loop for each screen: 1. Open the app: agent-device open . Run mkdir -p ./a11y-output once. 2. Run agent-device audit, then agent-device snapshot -i. Audit captures the screen itself, so it goes first. - 3. Record each finding with its kind, role, and size. Audit's pinned refs (@eN~sG) stay valid only until the next snapshot. + 3. Record each finding with its kind, role, element name, and size. Audit's pinned refs (@eN~sG) stay valid only until the next snapshot. To act on a finding, use the ref from that snapshot -i. The ref numbers can differ, so do not match by ref number. - Find the element in the snapshot by role and position. To compare positions, use the rect from agent-device audit --json and from agent-device snapshot -i --json. + Find the element in the snapshot by the element name or identifier that audit prints. When the finding line shows only a role, match it by role and by the rect from agent-device audit --json and agent-device snapshot -i --json. 4. Capture evidence: agent-device screenshot ./a11y-output/.png --overlay-refs Coverage: @@ -238,7 +238,7 @@ Fix loop (only when the user asks to fix): Run audit again on the same screen and confirm the finding is gone. Report the before and after audit output. Report: - Group findings by screen. For each finding, give the kind, element name, ref, screenshot path, and suggested fix. + Group findings by screen. For each finding, give the kind, element name or identifier when shown, ref, screenshot path, and suggested fix. List the checks you could not do. Include audit's limitation lines in that list.`, }, dogfood: { @@ -261,7 +261,7 @@ Loop: Keep stateful commands serial within the same session. Parallel runs can pollute text fields, focus, alerts, and navigation state. Platform checks: - On the first screen, and after a screen changes meaningfully, run audit, then snapshot -i. Audit captures the screen itself, so it goes first. Audit's pinned refs (@eN~sG) stay valid only until the next snapshot. To act on a finding, use the ref from that snapshot -i. Find the element by role and position, not by ref number. Report audit's findings as accessibility findings. + On the first screen, and after a screen changes meaningfully, run audit, then snapshot -i. Audit captures the screen itself, so it goes first. Audit's pinned refs (@eN~sG) stay valid only until the next snapshot. To act on a finding, use the ref from that snapshot -i. Find the element by the element name or identifier that audit prints, not by ref number. When the finding line shows only a role, use role and rect. Report audit's findings as accessibility findings. For a whole-app accessibility review, read help accessibility. On iOS, test Back and the edge-back swipe where a screen was pushed. On Android, test system Back and applicable sheet dismissal. Where a sheet is dismissible, swipe it down with no edits and expect dismiss. Dismiss it after an edit and expect confirm or save. Then press explicit Cancel. From a1125cc1216b7c53fd447132a3c13a8113f202be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 19 Nov 2026 13:03:12 +0100 Subject: [PATCH 2/2] docs(help): act on an audit finding only when one snapshot element matches --- src/commands/schema/cli-help-workflows.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/schema/cli-help-workflows.ts b/src/commands/schema/cli-help-workflows.ts index 6ff8ec3f77..51af3518fe 100644 --- a/src/commands/schema/cli-help-workflows.ts +++ b/src/commands/schema/cli-help-workflows.ts @@ -214,7 +214,9 @@ Loop for each screen: 2. Run agent-device audit, then agent-device snapshot -i. Audit captures the screen itself, so it goes first. 3. Record each finding with its kind, role, element name, and size. Audit's pinned refs (@eN~sG) stay valid only until the next snapshot. To act on a finding, use the ref from that snapshot -i. The ref numbers can differ, so do not match by ref number. - Find the element in the snapshot by the element name or identifier that audit prints. When the finding line shows only a role, match it by role and by the rect from agent-device audit --json and agent-device snapshot -i --json. + Use the element name or identifier that audit prints only when it matches exactly one element in the snapshot. Snapshot -i text prints an identifier only for an element with no label or value, so read identifiers from agent-device snapshot -i --json. + When the name matches more than one element, or the finding line shows only a role, match by role and by the rect from agent-device audit --json and agent-device snapshot -i --json. + Act only on a unique element. If no element is unique, report the finding and do not act. 4. Capture evidence: agent-device screenshot ./a11y-output/.png --overlay-refs Coverage: @@ -261,7 +263,7 @@ Loop: Keep stateful commands serial within the same session. Parallel runs can pollute text fields, focus, alerts, and navigation state. Platform checks: - On the first screen, and after a screen changes meaningfully, run audit, then snapshot -i. Audit captures the screen itself, so it goes first. Audit's pinned refs (@eN~sG) stay valid only until the next snapshot. To act on a finding, use the ref from that snapshot -i. Find the element by the element name or identifier that audit prints, not by ref number. When the finding line shows only a role, use role and rect. Report audit's findings as accessibility findings. + On the first screen, and after a screen changes meaningfully, run audit, then snapshot -i. Audit captures the screen itself, so it goes first. Audit's pinned refs (@eN~sG) stay valid only until the next snapshot. To act on a finding, use the ref from that snapshot -i. Match the finding by the element name or identifier that audit prints, only when it matches exactly one snapshot element, not by ref number. Otherwise use role and rect from the JSON output. Act only on a unique element. Report audit's findings as accessibility findings. For a whole-app accessibility review, read help accessibility. On iOS, test Back and the edge-back swipe where a screen was pushed. On Android, test system Back and applicable sheet dismissal. Where a sheet is dismissible, swipe it down with no edits and expect dismiss. Dismiss it after an edit and expect confirm or save. Then press explicit Cancel.