Skip to content

fix(site/src/pages/TemplatesPage): link template names instead of making rows buttons - #31857

Merged
jeremyruppel merged 1 commit into
mainfrom
a11y/nested-interactive-2
Nov 6, 2026
Merged

jeremyruppel merged 1 commit into
mainfrom
a11y/nested-interactive-2

Conversation

@jeremyruppel

@jeremyruppel jeremyruppel commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Template rows used useClickableTableRow, which rendered <tr role="button" tabIndex={0}> around the "Create Workspace" link, so axe reports nested-interactive on every row.

Rows are now plain table rows with the existing hover outline and a mouse-only click that opens the template. The template name is a real link to the template page (shared Link with asChild, same pattern as WorkspaceTopbar), so keyboard and screen reader users reach the template through it. The name link stops propagation like the Create Workspace button already does, so Ctrl/Cmd-click opens a new tab without also navigating the current one.

Closes DEQ-46
Closes DEQ-94
Closes DEQ-237
Closes DEQ-293
Closes DEQ-311

Ticket Surface
DEQ-46, DEQ-94, DEQ-237, DEQ-293, DEQ-311 Templates list (/templates) rows

The resting state is pixel-identical to main. The only visible change is keyboard focus: it moves from the whole row to the template name, which gets the standard content-link focus ring.

Decision log
  • Chose a real name link over the WorkspacesTable precedent of dropping role but keeping tabIndex={0} on the row. A focusable row without a role doesn't tell assistive technology it navigates, and site/AGENTS.md requires a semantic role for tabIndex={0}.
  • Link overrides (pl-0 font-semibold text-inherit visited:text-inherit) keep the title's existing look; computed color, weight, and size match main in both themes.
  • Verified with axe-core in Storybook (pages/TemplatesPage WithTemplates, MultipleOrganizations, ClassicParameterFlowWarning): nested-interactive goes from 6/6/3 nodes to 0. A pre-existing minor empty-table-header remains on both.
  • New TemplatesPage.test.tsx opens a template from the name link with the keyboard; it fails on main.
  • The rest of the nested-interactive batch ships separately (fix(site/src): move the Autocomplete clear button out of the trigger #31856 for Autocomplete).

🤖 Generated by Coder Agents on behalf of @jeremyruppel.

…ing rows buttons

Template rows were <tr role="button" tabIndex=0> containing the Create
Workspace link, which axe reports as nested-interactive. Rows keep a
mouse-only click shortcut, and the template name is now a real link to
the template page for keyboard and screen reader users.
@linear-code

linear-code Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

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

Manually tested in Storybook, and the row itself not being focusable feels better 🙂

Image

@jeremyruppel
jeremyruppel merged commit e28c59c into main Nov 6, 2026
62 of 63 checks passed
@jeremyruppel
jeremyruppel deleted the a11y/nested-interactive-2 branch November 6, 2026 21:09
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026
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