Dropdown: lost focus when select item using keyboard [also lost focus when remove selected item using keyboard] #6873
Labels
Component: Accessibility
Issue or pull request is related to WCAG or ARIA
Describe the bug
When select dropdown's item using mouse, the focus is restored on dropdown component.
But when select item using keyboard, the focus is lost.
Also when move focus to X button of selected item and hit enter, dropdown lost focus.
Reproducer
No response
PrimeReact version
10.7.0
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
go to Dropdown showcase: https://primereact.org/dropdown/#filter
open dropdown item list
set focus on filter input (in our case, dropdown has autoFocus props set)
use keyboard arrow up/down to pre-select and item
hit Enter keyboard key
=> item is selected but dropdown component is not focused.
restore focus on dropdown component with selected country item
hit tab to move focus on X cross button
hit enter
=> the item is removed from dropdown (good) but focus is not restored on dropdown component.
Expected behavior
per accessibility rules, dropdown component should be focused after item selection or after remove selected item
The text was updated successfully, but these errors were encountered: