Skip to content

fix(sidebar): expose the active nav destination to assistive tech - #6448

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/nav-destinations-aria-current-w2
Aug 24, 2026
Merged

fix(sidebar): expose the active nav destination to assistive tech#6448
pedrofrxncx merged 1 commit into
mainfrom
fix/nav-destinations-aria-current-w2

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Accessibility gap in the sidebar's destination list (Home / Reports / Tasks / Library, plus coding-agent rows): the active item is only marked via a data-active attribute used for CSS styling — nothing tells assistive tech which destination is currently selected.

Why it matters: a screen-reader user navigating this list has no way to tell which destination (or coding agent) is currently open; sighted users get this for free from the active-state styling.

Fix: add aria-current="page" on the active SidebarMenuButton, mirroring item.isActive (already computed for both destinations and coding-agent rows, since row() is shared). SidebarMenuButton (packages/ui) spreads unknown props onto the underlying element, so no change to the shared component was needed.

To confirm: open the sidebar, select a destination, and inspect the corresponding <button> — it now carries aria-current="page"; inactive rows have no aria-current attribute.

Checks run locally: bun run fmt, bunx tsc --noEmit (apps/web, clean), bunx oxlint apps/web/src/components/sidebar/nav-destinations.tsx (0 warnings/errors). No existing test covers this file (it's hook-heavy, not pure logic) — full CI validates the rest.


Summary by cubic

Marks the active sidebar destination with aria-current="page" so screen readers can announce the current page. Previously only a data-active attribute indicated the active item; now the active button exposes its state without changing visuals.

  • Applies to both standard destinations and coding-agent rows by mirroring item.isActive.
  • Implemented by passing aria-current to SidebarMenuButton; packages/ui already forwards unknown props, so no shared UI change.
  • Review: select a destination and inspect the button; it has aria-current="page". Inactive items have no aria-current.

Written for commit 4250a8a. Summary will update on new commits.

Review in cubic

@pedrofrxncx
pedrofrxncx enabled auto-merge (squash) August 24, 2026 15:49
@pedrofrxncx
pedrofrxncx merged commit 37a4613 into main Aug 24, 2026
34 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/nav-destinations-aria-current-w2 branch August 24, 2026 15:50
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