Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
DatePicker: Add option to not auto-open on focus #1451
Pull request checklist
Description of changes
When focus lands on the date picker, it currently immediately opens the date picker. This is confusing from an accessibility point of view. This pull request adds an option to disable the auto-open behavior so that the user can open the date picker manually, e.g. by hitting enter.
Focus areas to test
Test steps (verified manually on DatePicker.Input.Example: screencast):
From the standpoint of supporting screenreaders, I think it's much more understandable to require the user to take an explicit action to open the popup than to just launch them into it without context. So, I think it's a reasonable stance to take that we don't allow the date picker to open automatically on focus.
Whether or not a third party might want that behavior regardless some day is another story...
@c-w , @mikewheaton I think we should go through the accessible date pickers listed at http://www.webaxe.org/accessible-date-pickers/ and decide on the design. There are both types 1. ones that open the picker popup on focus and 2. others that provide a focusable picker button next to date text box.