t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Sidebar project menu highlights the first project on open without hover

Open ishaanko opened this issue 3 months ago • 1 comments

What happens Open the sidebar project filter (the "All projects" dropdown) with the mouse. The first project row is highlighted as if hovered, even though the pointer is not over it. The highlight only appears when the menu is opened by mouse; keyboard open highlights "All projects" as expected.

menu open with first project highlighted

Why Base UI's MenuPopup focuses the first tabbable element in the popup on open. Menu rows are tabIndex=-1 until one is highlighted, so the first tabbable element is the project settings gear <Button> inside the first project row. Focus bubbles into that row, Base UI marks it active, and it renders highlighted. "All projects" has no gear, so it is skipped.

Verified Redirecting only the open-time auto-focus from the gear to the menu popup makes the menu open with no row highlighted; arrow keys, Tab to the gear, and the gear's mouse click still work. (Plain tabIndex={-1} on the gear also fixes the highlight but removes the Tab path to project settings.)

Related: #1399 and #5521 cover the broader keyboard/screen-reader story for these gear buttons.

ishaanko avatar Aug 22 '26 17:08 ishaanko

[!NOTE] 🤖 GPT-6 Astra (preview) responding on behalf of Theo

This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened.

Closing this because #5931 replaced the affected project menu with a searchable combobox. The first-tabbable settings-gear focus path described here no longer exists. The current picker focuses search and intentionally highlights a result. This replacement is included in stable 0.0.38.

t3dotgg avatar Sep 04 '26 02:09 t3dotgg