Skip to content

feat: add focus-visible styles to sidebar page tree items and action buttons (#1052)#1057

Merged
sw-factory-automations merged 1 commit into
mainfrom
feat/1052-sidebar-focus-visible-styles
May 12, 2026
Merged

feat: add focus-visible styles to sidebar page tree items and action buttons (#1052)#1057
sw-factory-automations merged 1 commit into
mainfrom
feat/1052-sidebar-focus-visible-styles

Conversation

@sw-factory-automations
Copy link
Copy Markdown
Collaborator

Closes #1052

What

Adds focus-visible styles 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 gets focus-visible:bg-overlay-active focus-visible:outline-none; expand/collapse chevron gets focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring
  • favorites-section.tsx — page navigation button gets focus-visible:bg-overlay-active focus-visible:outline-none; remove-favorite button gets focus-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 gets focus-visible:bg-overlay-active focus-visible:outline-none

Follows the pattern established in #1027 for workspace home page items. shadcn/ui Button components (Add sub-page, Page actions, Restore, Delete) already have built-in focus styles and were not modified.

Testing

  • pnpm lint — 0 errors
  • pnpm typecheck — clean
  • pnpm test — 139 files, 1877 tests passed
  • Pure style addition — no behavior changes, no new interactions

…buttons (#1052)

Co-authored-by: Ona <no-reply@ona.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment May 12, 2026 4:06pm

Request Review

@sw-factory-automations sw-factory-automations merged commit f34d0cf into main May 12, 2026
9 checks passed
@sw-factory-automations sw-factory-automations deleted the feat/1052-sidebar-focus-visible-styles branch May 12, 2026 17:03
@sw-factory-automations
Copy link
Copy Markdown
Collaborator Author

✅ Post-merge verification passed.

E2E tests (26 core tests): All passed — public-routes.spec.ts (18/18), auth.spec.ts (8/8).

Sidebar-related E2E tests (25 tests): 17 passed, 2 failed (pre-existing, unrelated to this PR), 6 did not run.

  • favorites.spec.ts — 1 failure: "user can add a page to favorites from context menu" — timing issue with page creation visibility. Not caused by this PR (CSS-only change).
  • trash.spec.ts — 1 failure: "user can restore a page from trash" — restore button visibility timing. Not caused by this PR (CSS-only change).

Ad-hoc smoke tests: All passed.

  • ✅ Landing page — loads, has title
  • ✅ Sign-in page — renders email input
  • ✅ Health endpoint — returns healthy status
  • ✅ Authenticated login flow — redirects to workspace
  • ✅ No console errors (unauthenticated or authenticated)
  • Skipped: /dashboard (404, not yet built), editor route (no page buttons in test workspace)

Interaction smoke test (focus-visible feature):

  • ✅ Sidebar renders correctly after login
  • ✅ Keyboard Tab navigation through sidebar — no errors
  • ✅ Trash section toggle — expand/collapse works
  • ✅ No console errors during focus interactions
  • Skipped: Page tree focus test (no pages with timestamps in test workspace), Favorites section (no favorited pages)

@sw-factory-automations
Copy link
Copy Markdown
Collaborator Author

✅ UI verification passed — design spec compliance confirmed.

Static analysis: All 5 modified elements use design-spec tokens (bg-overlay-active, ring-ring, text-label-faint, text-label-muted). No arbitrary colors, no hardcoded values, no spacing violations.

Storybook visual regression: 1/1 test passed — no visual changes to default component rendering (expected, since focus-visible styles only activate on keyboard navigation).

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 <button> elements that previously had no focus styling.

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.

feat: add focus-visible styles to sidebar page tree items and action buttons

1 participant