question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DateRangePicker calendar cannot be opened by keyboard

See original GitHub issue

🐛 Bug Report

The calendar button in the DateRangePicker has tabindex="-1", so you cannot navigate to it using the keyboard and there is no way to open the calendar control.

🤔 Expected Behavior

Tabbing past the date field inputs should focus the calendar button. The user could then activate the button to open the calendar. Once open, the calendar itself seems to work correctly with the keyboard.

😯 Current Behavior

Pressing tab from the last date input field bypasses the button and focuses on the next navigable item on the page.

date-picker-tab-nav_AdobeCreativeCloudExpress

💁 Possible Solution

Removing the tabindex property from the button should be all that is required.

🔦 Context

Without this feature, keyboard users must type in start and end dates longhand.

This is particularly burdensome if the component has minValue and/or maxValue defined, because those limits are only displayed inside the calendar. If the value violates those limits, the entire date range is marked as invalid. There is no indication which limit is violated or what the valid range is.

🧢 Your Company/Team

Adobe/Admin Console

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mischniccommented, May 11, 2022

The icon is focusable for me just as shown in the GIF (also Mac and v101)

0reactions
majornistacommented, May 17, 2022

I agree that this is a problem. We should make the Calendar or Time button able to receive Tab focus the same as for the segments.

Another issue I can reproduce on macOS, Option+ArrowDown and Option+ArrowUp within the browser seem to PageDown and PageUp the web page the same as using fn+ArrowDown or fn+ArrowUp, and we seem to have a case where sometimes Option+ArrowDown on a DateField segment does not immediately stopPropagation and the Option+ArrowDown scrolls the browser instead.

This can be reproduced on https://react-spectrum.adobe.com/react-spectrum/DatePicker.html.

  1. Open https://react-spectrum.adobe.com/react-spectrum/DatePicker.html#example
  2. Tab to move focus to the first segment within the first DatePicker example.
  3. Press Option+ArrowDown to expand the Calendar Popover.
  4. Notice that the browser scrolls to the bottom of the page. This seems to happen on the first time the user tries to expand the Calendar.
Read more comments on GitHub >

github_iconTop Results From Across the Web

fix(#3118): DatePicker calendar cannot be opened by keyboard
A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences. - fix(#3118): DatePicker calendar cannot be ......
Read more >
Date-picker opening keyboard on change event - Stack Overflow
Working on hybrid meteor app and using datepicker to show dates in format MM-DD-YYYY. ... If I use input type="date" and will not...
Read more >
How to delay datepicker opening until keyboard is closed?
Now tap the birthdate field. This will open up the datepicker but initially it will display too high up on the screen (because...
Read more >
Keyboard Navigation - DatePicker - Kendo UI for Angular
Opens the popup and moves the focus to the displayed calendar. Alt + Up Arrow or Esc, Closes the popup and moves the...
Read more >
123896 - input type=date datepicker not keyboard ... - Monorail
What is the expected result? Date picker should open and be navigable with the keyboard and usable for someone who is blind using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found