Skip to content

fix(site/src): announce copy, loading, and error status messages - #32143

Merged
aqandrew merged 4 commits into
mainfrom
a11y/status-msg-not-auto-announced
Nov 14, 2026
Merged

aqandrew merged 4 commits into
mainfrom
a11y/status-msg-not-auto-announced

Conversation

@aqandrew

@aqandrew aqandrew commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Screen readers did not announce copy confirmations, the logs and user search loading states, latency refreshes, or sign in and password errors (WCAG 4.1.3 Status Messages). Each of these now updates a live region that is already mounted before its message appears, so the text change is announced reliably. Nothing changes visually: all new regions are sr-only, and the form layout keeps its spacing.

  • Copy feedback: CopyButton (workspace name, SSH command via CodeExample, and every other caller), the agent logs copy button, and the user menu's deployment ID item render a role="status" span that reads "Copied" while the check icon shows. In the menu, the span sits inside the menu item because status is not an allowed child of menu.
  • Logs loading: a role="status" span outside CollapsibleContent reads "Loading logs" while the logs spinner shows. CollapsibleContent unmounts when closed, so a region inside it would mount at the same moment as its text.
  • Autocomplete loading: the shared Autocomplete (Share Chat "Search for user or group" and the other sharing pickers) announces "Loading" while options load, from a role="status" span outside its popover.
  • Refresh latencies: a role="status" span next to the proxy menu (outside the menu content, which is non-modal since fix(site/src): stop dropdown menus hiding the page from assistive technology #31969) reads "Refreshing latencies", then "Latencies refreshed".
  • Form errors: the sign in and Settings > Security ErrorAlerts now render inside an always-mounted role="alert" wrapper. The inner Alert gets role="none" through a new optional role prop, so the message is announced once. The sign in field errors ("Please enter an email address.") are always-mounted role="alert" spans; gap-2 moved to margins so the empty span takes no space. Mutation errors reset on retry, so a repeated failure is announced again.
Ticket UI surface
DEQ-203 Workspace page: copy workspace name, logs loading spinner, logs copy, SSH command copy
DEQ-329 Settings > Security: password update error
DEQ-82 Agents: user menu deployment ID copy, Share Chat user and group search loading
DEQ-480 Navbar: Refresh latencies, user menu deployment ID copy
DEQ-560 Login: field validation errors, "Incorrect email or password." error (includes its detail text)

The ChatPageContent story InterruptingShowsBusyComposer now picks its status out of several live regions, because chat messages render CopyButtons.

Closes DEQ-82
Closes DEQ-203
Closes DEQ-329
Closes DEQ-480
Closes DEQ-560

Screen reader announcements were not verified with NVDA here; tests assert that each message lands in a region that existed before it appeared.

Dropped review findings

  • No AgentRow render test for the logs copy and loading status: rendering AgentRow needs agent log websockets. CopyButton.test.tsx covers the identical copy pattern.
  • Not extracting the repeated <span role="status" className="sr-only"> into a component: about five existing call sites already inline the same span, and a new primitive for one line is premature.
Grouping and decision log
  • All four tickets share one root cause (status text with no live region, or a live region mounted together with its text), so they ship as one PR per the one-PR-per-axe-rule convention. 149 non-test lines.
  • DEQ-82 was added after agent-ok was applied. Its first element (deployment ID copy) was already covered by the user menu change. Its second element is fixed in the shared Autocomplete. The trigger's inline spinner adds "Loading spinner" to the trigger's accessible name. That predates this PR and is left alone.
  • Alert already had role="alert", yet Deque reported the login and security errors as not announced. Instead of changing Alert timing globally, the two affected forms keep an always-mounted region and neutralize the inner role to avoid a double announcement.
  • Copy feedback uses a sibling span, not text inside the button, so the button's accessible name stays "Copy workspace name". The span is position: absolute (sr-only), so it adds no flex gap. All 14 CopyButton call sites were checked for space-*, divide-*, last: and similar sibling selectors; none apply.
  • Copy toasts (as in fix(site): show success toasts after copying chat ID and branch #31402) were considered and rejected because they add a visible change that needs design input.
  • Field errors use role="alert" (assertive) to match the form error alert. After a failed submit, the first keystroke that changes the message ("enter an email" to "enter a valid email") is announced once.
  • Self-review: frontend-review, frontend-deep-review, and frontend-accessibility (code audit, Storybook axe panel not run) passed after fixes.

🤖 Generated by Coder Agents on behalf of @aqandrew.

Copy buttons, the logs loading spinner, latency refresh, and sign in and
password form errors now update live regions that are mounted before the
message appears, so screen readers announce them (WCAG 4.1.3).
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 22:39 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 22:39 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

…tus among live regions

Messages now include CopyButton status regions, so the story can no
longer assume a single status on the page.
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 22:58 — with GitHub Actions Inactive
@aqandrew
aqandrew marked this pull request as ready for review November 12, 2026 23:08
@aqandrew
aqandrew requested a review from a team as a code owner November 12, 2026 23:08
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 23:08 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 23:09 — with GitHub Actions Inactive
The loading spinner renders inside the popover, which mounts together
with it, so screen readers never heard the loading state. An
always-mounted status region outside the popover announces it.
@aqandrew
aqandrew temporarily deployed to main November 13, 2026 20:16 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 13, 2026 20:16 — with GitHub Actions Inactive
@aqandrew
aqandrew merged commit 241ec8d into main Nov 14, 2026
31 checks passed
@aqandrew
aqandrew deleted the a11y/status-msg-not-auto-announced branch November 14, 2026 00:00
@aqandrew
aqandrew temporarily deployed to docs-preview November 14, 2026 00:00 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 14, 2026 00:00 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 2026

This branch was previously deployed

2 inactive deployments
main — c050331b Deployed Nov 14, 2026 by aqandrew via cla #257049
docs-preview — c050331b Deployed Nov 14, 2026 by aqandrew via cleanup #67
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants