Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown: lost focus when select item using keyboard [also lost focus when remove selected item using keyboard] #6873

Open
arnodemer opened this issue Jul 11, 2024 · 2 comments
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA

Comments

@arnodemer
Copy link
Contributor

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

  1. go to Dropdown showcase: https://primereact.org/dropdown/#filter

  2. open dropdown item list

  3. set focus on filter input (in our case, dropdown has autoFocus props set)

  4. use keyboard arrow up/down to pre-select and item

  5. hit Enter keyboard key
    => item is selected but dropdown component is not focused.

  6. restore focus on dropdown component with selected country item

  7. hit tab to move focus on X cross button

  8. 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

@arnodemer arnodemer added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 11, 2024
@melloware melloware added Component: Accessibility Issue or pull request is related to WCAG or ARIA and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 11, 2024
@melloware
Copy link
Member

Similar to #6803

@melloware
Copy link
Member

Siimilar to: #6269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA
Projects
None yet
Development

No branches or pull requests

2 participants