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

ng-select: "X"(Clear all) button in the dropdown is not accessible through the keyboard "Tab" key. [It is only accessible through Mouse] #2239

Open
sachinkkarande opened this issue May 25, 2023 · 7 comments

Comments

@sachinkkarande
Copy link

Describe the bug
ng-select: "X"(Clear all) button in the dropdown is not accessible through the keyboard "Tab" key. [It is only accessible through Mouse]
Testes with latest version of ng-select 10.0.4. Same thing is observed.

Reproducbile example

To Reproduce
Steps to reproduce the behavior :

  1. Do not use Mouse
  2. Use only keyboard to navigate to the ng-select dropdown
  3. from ng-select dropdown select any option
  4. Use keyboard "Tab" key to select the "x" clear all button
  5. Observe that "X" Clear all button does not receive keyboard focus and not accessible

Expected behavior
"X" Clear All button should be keyboard accessible. So that User using only keyboard will able to access the button.

Screenshots
Check GIF: "ng-select X clear all button not selectable through keyboard tab.gif"
ng-select X clear all button not selectable through keyboard tab

Desktop (please complete the following information):

  • OS: macOS Ventura version 13.3.1
  • Browser: Chrome, FF, Safari.

Additional context
Add any other context about the problem here.

@WaseemSabir
Copy link
Contributor

what would be better experience?

  1. Esc clears the text
  2. Tab moves to focus on the “X” button

I want to contribute, can I take this? @pavankjadda

@pavankjadda
Copy link
Collaborator

pavankjadda commented May 28, 2023 via email

@sachinkkarande
Copy link
Author

sachinkkarande commented May 29, 2023 via email

@luanadeoliveira
Copy link

The X clear all "button" is in a span tag... so I wonder if just adding the attribute role="button" and tabindex="0" or just updating the tag from span to button.

@simon-asp
Copy link

Hello! Any news on this? Working for an organization where accesibility is very high prio, this would help :)

I agree that the "X" button should be focusable with the tab key

@pavankjadda
Copy link
Collaborator

Merged

@LAURENS-Damien
Copy link

Hi,

I think the point "Tab moves to focus on the “X” button" need to be enhanced for "Shift tab" because currently, users are blocked in the component instead to be able to focus previous element in the DOM.
Are you ok with my proposition?

@pavankjadda pavankjadda reopened this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants