Add tab navigation to the search box #6094
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a tab index to the entry and each button/toggle in the search box. Now you can navigate from the search input to any of the buttons using the tab key and activate them with enter. This also adds a box shadow to the buttons when you navigate to them via the keyboard (but not when you click on them). Lastly, this changes the cursor to the pointer on the buttons.
I couldn't really find any similar UX in JupyterLab but this seemed like it'd be useful. I started to do this in search & replace (#6081), where it will be necessary to move between the two boxes, but I figured it'd be worth putting in early and separate. Any suggestions on improving the CSS or the look of the box shadow would be much appreciated.
Gif demo using tab and shift+tab to navigate, enter to activate the buttons: