Skip to content

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

Merged
jeremyruppel merged 3 commits into
mainfrom
fix/template-builder-view-details-link-names
Nov 18, 2026
Merged

jeremyruppel merged 3 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.
  • Review round 1 (@jeremyruppel took over the PR): added a ModuleCard link-name test (DEQ-142 had no coverage), made the TemplateCard test check both cards, and made ModuleCard's detailsUrl required, as TemplateCard's already is, so stories render a real link. Activating "View details" also selects or toggles the card; that predates this PR and is tracked in DEQ-634.
  • Checks run locally: TemplateBuilder Vitest suite (75 tests; the new TemplateCard and ModuleCard link-name tests fail 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

@jeremyruppel jeremyruppel 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.

[reviewer-agent] (@jeremyruppel) round 1: changes needed.

The fix itself is correct. I checked in Storybook that every link is named View details for <name> (opens in new tab) on step 1, step 2, and the configure headers, and the hidden span doesn't change layout. Required CI passes, and the change is within scope and size limits. One should-fix: the DEQ-142 surface (ModuleCard) has no regression test.

Nits: the new test's name says "each" but it checks one card. ModuleCard's optional detailsUrl lets stories and tests render an <a> with no href; that predates this PR.

Follow-up filed: DEQ-634 ("View details" links also select or toggle their card; predates this PR).

🤖 Generated by Coder Agents on behalf of @jeremyruppel.


<Link href={detailsUrl} target="_blank" className="text-xs font-normal">
View details
View details <span className="sr-only">for {name}</span>

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.

[should-fix] DEQ-142 is about this component, but nothing tests its link name: only TemplateCard got a test, and ModuleCard.test.tsx renders without detailsUrl, so this <a> has no href and no link role. Pass detailsUrl in renderCard and assert toHaveAccessibleName(/^View details for Docker Containers/).

expect(onSelectDocker).toHaveBeenCalledTimes(1);
});

it("names each details link after its template", () => {

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.

[nit] The test name says "each" but it only checks the Kubernetes card. Either assert both cards or rename it, for example includes the template name in the details link name.

@jeremyruppel
jeremyruppel marked this pull request as draft November 18, 2026 20:42
…n module and template cards

Require ModuleCard detailsUrl so the card always renders a real link.

@jeremyruppel jeremyruppel 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.

[reviewer-agent] (@jeremyruppel) round 2: approved at 5c7fc52. Every template builder "View details" link is now named after its template or module (WCAG 2.4.4), and the visible text still comes first in the name. Round 1's findings are fixed: the module card has a link-name test, the template card test checks both cards, and ModuleCard requires detailsUrl. Follow-up: DEQ-634 (activating View details also selects or toggles its card; predates this PR).

🤖 Generated by Coder Agents on behalf of @jeremyruppel.

@jeremyruppel
jeremyruppel merged commit beba6a3 into main Nov 18, 2026
37 checks passed
@jeremyruppel
jeremyruppel deleted the fix/template-builder-view-details-link-names branch November 18, 2026 20:57
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 18, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
main — 5c7fc528 Deployed Nov 18, 2026 by jeremyruppel via cla #259832
docs-preview — 5c7fc528 Deployed Nov 18, 2026 by jeremyruppel via cleanup #226
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