Skip to content

[P1/bug] Context menu separator entries are typed as onClick no-ops — focus traps #336

Closed

Description

@EVWorth

Context

QueryFavorites.tsx:228-237 (separator items with onClick: () => {}).

Problem

The context menu rendered by useContextMenu treats separator entries as items with an onClick. The onClick: () => {} (line 232-234) is a no-op, but the entry is still focusable. A keyboard user tabbing through the context menu lands on the separator (announces nothing useful), then the parent div gets a focus event (because mousedown on the separator bubbles). The symptom is minor (focus jumps around) but the root cause is a typed-as-onClick separator that should be a separate type.

Files

  • src/components/favorites/QueryFavorites.tsx:228-237

Expected

Tabbing through the context menu lands on each entry, not on separators; the focused element is always visible.

Proposed fix

Scope S — look at useContextMenu's type definition; if separator is a discriminant on the entry type, the no-op onClick is hacky but not blocking. Add a keyboard test that tabs through the menu and asserts focus rings don't loop on separators.

Acceptance

Tabbing through the context menu lands on each entry, not on separators; the focused element is always visible.

Needs human verify

yes

Activity

  1. added
    audit
    severity/p1
    kind/bug
    area/favorites
    on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/favoritesauditkind/bugseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions