Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(datepicker): make widget accessible #1922

Closed
wants to merge 1 commit into from

Conversation

bekos
Copy link
Contributor

@bekos bekos commented Mar 11, 2014

Tests and some polishing is missing, but I think this is one of the most accessible datepicker's out there! 👯

Added:

  • Keyboard navigation in calendar and Escape on popup.
  • Focus handling when closing/open popup.
  • WAI-ARIA roles

Breaking changes:

  • Looping modes is removed. Ie from max mode you don't move to min mode.
  • For popup, open on focus is removed, but open with down arrow is added.

@bekos
Copy link
Contributor Author

bekos commented Mar 12, 2014

I am done with this! Anyone cares to review/test (and with a screen reader if possible) before merging ?

bekos added a commit that referenced this pull request Mar 13, 2014
 * 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
bekos added a commit that referenced this pull request Mar 13, 2014
 * 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
bekos added a commit that referenced this pull request Mar 14, 2014
 * 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
@jbthoma
Copy link

jbthoma commented Apr 15, 2014

@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.

@bekos
Copy link
Contributor Author

bekos commented Apr 15, 2014

@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 is-open="dt.open" and ng-focus/ng-click = "dt.open = true", but I wouldn't like to put in the demo page. Let people copy the demo example and try to make a better world :-)

Just for reference, this is the accessibility example of datepicker: http://oaa-accessibility.org/examplep/datepicker1/

@temporafugiunt
Copy link

Bravo on these changes, I had some major usability issues like discussed in #1942 and #1880 when using the calendar in a data grid like scenario. The calendar is now much more usable and doesn't interrupt workflow. Awesome Job!

@rvanbaalen
Copy link
Contributor

Even though this is topic pretty old I completely agree with @jbthoma regarding the open on focus. I just spent a little while figuring out what I did wrong because the popup didn't open on focus, which I expected.

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants