Repository navigation
fix(site/src): make accessible names contain visible labels - #32016
Conversation
chrifro
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
Fixes the axe Auditor
speech-accessible-name-mismatchfindings (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, plus the Icons page):aria-label="Filter"becomes"Search", matching theSearch...placeholder.Page Ninstead ofCurrent Page/First Page/Last Page. The current page getsaria-current="page".View plan details 1.07s.aria-labeloverride is replaced by sr-onlyUser menutext after the avatar, so visible initials start the name (TE User menu). When the avatar image loads, the name is justUser menu.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
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 templateinstead of renaming it toSearch workspace templates. Renaming it would be a copy change outside this fix.Grouping and decision log
FilterSearchFieldlabel. One change fixes all of them.IconsPagehad the same mismatch and was fixed too."Search"over the auditor's suggested"Filter Search...", which repeats words. Label-in-name ignores the trailing ellipsis.Page Ncontains the visible digit. I dropped first/last/current wording and usearia-currentto convey the current page.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.Autocompletewould be speculative.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.