Menubar: Enter key moves focus at first menuitem #15040
Labels
Component: Accessibility
Issue or pull request is related to WCAG or ARIA
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
In terms of accessibility, user uses keyboard to navigate through the page. When there is a menubar without sub-menu items, only menu items at first level, pressing enter key at any of the menu items moves the focus to the first menuitem instead of keeping it on the clicked one.
Environment
N/A
Reproducer
No response
Angular version
17.0.8
PrimeNG version
17.7.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.10.0
Browser(s)
All
Steps to reproduce the behavior
For example, look at the primeng documentation, https://primeng.org/menubar#basic menubar basic:
If users navigates with keyboard until Quit menu item, and does click on it, you will see that focus is moved to File menu item. This behavior is pretty confusing for those users that use some Screen Readers, as it will announce that the focus has been move to another element into the menu.
Expected behavior
What is expected for those menu items (first level) without sub-items is that focus keeps on the clicked menu item.
The text was updated successfully, but these errors were encountered: