-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(datepicker): make widget accessible #1922
Conversation
I am done with this! Anyone cares to review/test (and with a screen reader if possible) before merging ? |
* keyboard navigation * WAI-ARIA roles * popup will close on escape on input or calendar * move focus to input when closing popup Closes #1922 BREAKING CHANGES: popup calendar does not open on input focus
* keyboard navigation * WAI-ARIA roles * popup will close on escape on input/calendar * move focus to input when closing popup Closes #1922 BREAKING CHANGES: popup calendar does not open on input focus
* keyboard navigation * WAI-ARIA roles * popup will close on escape on input or calendar * move focus to input when closing popup Closes #1922 BREAKING CHANGES: popup calendar does not open on input focus
* keyboard navigation * WAI-ARIA roles * popup will close on escape on input or calendar * handle focus when closing popup BREAKING CHANGES: popup calendar does not open on input focus
@bekos I think "open on focus" is far more standard practice than "open with down arrow". I can't think of a single site (that I've been to anyway) that requires a user to do that. Could you bring it back as an option at least? I'd even say it should be the default option, and the down arrow should come second. |
@jbthoma Indeed, "open on focus" is a very common practice, but from my research this has accessibility issues. So I decided to remove from the core of the library. The "open on down arrow" it is an undocumented hack :-) / convenience I introduced and will probably remove also. But you can still use this functionality by using Just for reference, this is the accessibility example of datepicker: http://oaa-accessibility.org/examplep/datepicker1/ |
Even though this is topic pretty old I completely agree with @jbthoma regarding the I appreciate your efforts for accessibility but you should also keep usability in mind. Opening on focus as default and setting and having the arrow down option as extra / fallback would be way better imho. It's best of both worlds. |
Tests and some polishing is missing, but I think this is one of the most accessible datepicker's out there! 👯
Added:
Breaking changes: