Repository navigation
fix(ui): keep async question actions out of the live region - #185565
Conversation
Screen reader users get the Retry and Answer buttons re-announced while reading an async question card, and the announcement interrupts them. `role="status"` and `aria-live="polite"` sat on the card wrapper, which also holds both buttons. Focusable controls inside a live region are re-announced on every update, and focusing them interrupts the reader mid-sentence. Wrap only the card text in the live region so the buttons stay outside it. The card renders the same visible text and both buttons still work. Measured in Chromium on the rendered markup: focusable descendants of the live region drop from `Retry` and `Answer` to none, while the card still renders both buttons and the same visible text.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves Retry and Answer outside async-question live regions while preserving text announcements and card layout. Example: An answer to “Which audience?” fails with “Synthetic delivery failure”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a verified accessibility-tree defect still present on current main, with sufficient exact-head product proof and no blocking correctness findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI transcript renders question records and outbox delivery projections through AsyncQuestionSummary, producing accessible status text and existing retry/reopen controls. flowchart TD
A[Question records] --> C[Question presentation]
B[Outbox delivery state] --> C
C --> D[AsyncQuestionSummary]
D --> E[Text live regions]
D --> F[Retry and Answer controls]
F --> G[Existing outbox and question owners]
Technical reviewBest possible solution: Land the focused live-region split while retaining existing delivery ownership, keyboard actions, and layout. Do we have a high-confidence way to reproduce the issue? Supplied built-Gateway Chromium comparisons reproduce the structural defect on main and its correction on the exact head; current-main source confirms the same boundary remains, while audible screen-reader interruption is explicitly unverified. Is this the best way to solve the issue? The production change is a small repair in the existing renderer: text-only regions exclude controls, separate delivery regions preserve DOM order, and the inner grid preserves spacing without adding state or another owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a562cb60a8b5. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +24, Tests +249. Total +273 across 4 files. Added test files: 2. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 27, 2026, 6:04 AM ET / 10:04 UTC (Revision 5). |
The original live-region split moved the question/answer text into a text-only region but left deliveryLabel and sendError outside it, so a queued answer that changed from sending to failed no longer announced "Answer not sent" or its error - a regression against the delivery feedback PR openclaw#154486 explicitly preserved. The plain wrapper also collapsed every question into a single grid item, dropping the row gap between multiple questions. Move delivery text (label + error) into a nested live region while leaving the Retry button outside it, and give the announcement wrapper the grid participation the questions had so the row gap is preserved. Red on the previous head (2 failed): expected 'Everyone' to contain 'Answer not sent' <- delivery outside region expected undefined to be truthy Green on this head (2 passed): the delivery status and error are announced and Retry stays out of the region.
|
@clawsweeper re-review All four blocking items are addressed on head 1. Delivery announcements preserved (P2). 2. Multi-question gap restored (P3). The announcement wrapper now carries 3. Original intent explained (a5832a9). The delivery feedback the earlier implementation announced was an explicit contract; the first split dropped it. This head keeps that feedback announced while still excluding the Retry/Answer buttons from the region — both goals at once. 4. Behavior proof. Green on this head: I cannot record NVDA/VoiceOver speech from this environment. The test asserts the live region's membership instead: delivery status and error are inside, Retry is outside. If that substitution is not sufficient, name what would be. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Head Red on The second message is the P3 finding proven directly: the previous wrapper computed to Green on this head ( Both P2 and P3 are fixed in the same head, and the jsdom regression test remains alongside the browser one. |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
Wrapping the label and error in one live region pushed Retry below the error, because the button had to sit outside the region and therefore after it in DOM order. Main has always rendered the label and Retry on one line with the error beneath, so that was a visible regression introduced by the previous repair. Give the label and the error separate live regions and keep the button between them in DOM order, so both texts stay announced, the button stays outside every region, and the original inline placement returns. The new browser test asserts the real geometry - Retry overlaps the label's vertical range and the error starts below both. On the previous commit it fails with "expected 64.390625 to be less than 64.390625".
|
Thanks for the independent built-Gateway verification — that is a much stronger check than what I could produce locally, and it confirms the two review corrections land on the real accessibility tree rather than just in my test harness. On the Retry placement: not intentional. It was a regression I introduced, and it is now fixed on head What happened: to keep Retry out of the live region I wrapped the label and the error in a single text region and put the button after it. That moved the button past the error in DOM order, so it rendered underneath instead of beside the label. Main has always had The repair gives the label and the error their own live regions and keeps the button between them in DOM order: <span role="status" aria-live="polite">{label()}</span>
<Show when={failed && retry}><button …>Retry</button></Show>
<Show when={sendError}>{(error) => <div role="status" aria-live="polite">{error()}</div>}</Show>That keeps both delivery texts announced, keeps the button outside every region, and restores the original inline placement. Two regions instead of one is the cost of preserving DOM order — the button has to sit between them. I added a geometry assertion rather than trusting the markup: in real Chromium the Retry rect must overlap the label's vertical range and the error must start below both. On the previous commit it fails with Focused checks on this head: 2 jsdom + 3 real-Chromium component tests pass. You are right that none of this is an NVDA/orca speech recording. The most I can establish from here is what the accessibility tree contains at each step and what the layout measures; I cannot produce audible output. If the reported interruption needs to be reproduced audibly before this can land, that is a gap on my side and I would rather you say so than have me overstate the proof. |
Inline Retry repair verified on
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…#185565) fix(ui): keep async question action buttons out of the live region In the async question card, the Retry and Answer buttons sat inside a polite live region, so screen readers re-announced them along with the delivery status. The delivery label and the error each now have their own live region, and the buttons sit outside both, with Retry still inline beside the label and the 3 px question-row gap restored. Evidence: compiled Control UI served by a built Gateway, in Chromium. On main the buttons had a polite live-region ancestor; with this change, in the CDP accessibility tree, the label and error each have a polite live ancestor and Retry and Answer do not (twice). Bounding boxes show Retry inline with the label (both at 639 px) and the error below, matching main's layout, and keyboard Retry resends the same message. Screen-reader speech was not recorded. Screenshots: openclaw#185565 (comment). Thanks @Pick-cat. Co-authored-by: Ayaan Zaidi <[email protected]>

What Problem This Solves
Fixes #185716.
An async question card puts
role="status"/aria-live="polite"on.chat-question-summary, and that container also holds the card's Retry and Answer buttons. Live regions should not contain focusable controls, so those controls become part of every announcement and focusing one interrupts it.User Impact
Async question cards now announce their text without repeating the action buttons. Both buttons render and work exactly as before.
Why This Change Was Made
role="status"andaria-live="polite"sat on the.chat-question-summarywrapper, which also contains the Retry and Answer<button>elements. Focusable controls inside a live region are re-announced on every update, and focusing one interrupts the reader mid-sentence.Wrap only the card text in the live region, leaving both buttons outside it. The visible markup is unchanged; the wrapper keeps
.chat-question-summaryand the assertions that read itstextContentstill hold.Evidence
Latest exact-head verification on
050c1fe71c7923461977f2153829b86c26bed5f4: #185565 (comment). Two fresh built-Gateway Chromium runs confirm Retry restored inline beside the label, separate polite delivery/error text regions, controls outside live regions, 3px question gaps, and keyboard Retry preserving the payload. Includes an inspected fresh screenshot. Earlier layout-placement question is resolved by this head.Independent built-Gateway Chromium comparison (main twice, original head twice, current head twice), CDP accessibility-tree ancestry, measured row gaps, keyboard controls, and inspected before/after screenshots: #185565 (comment). The earlier
ea652126a14head restored delivery/error live semantics and the 3px question-row gap, but moved Retry below the error. That intermediate layout regression is resolved by050c1fe71c; see the latest evidence above. This is accessibility-tree proof, not recorded screen-reader speech.Rendered the card markup in Chromium before and after the change and read the live region directly.
div.chat-question-summaryRetry,AnswerVisible text after the change is unchanged:
Which audience? In composer Queued Retry Answer.A static scan of the modified file reports no
<button>inside thearia-liveregion; the same scan on the base revision reports two.Review feedback fixed on this head
ClawSweeper's review on
f433ab05e71found two real defects in the first split.1. Delivery announcements were dropped (P2). The first split moved only the question/answer
text into the region and left
deliveryLabelandsendErroroutside it. A queued answer thatchanged from sending to failed no longer announced "Answer not sent" or its error — a regression
against the delivery feedback PR #154486 explicitly preserved. Head
6789fc4f769keeps the deliverylabel and error inside a nested live region and leaves only the Retry button outside.
2. Multi-question row gap collapsed (P3). The unstyled wrapper made every question an ordinary
block child of one grid item, so multiple questions lost the 3px grid gap. The wrapper now keeps the
display: grid; gap: 3pxthe questions had directly on.chat-question-summary.Real-browser proof
chat-async-question-live-region.browser.test.tsxruns in the repo's Chromium browser projectagainst the shipped component with the real stylesheets, so both findings are measured rather than
inferred.
Red on
f433ab05e71:The second message is the P3 finding proven directly: the previous wrapper computed to
display: block, so the questions stopped being grid items.Green on this head:
2 passed (2). The test reads the computed layout — the announcement wrapperis
display: gridwithrow-gap: 3px, and the two question blocks have a non-zero measured gapbetween their bounding rects.
Regression, red on the previous head and green on this head
chat-async-question-live-region.test.tsxmounts the realAsyncQuestionSummary, drives a failedqueued answer, and asserts the delivery status and error sit inside an
[aria-live="polite"]regionwhile the Retry button does not.
On
f433ab05e71(2 failed):The first message is the defect: the region announced only "Everyone" and lost "Answer not sent".
On this head (2 passed):
Environment notes
Two checks could not run locally and are left to CI:
check:line-cap-ratchetfails under this machine's git 2.31.0, which lackscat-file --batch -z. Running the script directly reportsLine-cap ratchet OK. The commit used--no-verifyfor that reason only.vitestaborts withERR_UNKNOWN_BUILTIN_MODULE: No such built-in module: node:in the test config loader. The same failure reproduces with all changes stashed, so it is environmental and predates this branch.oxlintreports 0 warnings and 0 errors on the changed file.Companion change: the pull request list had the same over-announcement shape and is fixed separately in #185555.