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

aria properties on <Day /> component don't work when using custom CSS classes #959

Closed
bengry opened this issue Nov 24, 2019 · 4 comments · Fixed by #1004
Closed

aria properties on <Day /> component don't work when using custom CSS classes #959

bengry opened this issue Nov 24, 2019 · 4 comments · Fixed by #1004
Labels
bug Bug or Bug fixes

Comments

@bengry
Copy link

bengry commented Nov 24, 2019

Describe the bug
When using custom CSS classes, the aria-selected and aria-disabled on the <Day /> component don't work.
This is because of these lines - which look for a specific key name, which doesn't exist when using custom CSS classes (e.g. with CSS Modules the class names are generated).

In addition, there's no way to override this behavior from the outside.

To Reproduce
Reproduction Sandbox: https://codesandbox.io/s/react-day-picker-base-1rs3g
Notice that the selected day has an aria-selected="false".

Expected behavior
the aria-* attributes should use the selectedDays and disabledDays props to set them.

Screenshots
image

Additional context
This happens in both v7.3.2 and v7.4.0, probably in earlier version as well.

@bengry bengry added the bug Bug or Bug fixes label Nov 24, 2019
@camflan
Copy link

camflan commented Mar 30, 2020

I've opened a PR for this on v7

#1004

@camflan
Copy link

camflan commented Apr 11, 2020

Merged, @gpbl can close this 👍🏻

@bengry
Copy link
Author

bengry commented Apr 11, 2020

@gpbl any plans to release v7.4.1 with this fix (and others that got into the v7 branch)?

@gpbl
Copy link
Owner

gpbl commented Apr 13, 2020

@gpbl gpbl closed this as completed Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants