Skip to content

fix(web): make sidebar project actions reachable by keyboard and screen reader - #5521

Open
akj wants to merge 3 commits into
pingdotgg:mainfrom
akj:fix/sidebar-project-actions-keyboard
Open

fix(web): make sidebar project actions reachable by keyboard and screen reader#5521
akj wants to merge 3 commits into
pingdotgg:mainfrom
akj:fix/sidebar-project-actions-keyboard

Conversation

@akj

@akj akj commented Aug 6, 2026

Copy link
Copy Markdown

What Changed

Project actions in the sidebar's "Filter threads by project" menu are now reachable by keyboard and screen reader:

  • Pressing Shift+F10 or the Context Menu key on a focused project item opens the existing Project settings dialog (rename, grouping, remove) — the same interaction thread rows already support.
  • The per-project ellipsis button remains as a mouse-only affordance but is now hidden from assistive technology (aria-hidden, tabIndex={-1}), so screen readers announce each item as just the project name instead of appending phantom "Project actions for…" text.

9 insertions, 2 deletions in apps/web/src/components/SidebarV2.tsx. No visual changes.

Why

The ellipsis button was nested inside a MenuRadioItem (role="menuitemradio"). ARIA menus move focus between items with arrow keys and cannot focus a child of an item, Enter activates the radio, and screen readers flatten the button's label into the item's accessible name — so every project-level action (including Remove project) was mouse-only, and items announced incorrectly to screen readers. Full analysis in #1399 (current-state comment); this fixes the remaining half of that issue.

Attaching the handler to the menu item's native contextmenu event mirrors the pattern thread rows in the same sidebar already use, and works because Base UI menu items hold real DOM focus while highlighted (verified against useListNavigation in @base-ui/reactvirtual defaults to false), so Shift+F10 dispatches contextmenu at the focused item.

UI Changes

No visual changes — the menu renders identically; only keyboard/AT interaction changed. Verified with NVDA on Windows 11 in the Electron dev build: arrowing through the filter menu announces clean project names, Shift+F10/Context Menu key on a project item opens the Project settings dialog with all actions (rename, grouping, remove) reachable, and Enter still selects the filter as before. Mouse behavior (click ellipsis, click item) is unchanged.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (n/a — no visual change; NVDA interaction verification described above)
  • I included a video for animation/interaction changes (n/a — the interaction is screen-reader keyboard navigation; described above instead)

Note

Low Risk
Sidebar-only accessibility and event-handling tweaks; no auth, data, or API changes.

Overview
Project settings in the “Filter threads by project” menu are now reachable without the mouse: each project row handles onContextMenu (right-click, Shift+F10, or Context Menu key) and reuses handleProjectActions to open the existing Project settings dialog, matching thread rows in the same sidebar.

The per-project ellipsis stays for pointer users but is aria-hidden with tabIndex={-1} so screen readers announce only the project name instead of nested “Project actions…” inside a menuitemradio.

Opening actions from a row can still fire a follow-up radio onValueChange (notably macOS Safari after Ctrl+click). A suppressNextScopeChangeRef skips that single scope update when opening project actions and resets when the filter menu opens again so normal filtering is unchanged.

Reviewed by Cursor Bugbot for commit 28b51a8. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Make sidebar project actions reachable by keyboard and screen reader in SidebarV2

  • The trailing actions button inside each project MenuRadioItem is now hidden from keyboard focus and assistive tech (tabIndex={-1}, aria-hidden="true"), so keyboard/screen reader users are no longer stuck on it.
  • Right-clicking a project entry in the scope menu now opens project actions instead of selecting/changing the scope.
  • A suppressNextScopeChangeRef flag prevents an unintended scope change from firing after project actions are triggered via click or context menu.
  • Behavioral Change: The inner actions button is no longer reachable via keyboard Tab navigation.

Macroscope summarized 28b51a8.

…en reader

The per-project actions button in the 'Filter threads by project' menu
was nested inside a menuitemradio, where ARIA menus cannot focus it:
arrow keys move between items, Enter activates the radio, and screen
readers flatten the button's label into the item's accessible name.
Project settings (remove, rename, grouping) were mouse-only.

Open project actions from a contextmenu event on the menu item itself,
so Shift+F10 and the Context Menu key work the same way they already do
on thread rows. The ellipsis button stays as a mouse-only affordance,
hidden from assistive tech so item names announce cleanly.

Fixes the remaining half of pingdotgg#1399.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d5b37fb-01e3-487d-b754-86f2b1747f28

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 6, 2026
Comment thread apps/web/src/components/SidebarV2.tsx
@macroscopeapp

macroscopeapp Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 28b51a8

Accessibility fix that adds keyboard/screen reader support for sidebar project actions. Changes are limited to adding contextmenu handlers, proper ARIA attributes, and a defensive workaround for a Safari/macOS browser quirk. No business logic or runtime behavior changes beyond the intended accessibility improvements.

You can customize Macroscope's approvability policy. Learn more.

On macOS, Ctrl+click fires contextmenu and Safari also fires a
follow-up click on the same element. That click could activate the
radio item and change the project filter underneath the settings
dialog. stopPropagation on contextmenu cannot block the separate click
event, so briefly suppress scope changes after project actions open.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ac834d8. Configure here.

Comment thread apps/web/src/components/SidebarV2.tsx
The 500ms suppression window could in principle swallow a legitimate
filter selection. Suppress exactly one scope change instead, clearing
the flag whenever the menu reopens: a real selection always starts by
reopening the menu, so only the Safari ghost click after Ctrl+click can
ever be suppressed.
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant