Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine datepicker keyboard navigation #1716

Closed
maxokorokov opened this issue Jul 31, 2017 · 1 comment
Closed

Refine datepicker keyboard navigation #1716

maxokorokov opened this issue Jul 31, 2017 · 1 comment

Comments

@maxokorokov
Copy link
Member

Bug description

Currently the datepicker doesn't handle focus well at the navigation level (year, month, next, previous) as the whole ngb-datepicker element handles both keyboard and focus.

For instance clicking on the year select box will cause the focus to be lost, clicking on arrows will not cause this.

untitled

More importantly you loose the ability to use keyboard on select boxes and next/previous buttons.

See any demo here: https://ng-bootstrap.github.io/#/components/datepicker/examples

Proposed solution

See the screenshot below:

  • Handle the keyboard navigation only inside the green area
  • Handle focusing at the day (1) level, not at the datepicker level
  • The focus should move in the order (1)-(2)-(3)-(4)-(5) defined on screen (we shouldn't care about what is inside navigation bar anymore)

screen shot 2017-07-31 at 14 24 47

@hvinh
Copy link

hvinh commented Feb 13, 2018

Hello,

The focus order should follow the visual reading order, so maybe 2-3-4-5-1 instead of 1-2-3-4-5

https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/C27

Kind regards

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

No branches or pull requests

3 participants