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

a11y: Set week number tabIndex to -1 if onWeekClick is not defined #818

Merged
merged 1 commit into from Feb 21, 2019

Conversation

heralden
Copy link
Contributor

@heralden heralden commented Oct 8, 2018

If showWeekNumbers prop is specified, while onWeekClick is not defined, this means that the week numbers are only supposed to be rendered for their visual purpose, not to be interacted with. It seems like tabIndex is left at 0 regardless, which means you have to tab through them even though they cannot be interacted with.

This PR sets tabIndex to -1 on the week numbers if onWeekClick is not defined, so that the visually impaired won't have to cycle through the non-interactive elements.

Tests, coverage and linting has run successfully.

@codecov
Copy link

codecov bot commented Oct 8, 2018

Codecov Report

Merging #818 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #818   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         645    645           
  Branches      141    141           
=====================================
  Hits          645    645
Impacted Files Coverage Δ
src/Month.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39ad48e...691f608. Read the comment docs.

@gpbl gpbl added a11y labels Feb 21, 2019
@gpbl
Copy link
Owner

gpbl commented Feb 21, 2019

That’s great! Thank you.

@gpbl gpbl merged commit e3277f0 into gpbl:master Feb 21, 2019
kimamula pushed a commit to kimamula/react-day-picker that referenced this pull request Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants