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

Tab key does not focus controls in date picker #1059

Closed
justisb opened this issue May 24, 2019 · 6 comments · Fixed by #1266
Closed

Tab key does not focus controls in date picker #1059

justisb opened this issue May 24, 2019 · 6 comments · Fixed by #1266

Comments

@justisb
Copy link

justisb commented May 24, 2019

Environment

Tech Version
@material-ui/pickers 3.0.0
material-ui 4.0.0
React 16.8.6
Browser Chrome 74
Peer library date-fns 2.0.0-alpha.27

Steps to reproduce

  1. Open a datepicker on the demo page (https://material-ui-pickers.dev/demo/datetime-picker)
  2. Press the tab key

Expected behavior

The tab key should move between the toolbar controls and days of the month, like in version 2 of material-ui-pickers.

Actual behavior

The tab key does not seem to focus anything.

Live example

https://material-ui-pickers.dev/demo/datetime-picker

@justisb
Copy link
Author

justisb commented May 24, 2019

Another keyboard issue- pressing Enter on the input does not open the picker (does not open the modal or inline picker on the demo page). This is seemingly also a regression since version 2.

Optimally the picker should be able to open, select a date, select a time, and close using only the keyboard so that it is accessible to keyboard-only and screenreader users.

@dmtrKovalenko
Copy link
Member

Ideally for accessibility is to use only keyboard mode. And even make aria-hidden on open picker button.
We will fix not focusing, but also I suppose I will make a guide of accessibility’s

@justisb
Copy link
Author

justisb commented May 24, 2019

Thanks, I'll try using the keyboard picker and set aria-hidden on the input adornment.

It'd be great if tab could focus the hour & minute options for the time picker as well- is there anything against that or it is just low priority?

@dmtrKovalenko
Copy link
Member

Will be fixed in nearest release

@repl-sean-heintz
Copy link

repl-sean-heintz commented May 30, 2019

Hi @dmtrKovalenko, we have a use-case where it's not feasible to display a text input. Our application allows for user-specified formatted dates (e.g. yyyy-MM-dd, MMM dd, yyyy, etc.) to be used on every page, and currently this library does not support arbitrary masks for inputs. Additionally, we have controls where from a UX perspective it only makes sense to open a date picker instead of a text input.

Keyboard accessibility for the picker is a must-have, and text inputs don't fill every scenario.

@justisb
Copy link
Author

justisb commented Jun 4, 2019

In the latest release, tabbing now moves between controls, though the Enter key is not captured in the datepicker, only pressing Space. Is that expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants