Skip to content

fix(site/src/pages/WorkspaceBuildPage): render build sidebar rows as links, not buttons inside links - #31870

Merged
aqandrew merged 2 commits into
mainfrom
fix/workspace-build-sidebar-links
Nov 12, 2026
Merged

aqandrew merged 2 commits into
mainfrom
fix/workspace-build-sidebar-links

Conversation

@aqandrew

@aqandrew aqandrew commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Note

This PR was generated by Coder Agents on behalf of @aqandrew.

Each build row in the workspace build page sidebar (/@user/workspace/builds/:number) rendered as a <button> inside an <a>. That is invalid HTML and fails axe nested-interactive. Keyboard users had two tab stops per row, and screen readers could announce the row content twice.

Each row is now a single react-router Link (SidebarLink) with aria-current="page" on the active build. Skeleton rows render as a non-interactive div (SidebarItemSkeleton) instead of empty buttons. The sidebar looks the same as before.

No DEQ ticket matches this page. The existing nested-interactive tickets cover Audit Logs, Create Template, Templates Listing, Workspace Sharing and TemplateBuilder Step 2. This came up in review of #30819: #30819 (comment)

Notes and verification

Changes

  • Sidebar.tsx: replace the <button> SidebarItem with SidebarLink (LinkProps & { active: boolean }, sets aria-current when active) and add SidebarItemSkeleton.
  • WorkspaceBuildPageView.tsx: render each build row as <SidebarLink to active> around WorkspaceBuildData, and use SidebarItemSkeleton for loading rows.
  • WorkspaceBuildPageView.test.tsx (new): asserts the active build is the link with aria-current="page", and that Tab moves link to link with one stop per build. Pixel screenshots cannot catch either behavior. The test fails on main and passes with this change.

Decisions

  • NavLink was considered and rejected. It ties the active state to the URL, but the view takes activeBuildNumber as a prop.

Out of scope

  • site/src/pages/WorkspacePage/HistorySidebar.tsx:48 skeleton rows still use the <button> SidebarItem from components/FullPageLayout/Sidebar.tsx, so they are focusable empty buttons. That belongs with the button-name work.

Verification

  • pnpm test for WorkspaceBuildPageView.test.tsx and WorkspaceBuildPage.test.tsx: pass.
  • pnpm lint:types, biome: pass.
  • WorkspaceBuildPageView Storybook stories: pass. Before and after screenshots of the sidebar are pixel-identical.
  • frontend-deep-review: no blocking findings. Should-fix items (shared className, no-op classes, required active, fixture naming) are addressed.

…idebar-links

# Conflicts:
#	site/src/pages/WorkspaceBuildPage/Sidebar.tsx
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:07 — with GitHub Actions Inactive
@aqandrew
aqandrew marked this pull request as ready for review November 12, 2026 21:17
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:17 — 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.

very nice!

@aqandrew
aqandrew merged commit f883e6e into main Nov 12, 2026
33 checks passed
@aqandrew
aqandrew deleted the fix/workspace-build-sidebar-links branch November 12, 2026 21:21
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:21 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to docs-preview November 12, 2026 21:21 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026
@Jesswinters

Copy link
Copy Markdown
Contributor

Late to the review but heck yeah a much needed fix!! ✨

This branch was previously deployed

2 inactive deployments
main — 2920de99 Deployed Nov 12, 2026 by aqandrew via cla #255312
docs-preview — 2920de99 Deployed Nov 12, 2026 by aqandrew via cleanup #8
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.

3 participants