Background
There are additional modes of keyboard navigation that would improve the ChipInput component:
- In the input with no input value, backspace should focus the last FilterChip. (Backspacing again will remove the FilterChip - this is already implemented in the FilterChip component)
- The arrow keys should allow you to navigate between the individual FilterChips and the input
- The escape key should unfocus the input and create a new chip with the current value of the input (the latter part already works on blur)
User stories
As a user of the ChipInput component, I want to be able to smoothly navigate and use the input via the keyboard.
Previous implementations
- OOUI: TagMultiselectWidget
Design spec
Open questions
- Is blur on esc needed?
Acceptance criteria (or Done)
Design
- Update the component in the Figma library.
Code
- Implement backspace behavior: when the input is empty, backspace focuses the last FilterChip
- Implement arrow key ←+→ navigation: horizontal arrow keys navigate between individual FilterChips and the input
- Implement escape key ⎋ behavior: escape blurs the input and current input text becomes a new chip