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

Issues with keyboard navigation on KDropdownMenu #588

Open
AlexVelezLl opened this issue Mar 25, 2024 · 6 comments
Open

Issues with keyboard navigation on KDropdownMenu #588

AlexVelezLl opened this issue Mar 25, 2024 · 6 comments
Labels
bug Component: KDropdownMenu help wanted Open source contributors welcome

Comments

@AlexVelezLl
Copy link
Member

Product

Noted in Studio, and in the KDS Docs on the last example of KListWithOverflow.

Expected behavior

Two things are not working very well right now:

  • When the list has dividers, the keyboard navigation should ignore them and focus on the next or previous item in the list.
    • In the options list, We can include dividers with a { type: "Divider" } object.
  • When the user presses tab or esc, we should return the focus to the last element focused before KDropdownMenu was active. This can be done by saving the document.activeElement before focusing the first option of the dropdown menu.

Actual behavior

  • Right now, the focus doesn't change when there are dividers and we want to focus the next item, and we can't jump the dividers.
  • As KDropdownMenu is rendered in the body element, when esc or tab is pressed, the focus returns to the first focusable element on the document after a second. But before the focus returns to the body, the next option in the menu is focused, and after a second, the menu closes, which is a bit misleading since, at first, it seems that we could navigate through the menu with a tab.

Steps to reproduce the issue

  1. Go to the KListWithOverflow documentation.
  2. Click on the box of the last list example.
  3. Navigate with the keyboard through the dropdown menu and note the issues described above.

Additional information

Compartir.pantalla.-.2024-03-25.16_22_53.mp4
@galovdev
Copy link
Contributor

Can I get this assigned?

@MisRob
Copy link
Member

MisRob commented Mar 26, 2024

Hi @galovdev, thank you for volunteering, I will assign you

@nucleogenesis
Copy link
Member

Hello @galovdev, are you still interested in contributing on this issue? If not, we will reassign it.

@galovdev
Copy link
Contributor

Hello @galovdev, are you still interested in contributing on this issue? If not, we will reassign it.

Hi, please give me this weekend, Im working on the other issue

@marcellamaki
Copy link
Member

Thank you @galovdev - no problem. Please reach out if you have any questions.

@MisRob
Copy link
Member

MisRob commented Jun 11, 2024

Hi @galovdev, are you still planning to work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Component: KDropdownMenu help wanted Open source contributors welcome
Projects
None yet
Development

No branches or pull requests

5 participants