Basically, if I immediately dismiss the calendar by pressing Esc, without actually going into the calendar, it seems impossible to make the calendar reappear with a keyboard. I'm still able to with a mouse by:
clicking away from the date picker
clicking back onto the date picker
NOTE that if I first arrow into the calendar before dismissing, the functionality is fine. So whatever is triggering the calendar to 'reset' after being dismissed is somehow failing if the focus isn't first moved to the calendar before it is dismissed.
Navigate by Tab into the main storybook panel until the focus lands on the date input. A focus indicator will appear around the input, and a calendar opens up
Press Esc. The calendar disappears
Tab away from the date input, then Shift+Tab back again. The calendar does not appear
Press Enter, Down Arrow, Space bar, and any combination of these with modifier keys. Nothing seems to cause the calendar to appear.
Refresh the page (i.e., with Ctrl+R) and then navigate by Tab to the date picker. The calendar reappears.
Note that if I use a mouse or actually navigate to the calendar before dismissing with Esc, the calendar will appear when it gets focus again:
Repeat step 1 above
Arrow down into the calendar, then press Esc. The calendar collapses and the input has the focus again
Tab away from the input and then Shift_Tab back. The calendar once again appears.
The same behaviour can be realized with a mouse
Click on the input. A calendar appears.
Press Esc. The calendar collapses.
Click the input. Nothing happens, HOWEVER.
Click any area outside the input, then click the input again. The calendar reappears.
Package
@carbon/react
Browser
Chrome
Operating System
MacOS
Package version
https://react.carbondesignsystem.com/?path=/story/components-datepicker--single-with-calendar#storybook-preview-wrapper
React version
https://react.carbondesignsystem.com/?path=/story/components-datepicker--single-with-calendar#storybook-preview-wrapper
Automated testing tool and ruleset
n/a
Assistive technology
No response
Description
Although the function to dismiss the calendar with Esc was implemented in https://github.com/carbon-design-system/carbon/pull/12567 there is a new bug as a result of that.
Basically, if I immediately dismiss the calendar by pressing Esc, without actually going into the calendar, it seems impossible to make the calendar reappear with a keyboard. I'm still able to with a mouse by:
NOTE that if I first arrow into the calendar before dismissing, the functionality is fine. So whatever is triggering the calendar to 'reset' after being dismissed is somehow failing if the focus isn't first moved to the calendar before it is dismissed.
WCAG 2.1 Violation
2.1.1 Keyboard
Reproduction/example
https://react.carbondesignsystem.com/?path=/story/components-datepicker--single-with-calendar#storybook-preview-wrapper
Steps to reproduce
Note that if I use a mouse or actually navigate to the calendar before dismissing with Esc, the calendar will appear when it gets focus again:
Code of Conduct