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

fix(calendar): focusable disabled dates #1978

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

gerjanvangeest
Copy link
Member

@gerjanvangeest gerjanvangeest commented May 10, 2023

What I did

Rebased version of: #1381

  • Do not automatically force selection of a valid date
  • Enables focus to disabled dates to make it more reasonable for screen readers
  • Add helper functions to find next/previous/nearest enabled date

TODO:

  • (re)check a11y tests
  • Add data bounds (issue #195)?
    • For disabled dates before minDate => aria-describe-by... element with "before first available date"
    • For disabled dates after maxDate => aria-describe-by... element with "after last available date"
  • check with UX integration with input-datepicker
    • What should happen on selection of disabled date?

Fix: #194

@changeset-bot
Copy link

changeset-bot bot commented May 10, 2023

🦋 Changeset detected

Latest commit: 512aabb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lion/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Knorgias Knorgias force-pushed the fix/calendarA11yDisabledDays-rebased branch from 7d0815f to 4cd0116 Compare July 3, 2023 09:31
@Knorgias Knorgias force-pushed the fix/calendarA11yDisabledDays-rebased branch 2 times, most recently from 621c75b to 049adf9 Compare July 4, 2023 07:19
@gerjanvangeest gerjanvangeest marked this pull request as ready for review July 4, 2023 07:29
@Knorgias Knorgias force-pushed the fix/calendarA11yDisabledDays-rebased branch from 049adf9 to 512aabb Compare July 4, 2023 08:02
@gerjanvangeest gerjanvangeest merged commit b44bfc5 into master Jul 4, 2023
4 checks passed
@gerjanvangeest gerjanvangeest deleted the fix/calendarA11yDisabledDays-rebased branch July 4, 2023 08:36
this.centralDate = this.selectedDate;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gerjanvangeest I guess you meant to replace this logic with this.findNearestEnabledDate, instead of removing it. I created the PR that does it: #2361

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.

[calendar] Disabled dates get skipped by keyboard
3 participants