Skip to content

fix(app-shell): mark only the current page as aria-current; fix comments - #90

Open
Tim7179 wants to merge 1 commit into
mainfrom
fix/app-shell-a11y
Open

Tim7179 wants to merge 1 commit into
mainfrom
fix/app-shell-a11y

Conversation

@Tim7179

@Tim7179 Tim7179 commented Oct 15, 2026

Copy link
Copy Markdown

Summary

  • The breadcrumb set aria-current="page" on its last crumb unconditionally. With the top-right nav also marking the active page, screen readers announced two current pages (e.g. on /keys: both "LLM" and "金鑰").
  • Comments on tips and BuildVersion contradicted the code.

Changes

  • registry/winlab/blocks/app-shell/app-shell.tsx
    • A crumb gets aria-current="page" only when its href equals the pathname (exact match). The last crumb keeps text-foreground.
    • Tip comments: required on Crumb / NavItem / AccountMenu; only custom corner content built from CornerTip may omit tip.
    • BuildVersion comment: reads NEXT_PUBLIC_BUILD_SHA, NEXT_PUBLIC_BUILD_TIME and optional NEXT_PUBLIC_BUILD_URL set by the consuming app's build; shows "dev" when the SHA is unset.
  • Downstream apps re-pull with npx shadcn@latest add @winlab/app-shell -o.

Test plan

  • bun run theme:check, tokens:check
  • npm run lint, typecheck, format:check
  • npm run build (shadcn build + next build)
  • CI (check + smoke)

🤖 Generated with Claude Code

https://claude.ai/code/session_01UAYrDDPPupKfj2gXkb9ih3

The breadcrumb set aria-current="page" on its last crumb unconditionally,
so with a nav item also marked current, screen readers announced two
current pages. A crumb is now current only when its href is the pathname.
The last crumb keeps its visual emphasis.

Also make the tip comments say what the types enforce (required on
Crumb/NavItem/AccountMenu, optional only for custom CornerTip use) and
describe BuildVersion's actual env contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UAYrDDPPupKfj2gXkb9ih3
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