uswds
uswds copied to clipboard
USWDS - Enhancement: Choosing a date in the calendar on mobile opens keyboard unnecessarily
Describe the bug
Choosing a date in the calendar popup focuses the input and opens keyboard on mobile. This blocks any content below from being displayed and the user is forced to close the keyboard before continuing.
Steps to reproduce the bug
- Go to the date picker component on the USWDS site on a mobile device
- Click the calendar button to open the calendar pop up
- Choose a valid date
- Calendar pop up will close, date will set in input, and focus changes to the input
- Mobile keyboard will open
Expected Behavior
Date is set in the input but the focus stays on the calendar popup button. This should prevent the mobile keyboard from opening.
Related code
In packages/usa-date-picker/src/index.js
the focus is explicitly set to the input. A better user experience would be to place the focus on the calendar button.
Screenshots
No response
System setup
USWDS 3.7.0 Edge 119
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct.
- [X] I checked the current issues for duplicate bug reports.