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

A11y: submenus should not open/close on focus #203

Open
jenlampton opened this issue Jun 27, 2022 · 2 comments
Open

A11y: submenus should not open/close on focus #203

jenlampton opened this issue Jun 27, 2022 · 2 comments

Comments

@jenlampton
Copy link

jenlampton commented Jun 27, 2022

In recent accessibility testing, we found that having a submenu open on focus was very confusing to an unsighted user.

In this case, they could not tell that the item had opened (they were expecting to open it themselves, only if they wanted) and immediately got lost in the submenu.

I located a very old forum post requesting this feature, and at the time it couldn't "be achieved very easily", but I'm wondering if the same is true now.

I know there is a setting for noMouseOver: true to change the submenu open behavior from onHover to onClick, is there something similar for onFocus?

@vadikom
Copy link
Owner

vadikom commented Jun 30, 2022

Hi, the behavior that is implemented in the script for screen-reader users is similar to the following:

http://adobe-accessibility.github.io/Accessible-Mega-Menu/

So, yes, basically, once a focused main menu item is activated, a user can just use the Tab key (or arrows if the Keyboard addon is used) to move the focus to any sub menus/links. And it is really not very simple to change this as quite a lot of code would need to be modified.

But I believe the Adobe guys did some testing too and, as far as I can see, they still use a similar solution. So I must admit I am a bit confused and not completely sure if this is really a serious issue for all screen-reader users or not. But I also must admit that I am aware of many cases (related to similar popup functionality) where a separate toggle button is used (like you suggested in your other recent filed issue). So I try to do a bit more research and will consider this in the future.

@jenlampton
Copy link
Author

So, yes, basically, once a focused main menu item is activated

The problem was that there was no separate "activate" action from the "focus" action. The user thought since there were 5 top-level links, hitting the Tab key 5 times would get them to the last one. However, on the third TAB, they entered a sub-menu for the second link, and hitting Tab more times just got them deeper and deeper into the menu tree. Because Esc also did not back them out of it, they got stuck and were never able to reach that 5th top-level link.

We're looking into adding keyboard addon, to see if that up arrow might solve some of these problems. 🤞 But we'd also be willing to work on some of these other solutions if they seemed appealing to you.

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

2 participants