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

bug(react/Menu): Hitting enter on MenuButton does not trigger the menu to open #5310

Open
4 tasks done
hbuchel opened this issue Jun 12, 2024 · 0 comments
Open
4 tasks done
Labels
accessibility Bugs or features related to accessibility bug Something isn't working Primitive An issue or a feature-request for one or more UI Primitive React An issue or a feature-request for React platform

Comments

@hbuchel
Copy link
Contributor

hbuchel commented Jun 12, 2024

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Primitive components

How is your app built?

Next.js

What browsers are you seeing the problem on?

No response

Which region are you seeing the problem in?

No response

Please describe your bug.

If you hit enter on any of the Menu elements it does not trigger the open functionality. In the first example, it triggers the onClick from the first MenuItem, alert('Download'). The MenuButton should be toggle-able with space or enter https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/#keyboard_interaction

The Radix component used as the base for this component works correctly https://www.radix-ui.com/primitives/docs/components/dropdown-menu#accessibility

What's the expected behaviour?

Hitting enter on the MenuButton should toggle the menu.

Help us reproduce the bug!

Hit enter on any of the menu buttons on the Docs page for Menu https://ui.docs.amplify.aws/react/components/menu

Code Snippet

// Put your code below this line.

Console log output

No response

Additional information and screenshots

No response

@hbuchel hbuchel added React An issue or a feature-request for React platform Primitive An issue or a feature-request for one or more UI Primitive accessibility Bugs or features related to accessibility labels Jun 12, 2024
@github-actions github-actions bot added the pending-triage Issue is pending triage label Jun 12, 2024
@esauerbo esauerbo added bug Something isn't working and removed pending-triage Issue is pending triage labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Bugs or features related to accessibility bug Something isn't working Primitive An issue or a feature-request for one or more UI Primitive React An issue or a feature-request for React platform
Projects
None yet
Development

No branches or pull requests

2 participants