-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
MenuDivider does not handle escape key to close popover #6054
Comments
A better solution that accomplishes what you want would be to add |
@bvandercar-vt that's a good point, I don't think we should use But the alternative solution gets tricky when you want to implement
Both of those require a bit of work which I'm not sure is worth the cost for this small feature. I think a reasonable compromise would be to use As long as this doesn't trigger any strict a11y validation failures, I'd prefer this simple approach. |
@adidahiya yep if |
Continuing discussion in #6457 -- it turns out this did cause a11y aXe failure. |
Environment
Code Sandbox
https://codesandbox.io/p/sandbox/recursing-wave-ldgezp
Steps to reproduce
disabled={true}
orshouldDismissPopover={true}
)Actual behavior
Popover closed after step 4
Popover stayed open after step 6
Expected behavior
Popover should close after step 4, and also after step 6
Possible solution
Seems related to #5947, where the suggestion of adding a
tabIndex={0}
to an element which should be focusable (and therefore handle the "escape key to close overlay" behavior) seems to work. Should be an easy fix toMenuDivider.tsx
, probably just need to addtabIndex={0}
here:blueprint/packages/core/src/components/menu/menuDivider.tsx
Line 54 in 6d86a19
The text was updated successfully, but these errors were encountered: