aria properties on <Day />
component don't work when using custom CSS classes
#959
Labels
bug
Bug or Bug fixes
Describe the bug
When using custom CSS classes, the
aria-selected
andaria-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 theselectedDays
anddisabledDays
props to set them.Screenshots
Additional context
This happens in both
v7.3.2
andv7.4.0
, probably in earlier version as well.The text was updated successfully, but these errors were encountered: