Open arnodemer opened 3 weeks ago
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.
No response
10.7.0
17.x
TypeScript
Create React App (CRA)
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.
per accessibility rules, dropdown component should be focused after item selection or after remove selected item
Similar to https://github.com/primefaces/primereact/issues/6803
Siimilar to: https://github.com/primefaces/primereact/issues/6269
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