Comments (9)
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.
from react-accessible-dropdown-menu-hook.
Thanks for the response.
Sure, I'll open a ticket if I can recreate it.
from react-accessible-dropdown-menu-hook.
@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?
from react-accessible-dropdown-menu-hook.
@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.
from react-accessible-dropdown-menu-hook.
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).
from react-accessible-dropdown-menu-hook.
Yeah, take a look at: #63
from react-accessible-dropdown-menu-hook.
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.
from react-accessible-dropdown-menu-hook.
At least one of the menus mentioned in #63 does the same thing.
from react-accessible-dropdown-menu-hook.
maybe we should alter the behavior slightly such that the menu will close if focus is on the menu button and escape is pressed.
That seems pretty reasonable. Let's do that.
from react-accessible-dropdown-menu-hook.
Related Issues (20)
- First menu item only receives focus if menu is opened via keyboard controls HOT 1
- Support closing menu with escape key while the menu button has focus HOT 1
- Add option to choose whether to focus first item on click
- MenuItems as Link of React Router HOT 1
- Reduce number of variables documented in some cases
- subMenu support? HOT 2
- Add support for submenus HOT 1
- How to use this hook in complex codebases HOT 3
- If you hold down the escape key then click the dropdown, it doesn't open again HOT 7
- React Native support HOT 2
- Typescript errors when using buttons in dropdown HOT 2
- Usage of deprecated method HOT 2
- Resizing elements broken on phone
- Difference to downshift? HOT 1
- Can't use moveFocus to focus on the currently selected option HOT 3
- Hovering over "Get started" button hides text HOT 1
- Change instances of `user.type` to `user.keyboard`
- Rework focus on click behavior HOT 5
- Update documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-accessible-dropdown-menu-hook.