Skip to content

fix(site/src/pages/TemplateBuilder): name View details links after their template or module - #32320

Open
chrifro wants to merge 2 commits into
mainfrom
fix/template-builder-view-details-link-names
Open

chrifro wants to merge 2 commits into
mainfrom
fix/template-builder-view-details-link-names

Conversation

@chrifro

@chrifro chrifro commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

The template builder repeats a "View details" registry link on every base template card (step 1), module card (step 2), and configured item, so screen reader users could not tell which template or module each link opens (WCAG 2.4.4, Link Purpose (In Context)).

Each link now has visually hidden context after its visible text, so its accessible name reads "View details for AWS EC2 (Linux) (opens in new tab)". The visible text is unchanged and stays first in the name, so voice-control users can still say "View details" (2.5.3).

Closes DEQ-210, DEQ-142

Ticket Surface Visible change
DEQ-210 /templates/new/builder, step 1 base template cards (TemplateCard) None (screen reader text only), so no screenshots
DEQ-142 /templates/new/builder?step=module-select, module cards (ModuleCard) None (screen reader text only), so no screenshots
(same pattern) Configure step item headers (TemplateBuilderAvatarData) None

Accessible names read from Chromium's accessibility tree on the running dev server:

Step Before After
Base template View details (opens in new tab) (repeated) View details for Docker Containers (opens in new tab), View details for AWS EC2 (Linux) (opens in new tab), ...
Module select View details (opens in new tab) (repeated) View details for Claude Code (opens in new tab), View details for Codex CLI (opens in new tab), ...
Decision log
  • sr-only span over aria-label: aria-label would override the link content and duplicate the "(opens in new tab)" text that Link already appends. The hidden span extends the name in place and keeps label-in-name.
  • sr-only span over aria-describedby (used in fix(site/src/modules/notifications): describe inbox action links with notification content #32317): these cards have no single element whose text alone identifies the item without extra noise, and the Deque suggested labels ("View details for Git Clone") are names, not descriptions. Putting the item in the name also fixes link lists such as the NVDA Elements List.
  • The separating space sits outside the hidden span. jsdom drops leading whitespace inside the span when it computes the name; browsers keep it either way, and the trailing space does not render inside the inline-flex link.
  • Self-review: frontend-deep-review found no blocking issues. Its should-fix (the test asserted href instead of the accessible name) was fixed. Its optional nit (extract a shared link component for the three call sites) was skipped to keep the fix small.
  • Checks run locally: TemplateBuilder Vitest suite (74 tests; the new TemplateCard test fails without the fix), pnpm check, pnpm lint, and a Playwright check of accessible names on both steps against ./scripts/develop.sh.

🤖 Generated by Coder Agents on behalf of @chrifro.

…eir template or module

Repeated "View details" registry links in the template builder had
identical accessible names but different destinations (WCAG 2.4.4).
Add visually hidden context so each name reads "View details for
<name>"; the visible text stays first in the name (2.5.3).

Closes DEQ-210, DEQ-142
@chrifro
chrifro temporarily deployed to main November 17, 2026 14:19 — with GitHub Actions Inactive
@chrifro
chrifro temporarily deployed to main November 17, 2026 14:19 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

DEQ-142

DEQ-210

@chrifro
chrifro marked this pull request as ready for review November 17, 2026 14:58
@chrifro
chrifro requested a review from aqandrew November 17, 2026 14:58
@chrifro
chrifro temporarily deployed to main November 17, 2026 14:58 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
main — fdec331e Deployed Nov 17, 2026 by chrifro via cla #258711
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant