Skip to content
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

[a11y]: Date picker calendar, if dismissed with Esc without interacting, cannot be retriggere #14772

Open
2 tasks done
mbgower opened this issue Oct 3, 2023 · 1 comment
Open
2 tasks done

Comments

@mbgower
Copy link

mbgower commented Oct 3, 2023

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 #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:

  1. clicking away from the date picker
  2. clicking back onto the date picker
image

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

  1. Launch any of the data pickers with calendars in Carbon's storybook, such as https://react.carbondesignsystem.com/?path=/story/components-datepicker--single-with-calendar#storybook-preview-wrapper
  2. 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
image 2. Press Esc. The calendar disappears 3. Tab away from the date input, then Shift+Tab back again. The calendar does not appear 4. Press Enter, Down Arrow, Space bar, and any combination of these with modifier keys. Nothing seems to cause the calendar to appear. 5. 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:

  1. Repeat step 1 above
  2. Arrow down into the calendar, then press Esc. The calendar collapses and the input has the focus again
  3. Tab away from the input and then Shift_Tab back. The calendar once again appears.
    The same behaviour can be realized with a mouse
  4. Click on the input. A calendar appears.
  5. Press Esc. The calendar collapses.
  6. Click the input. Nothing happens, HOWEVER.
  7. Click any area outside the input, then click the input again. The calendar reappears.

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

4 participants