-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Dependencies check up
- I have verified that I use latest version of all @mantine/* packages
What version of @mantine/* packages do you have in package.json?
8.0.1
What package has an issue?
@mantine/dates
What framework do you use?
Other, I will specify in the bug description
In which browsers you can reproduce the issue?
All
Describe the bug
According to WCAG Success Criterion 1.4.13, additional content like popovers/tooltips etc that trigger when focusing something should be dismissible without leaving items focus state if they're not an error or not obscuring something else.
In the case of DateInput
it's very likely that it'll obscure something else when active and as such should ideally have a way to close the Datepicker popover without moving the focus.
I'm assuming the intent with this component, is that the Datepicker is mainly there as a visual help and the "main" intent is to enter date by keyboard rather than clicking in the popover. Never the less, we can make it more accessible!
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
I'm proposing we simple add a handler that listens for the Esc keydown and set the popover visible state to false. Any typing into the input would of course open it again. Which is fine, and expected!
Self-service
- I would be willing to implement a fix for this issue