feat: add focus-visible styles to sidebar page tree items and action buttons (#1052)#1057
Conversation
…buttons (#1052) Co-authored-by: Ona <no-reply@ona.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✅ Post-merge verification passed. E2E tests (26 core tests): All passed — Sidebar-related E2E tests (25 tests): 17 passed, 2 failed (pre-existing, unrelated to this PR), 6 did not run.
Ad-hoc smoke tests: All passed.
Interaction smoke test (focus-visible feature):
|
|
✅ UI verification passed — design spec compliance confirmed. Static analysis: All 5 modified elements use design-spec tokens ( Storybook visual regression: 1/1 test passed — no visual changes to default component rendering (expected, since Live site screenshots: Verified sidebar in dark mode, light mode, and mobile viewport. No layout regressions, no broken rendering. Focus-visible indicators are subtle and consistent with the design spec's overlay token system. Accessibility: PR improves keyboard navigation by adding visible focus indicators to 5 bare |
Closes #1052
What
Adds
focus-visiblestyles to bare<button>elements in the sidebar so keyboard users can see which element is focused when tabbing through the page tree, favorites, and trash sections.How
Added Tailwind
focus-visible:classes to 5 bare<button>elements across 3 files:page-tree-item.tsx— page navigation button getsfocus-visible:bg-overlay-active focus-visible:outline-none; expand/collapse chevron getsfocus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ringfavorites-section.tsx— page navigation button getsfocus-visible:bg-overlay-active focus-visible:outline-none; remove-favorite button getsfocus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring(also becomes visible on focus)trash-section.tsx— trash toggle button getsfocus-visible:bg-overlay-active focus-visible:outline-noneFollows the pattern established in #1027 for workspace home page items. shadcn/ui
Buttoncomponents (Add sub-page, Page actions, Restore, Delete) already have built-in focus styles and were not modified.Testing
pnpm lint— 0 errorspnpm typecheck— cleanpnpm test— 139 files, 1877 tests passed