date-picker / date-time-picker: small-screen date picker not fully keyboard-accessible #132
Labels
a11y
Accessibility issue
help wanted
Extra attention is needed
needs research
More information needed to estimate
vaadin-date-picker
WCAG Level
Level A
Priority
High
Pages/screens/components affected
Description
Good design means supporting different modes of interaction, because there are many reasons why someone might use a keyboard instead of a mouse, and if keyboard interaction is not fully supported the website is effectively unusable.
On smaller screens/viewports, the date picker turns into a modal-like dialog. While it is possible, using the cursor keys, for a keyboard user to select a particular date, it's not possible to set focus/activate the "Today" and the "Cancel" controls.
In addition, after closing the small-screen date picker (using
Esc
or selecting an actual date), it appears that the date picker component itself "traps" keyboard focus when users attempt to navigate in reverse through the page (usingShift
+Tab
).User impact
Someone with mobility problems will often use a keyboard instead of a mouse to navigate a web page. A screen reader user will also tend to use a keyboard if they cannot see the screen to use the mouse. Therefore if the website does not properly support keyboard interaction a large number of people are effectively prevented from using it.
In this case, keyboard users will be disadvantaged since they won't be able to use the "Today" and "Cancel" buttons. While they can alternatively cancel using
Esc
, not being able to easily get back to "Today"'s date may make interacting with the date picker very inconvenient.More problematically, the fact that the date picker traps focus when using
Shift
+Tab
to navigate will have a major impact on users, who will be forced to cycle through the entire page and back to the top of the document whenever they want to reach an element that came before the date picker.Required solution
Make sure that all interactive controls can be used with a keyboard.
In this case, both the "Today" and "Cancel" button appear, from the markup, to be correctly implemented and focusable/actionable. It seems the problem may be due to some JavaScript acting as a focus trap (presumably to keep focus inside the modal-like date picker) - this may not have been correctly implemented. This would also explain why, after closing the date picker, focus is still affected when navigating through the page itself. We recommend reviewing and testing the current JavaScript that handles focus for this component.
This solution must be applied to all instances of the issue identified within the test sample, then applied to all other instances of the same issue identified throughout the rest of the components, their variants, and the documentation website.
Test procedure(s)
Use these steps to confirm that the solution has been correctly applied to issues identified within the test sample, and to test the rest of the components, their variants, and the documentation website for instances of the same issue:
Tab
andShift
+Tab
past the date picker and not become trapped.Definition of done
Complete all of these tasks before closing this issue or indicating it is ready for retest:
Related standards
More information
Test data
Test date: March 2021
Website: vaadin.com/components, vaadin.com/docs-beta
The text was updated successfully, but these errors were encountered: