Skip to content

Expand toolbox subcategories on keyboard focus#355

Merged
tracygardner merged 3 commits intomainfrom
codex/add-keyboard-focus-expansion-to-toolbox-categories
Mar 8, 2026
Merged

Expand toolbox subcategories on keyboard focus#355
tracygardner merged 3 commits intomainfrom
codex/add-keyboard-focus-expansion-to-toolbox-categories

Conversation

@tracygardner
Copy link
Contributor

Motivation

  • Improve keyboard accessibility so collapsible toolbox categories with nested subcategories expand when they receive keyboard focus, matching mouse click behavior.
  • Address cases where keyboard users could focus a category but not see or open its flyout contents.

Description

  • Added ensureKeyboardFocusedSelection_() to CustomCollapsibleToolboxCategory to set selection, expand the category, and show flyout contents without forcing pointer-specific focus handling in toolbox.js.
  • Wired a focusin handler on the category rowDiv_ to call ensureKeyboardFocusedSelection_() when the toolbox has keyboard focus so keyboard navigation expands subcategories.
  • Preserved existing pointer behavior (ensurePointerFocusedSelection_()), keeping mouse interactions unchanged.

Testing

  • Ran npm run build which completed successfully without errors.
  • Started the dev server and executed a Playwright script that tabs into the toolbox and captures a screenshot to confirm categories expand on keyboard focus, producing an artifact image for manual inspection.

Codex Task

@tracygardner tracygardner merged commit 1bc5c06 into main Mar 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant