Skip to content

fix(site/src): make accessible names contain visible labels - #32016

Merged
aqandrew merged 3 commits into
mainfrom
a11y/speech-accessible-name-mismatch
Nov 12, 2026
Merged

aqandrew merged 3 commits into
mainfrom
a11y/speech-accessible-name-mismatch

Conversation

@aqandrew

Copy link
Copy Markdown
Collaborator

Fixes the axe Auditor speech-accessible-name-mismatch findings (WCAG 2.5.3 Label in Name): the accessible name of each control now contains its visible text, so speech-input users can activate it by saying what they see.

  • Filter search box (shared Filter, plus the Icons page): aria-label="Filter" becomes "Search", matching the Search... placeholder.
  • Pagination: numbered buttons are named Page N instead of Current Page / First Page / Last Page. The current page gets aria-current="page".
  • Build timeline bars: the name now includes the duration shown next to the bar, for example View plan details 1.07s.
  • Navbar user menu: the aria-label override is replaced by sr-only User menu text after the avatar, so visible initials start the name (TE User menu). When the avatar image loads, the name is just User menu.
  • New workspace template combobox: the input label now matches its placeholder, Type/select a workspace template.

There are no visual changes, only names and ARIA.

Closes DEQ-12
Closes DEQ-52
Closes DEQ-193
Closes DEQ-275
Closes DEQ-400
Closes DEQ-514
Closes DEQ-540
Closes DEQ-578

Ticket UI surface
DEQ-12 Workspace build timeline bars
DEQ-52 Groups filter
DEQ-193 AI Gateway sessions filter
DEQ-275 Templates filter
DEQ-400 Users filter
DEQ-514 Navbar user menu
DEQ-540 Audit log filter and pagination
DEQ-578 Workspaces filter and new workspace combobox

Not included: DEQ-481, the workspace sharing "Search for user or group" trigger. Its name is already its visible text (the placeholder, or the selected value), so 2.5.3 passes. The real gap is that the field has no label once a value is selected, which needs a design decision. I explained this on the ticket and left it unassigned.

Dropped review finding: I kept the visible placeholder Type/select a workspace template instead of renaming it to Search workspace templates. Renaming it would be a copy change outside this fix.

Grouping and decision log
  • One PR per axe rule across the product, following the existing preference for DEQ batches.
  • Six tickets share one root cause, the shared Filter SearchField label. One change fixes all of them. IconsPage had the same mismatch and was fixed too.
  • Filter: I chose "Search" over the auditor's suggested "Filter Search...", which repeats words. Label-in-name ignores the trailing ellipsis.
  • Pagination: Page N contains the visible digit. I dropped first/last/current wording and use aria-current to convey the current page.
  • Timing bars: the duration reuses the string already rendered beside the bar, so there is only one formatting path.
  • User menu: I put sr-only text in the button instead of building the initials into aria-label, so the name uses the Avatar's own rendered fallback (grapheme-aware). Then the image and fallback states both work without duplicating that logic.
  • DEQ-481: the advisor and my own reading agree that this does not fail 2.5.3. Appending placeholder text globally in Autocomplete would be speculative.
  • Checks: pnpm check, pnpm lint, targeted Vitest (Filter, Pagination, WorkspaceTimings, Audit, ConnectionLog, dashboard, WorkspacesPage), and Storybook tests for the UserDropdown, WorkspaceTimings, GroupsPageView, TemplatesPage, and ListSessionsFilter stories.

🤖 Generated by Coder Agents on behalf of @aqandrew.

@aqandrew
aqandrew temporarily deployed to main November 10, 2026 20:36 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 10, 2026 20:36 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

@aqandrew
aqandrew marked this pull request as ready for review November 10, 2026 20:47
@aqandrew
aqandrew temporarily deployed to main November 10, 2026 20:47 — with GitHub Actions Inactive

@chrifro chrifro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each accessible name now contains its control's visible text: the shared Filter and Icons search (Search), pagination (Page N with aria-current), timeline bars (name includes the duration), the user menu (sr-only text after the initials) and the template combobox. Together these cover all 8 linked tickets for WCAG 2.5.3. Nits, not blocking: PaginationWidgetBase.test.tsx:98 uses findAllByRole as a bare aria-current check. The UserDropdown, ListSessionsFilter and GroupsPageView story play functions you touched still hold assertions that were already there. A bar with an invalid duration keeps the name View <stage> details. No follow-ups filed.

🤖 Generated by Coder Agents on behalf of @chrifro.

@chrifro chrifro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1: merge blocked by a conflict with main. The review itself is clean (approved above), but gh pr merge --squash fails because the merge commit cannot be created. #31888 (a0e466dbb9) changed the user menu button's className from relative bg-transparent border-0 cursor-pointer p-0 to relative bg-transparent cursor-pointer p-0, next to the aria-label this PR removes. Merge origin/main, keep both changes (no aria-label, no border-0), and mark the PR ready once CI is green.

Nits from the approval still apply (optional). No follow-ups filed.

🤖 Generated by Coder Agents on behalf of @chrifro.

@chrifro
chrifro marked this pull request as draft November 11, 2026 10:14
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:10 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:14 — with GitHub Actions Inactive
@aqandrew
aqandrew marked this pull request as ready for review November 12, 2026 21:14
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:14 — with GitHub Actions Inactive
@aqandrew
aqandrew merged commit 30526a3 into main Nov 12, 2026
33 checks passed
@aqandrew
aqandrew deleted the a11y/speech-accessible-name-mismatch branch November 12, 2026 21:28
@aqandrew
aqandrew temporarily deployed to docs-preview November 12, 2026 21:28 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:28 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026

This branch was previously deployed

2 inactive deployments
docs-preview — ee0d59f1 Deployed Nov 12, 2026 by aqandrew via cleanup #9
main — ee0d59f1 Deployed Nov 12, 2026 by aqandrew via cla #255318
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