-
Notifications
You must be signed in to change notification settings - Fork 26
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
Some suggestions #274
Comments
Hi @asharonbaltazar , thanks for the interest in our package! Towards your first point, there are two open issues, #69 and #174 that are related to that, but nobody is currently working on them to my knowledge. Towards your second point, the escape key does close the dropdown menu, and certainly is part of the accessibility controls, you should be able to see that in action on the demo page: https://sparksuite.github.io/react-accessible-dropdown-menu-hook/demo/ If you have seen it not having that behavior and can describe how to reproduce it, it would be great if you could open an issue describing the bug so we can fix it. |
Thanks for the response. Sure, I'll open a ticket if I can recreate it. |
@corymharper If I click the button (with a mouse), and then immediately hit the escape key, it doesn't close. Technically focus is on the button at that point, not within the menu. Should that close the menu though? |
I think this might be a bug, when the menu opens the first menu item should receive focus, it appears that only happens when it is opened via keyboard controls. |
I think that's intentional? I believe we don't want a focus ring to appear around the first menu item if the button is clicked (rather than opened with a keyboard key). |
Yeah, take a look at: #63 |
I see, maybe we should alter the behavior slightly such that the menu will close if focus is on the menu button and escape is pressed. |
At least one of the menus mentioned in #63 does the same thing. |
That seems pretty reasonable. Let's do that. |
Accidentally pressed enter.
Edit: I'm liking this library, due to its simplicity in setting up a working dropdown menu. However, two things:
esc
key close the dropdown? Isn't that an accessibility feature?Otherwise, all good! Thanks so much.
The text was updated successfully, but these errors were encountered: