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

Keyboard accessibility and focus behavior of the main menu - is it a bug? #721

Open
erdmann040 opened this issue May 30, 2021 · 1 comment

Comments

@erdmann040
Copy link
Contributor

erdmann040 commented May 30, 2021

Issue Overview

I wonder if the behavior that you see in the screenshot below is intended?

If I navigate trough the primary menu by tab and return, the previous sub-menus do not always close if i focus on a new menu item. I'm no accessibility expert - if that's the way things should work, please apologize. Also apologize my english, if anything is unclear let me know.

Describe your environment

WP Rig Installation on Local by Flywheel with Theme-Test-Data imported. OS: Linux (Fedora 32), Browser: Chrome & Firefox

Steps to Reproduce

  1. WordPress instance with WP Rig and the Theme-Test-Data installed.
  2. Go to the Dashboard and make "Testing Menu" the primary menu, so it appears in the header
  3. Logout from the Dashboard and revisit the page (frontend only)
  4. Press the Tab key repeatedly till you reach the sub-menu-toggle-button
  5. Hit enter to open the the sub-menu
  6. Press the Tab key repeatedly till you reach the last item of the primary menu "Lorem Ipsum"

Expected Behavior

I would expect the sub-menu to close as soon the menue item "Lorem Ipsum" takes the focus.

Current Behavior

... but the sub-menu does not close.

Possible Solution

There is a fosus-listener in the navigation.js, which closes sibling menus, when a new item gets the focus. But (if i get it right) it's only registered for menu-items with submenus. I guess if you add the listener to all menu items, it would behave as I expect it to.

I'm I right that this behavior is unintended? If its a bug i could try to repair it and in case I am successful, I would send my code as a pull request. So please let me know if it is a bug - I'm not sure about it.

Screenshots / Video

Related Issues and/or PRs

@erdmann040 erdmann040 changed the title Accessibility and focus behavior of the main menu Keyboard accessibility and focus behavior of the main menu - is it a bug? May 30, 2021
@Spleeding1 Spleeding1 mentioned this issue Jan 5, 2022
7 tasks
@erdmann040
Copy link
Contributor Author

Are you sure this bug has been descriped before? Issue #774 seams to be something mobile specific, the bug i descriped above isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant