Repository navigation
fix(studio): a refusal in a Studio strip is announced to screen readers - #29224
Merged
Merged
Conversation
The shared StudioRefusalStrip had no role and no live region, so a refusal it showed (a refused flow switch, save, load or publish) was silent to a screen reader. Its sentence is now a role="alert" holding the sentence verbatim; "Show me" and Details stay outside it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jReFyNpMGkARoUHPD3
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jReFyNpMGkARoUHPD3
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jReFyNpMGkARoUHPD3
This was referenced Nov 2, 2026
Closed
Contributor
Author
|
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m 席位核对 · ACCEPT · 2026-11-02T10:03ZHead-sha:
|
This was referenced Nov 2, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #29139
Clause-②: no
Metadata-protocol: none
The two lines are copied from the claim (comment 6572863221).
维护者速读
StudioRefusalStrip)里,那句拒绝说明现在是role="alert",读屏软件会在它出现时立即朗读,朗读内容就是服务器原话;"Show me" 按钮和 Details 展开区留在 alert 之外。视觉上没有任何变化。role="alert"的段落播报同一句话(18.3.0 RC 清单项 automation.setup-packaged-automation-board 的 acceptance[5])。StudioDesignSurface.tsx中StudioRefusalStrip的studio-refusal-message那一行;新测试StudioDesignSurface.refusalAnnounced-29139.test.tsx;AutomationsPillar.ledgerSwitch-28148.test.tsx新增的 409 用例。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/StudioDesignSurface.refusalAnnounced-29139.test.tsx packages/app-shell/src/views/studio-design/AutomationsPillar.ledgerSwitch-28148.test.tsx,预期 12 个用例全部通过。What changes
StudioRefusalStrip(ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx, the strip block only): the sentence element,data-testid="studio-refusal-message", carriesrole="alert". Nothing else in the strip moves: no new string, no new prop, no layout change.Why this role, on this element
role="alert", not a polite region. The strip is mounted with its sentence already in it (every call site renders it only when there is a refusal). An alert is announced when it is inserted; a polite live region inserted already filled is not reliably announced, because a live region must exist before its content changes. And what it shows is a refusal that stopped what the author just did, which is what an assertive alert is for.role="alert"holding the server's sentence verbatim, beside the switch, and the checklist itemautomation.setup-packaged-automation-boardacceptance[5] scores exactly that: the alert's text equals the server sentence. With the role on the whole strip, the alert would also read "Show me" and "Details", and opening the Details disclosure would change the alert's content and announce it again. On the sentence alone, the announcement is the sentence, and the strip's two controls stay ordinary, reachable controls after it.Tests
StudioDesignSurface.refusalAnnounced-29139.test.tsx(the strip itself, so every pillar is covered):onShowwith the target and input.AutomationsPillar.ledgerSwitch-28148.test.tsx, one new case on the card's reproduction (the ledger switch, the subflow guard's 409DELETE_RESTRICTEDnaming the caller): no alert before the flip; after it, one alert insidestudio-refusalwhose text is the 409 sentence verbatim; flipped again with the same refusal, no alert while the request is in flight (the toggle door is held on a gate), then a new alert element with the same sentence; the switch still reads the ledger.role="alert"dropped from the sentence throughscripts/ablation-replace.mjs(anchor 1 to 0, blob changed, restore proven equal to HEAD with an emptygit diff HEAD): 4 of the 12 cases in the two files went red (the three strip pins and the 409 case), the 8 others stayed green.Acceptance notes
aria-describedbyfrom the switch to the sentence: not added; not a local change. The ledger switch (FlowLedgerSwitch) takes its description ids from its own hint, the not-running reason and the walled reason. The strip is drawn in the pillar body from the pillar's sharederrorstate, which load, save, delete and toggle failures all set, and it has no id. Pointing the switch at the sentence needs an id on the strip, a new prop onFlowLedgerSwitch, and the pillar telling a toggle refusal apart from its other failures: three places outside the strip block. Measured live, the switch'saria-describedbynames one id (its hint) before and after the refusal, on both legs. With the alert, the sentence is announced when it lands; the link would let a reader hear it again from the switch. Reported to the seat as a finding.disabled(busy), and after the answerdocument.activeElementreadbody, on origin/main's strip and on this branch alike. Most likely the disabled state drops the focus, and nothing puts it back. A keyboard or screen-reader author has to find the switch again after each flip. It is inFlowLedgerSwitch.tsx, outside this card's file surface; reported to the seat as a finding.Verification
objectstack dev --seed-admin --freshon a private port) with the Console served from source by Vite, signed in as the seeded admin, Studio › Automations ›showcase_notify_owner(a read-only package, so the ledger switch), flipped with Space from the keyboard, twice. The real door answered both flips409DELETE_RESTRICTED, naming the callershowcase_task_done_notify_owner.role="alert"insidestudio-refusal, its text the response'serror.messagebyte for byte, and Playwright's aria snapshot of the strip reads- alert: "Flow 'showcase_notify_owner' cannot be disabled while 1 packaged flow still calls it as a subflow: ...". A DOM observer counted two alert insertions over the two refusals, each with the sentence.git diff HEADproven): the same sentence is a- paragraph, no alert on the page, no insertion over two refusals.node scripts/pm/dispatch-gates.mjs --commandsderived 34 commands for this diff; all 34 ran at 5c8cc56 (the fix commit; the two later commits merge main and leave the delta to main at these four files), each exit 0, includingnode scripts/check-sdui-manifest.mjsandpnpm --dir ui exec vitest run scripts/(169 files, 4900 tests).--ranreconciliation: 34 derived, 34 run, 0 NOT-MEASURED.ui/packages/app-shell; CI's Test UI runs the head.turbo run type-check --filter=@object-ui/app-shell(bothtsc --noEmitandtsc -p tsconfig.test.json) green at 5c8cc56 and at 3d6fa84.StudioDesignSurface.tsx, none in the strip block or the tests. The repo-wide run is CI's Lint UI.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (Measured on the touched files only; see Verification.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jReFyNpMGkARoUHPD3
Generated by Claude Code