Skip to content

fix: include additional toggles in find input arrow key navigation - #306559

Merged
Megan Rogge (meganrogge) merged 1 commit into
microsoft:mainfrom
yogeshwaran-c:fix/notebook-find-arrow-key-nav-additional-toggles
Apr 2, 2026
Merged

Megan Rogge (meganrogge) merged 1 commit into
microsoft:mainfrom
yogeshwaran-c:fix/notebook-find-arrow-key-nav-additional-toggles

Conversation

@yogeshwaran-c

@yogeshwaran-c Yogeshwaran C (yogeshwaran-c) commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix (accessibility)

What is the current behavior?

When using arrow keys to navigate between toggle buttons in the find input (case sensitive, whole words, regex), only the three standard toggles are reachable. Additional toggles — such as the notebook find filter button (funnel icon) — are excluded from keyboard navigation. This means users who rely on keyboard navigation cannot reach these controls using arrow keys.

Fixes #207765

What is the new behavior?

Arrow key navigation now includes all toggles in the find input:

  1. FindInput base class: The static indexes array (hardcoded to [caseSensitive, wholeWords, regex]) is replaced with a dynamic `getToggleDomNodes()` method that returns DOM nodes for all standard toggles plus any `additionalToggles`.

  2. NotebookFindInput subclass: Overrides `getToggleDomNodes()` to also include the filter button container, so the notebook find widget's funnel icon is reachable via arrow keys.

The `getToggleDomNodes()` method is `protected`, allowing any subclass of `FindInput` to extend the set of keyboard-navigable toggles.

Additional context

The issue was identified by Andrea Mah (@andreamah), who pointed to the exact location in `findInput.ts` where the arrow key indexes were hardcoded. The fix is minimal and scoped:

  • `src/vs/base/browser/ui/findinput/findInput.ts` — extract toggle DOM node list into overridable method
  • `src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.ts` — override to include filter button

@meganrogge Megan Rogge (meganrogge) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@meganrogge Megan Rogge (meganrogge) added this to the 1.115.0 milestone Apr 2, 2026
@meganrogge
Megan Rogge (meganrogge) enabled auto-merge (squash) April 2, 2026 15:26
@meganrogge
Megan Rogge (meganrogge) merged commit e1e2920 into microsoft:main Apr 2, 2026
18 checks passed
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot use arrow keys to go to toggle icon in notebook find widget

4 participants