ai / keyux

JS library to improve keyboard UI of web apps
https://ai.github.io/keyux/
MIT License
391 stars 18 forks source link

Wrong element pressed #29

Closed f3d0t closed 1 month ago

f3d0t commented 1 month ago

Hi. I've found some misleading behavior, and I think it's a bug.

STR:

  1. Go to Demo page, mouse click on List, then Tab (focus moved to First button)
  2. Press Tab, then V

AR: Focus remains on First button, but Outside button is pressed

ER: Focus remains on First button, First button is pressed

here is video of this bug:

https://github.com/user-attachments/assets/fd9c4de8-1e6e-48c4-bf2f-91714be5e5f9

ai commented 1 month ago

Yes, it is a bug. Do you want to do investigation and PR? It could be easy and fun.

I will be able to look only a few days later.

ai commented 1 month ago

No, it is not a bug.

These buttons is part of data-keyux-hotkeys feature. It is advanced feature for specific use case. For instance, when you have list of tweets, you move focus from tweet to tweet and each tweet has Like/Retweet button. You do not need to move to that buttons with Tab.

ai commented 1 month ago

I improved the example to explain better how to use this feature and avoid unexpected behavior 160ad3d