-
Notifications
You must be signed in to change notification settings - Fork 119
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
ActionMenu keyboard navigation: pressing space key on focused menu item should trigger the action #2253
Comments
Thanks for the report, @cbliard! @TylerJDev, I can confirm the behavior described in this issue. After opening |
Hey @cbliard, thanks for bringing this up! We have a PR which should partially fix this issue. This PR will allow menu items which were originally links, to be triggered with "Space" in addition to the "Enter" key. Here's an example of the As for the other examples, I see we don't respect the "Space" key when triggering a menu item that was originally a button. If I had to take a guess, I believe this is because we rely on the native functionality of the button to trigger the event. With buttons, space will only trigger the event on key up which only fires after the menu has already closed. @lesliecdubs, I can confirm this is an issue, but shouldn't require much lift to fix. |
Thanks @TylerJDev 🙇🏻♀️ I will bring this to the PVC working group to discuss and see if we can revive #2199 for merge, as well as addressing the remaining work here, which sounds like it is to respect the "Space" key when triggering a menu item that was originally a button (though please correct me if I got that wrong!). |
Thanks a lot for fixing this! |
When a user opens the ActionMenu dropdown by pressing space or enter, the first item is focused and the focus can be moved with the arrow keys, but pressing space does not properly trigger the associated action.
This can be experienced on LookBook ActionMenu with_actions example. On this one, Enter works as expected but not space key:
<button>
)It can also be experienced on other examples like links or opens_dialog. For these two, space key never triggers the action, even on second press.
The text was updated successfully, but these errors were encountered: