-
-
Notifications
You must be signed in to change notification settings - Fork 702
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
Wrong type for DayProps[rootProps] #2223
Comments
Hi @ArthurGoupil thanks for your feedback - in this case I believe the linter warning is a false positive, as the interactive element is marked as a grid cell and reacts to user interactions - such as click or focus. |
Not sure to understand, even with the Actually, I wanted to implement the following behaviour: for a vertical 6 months calendar, display directly the selected date even if it's 3 months later (so automatic scroll if needed). |
Hello @gpbl, I don't understand the correlation between the Running Voiceover on this https://codesandbox.io/p/sandbox/rendering-test-react-day-picker-v9-3kwpm8?file=/src/index.tsx I never get prompted to click, only the day's number is being read. |
@Benrajalu thanks for the feedback, yeah I agree we should consider again the button there. What is your suggestion here? What is the correct ARIA tree? I'll try with a grid cell wrapping a Button element, hopefully will make VoiceOver happier. <div role="gridcell" aria-selected={true}>
<button tabIndex={1}>
{date}
</button>
</div> |
That does seem better yes, gridCell for the layout, button for the interaction! |
Description
Hello!
In
DayProps
, the providedrootProps
are supposed to be applied on adiv
.If I'm not wrong this is not great for accessibility:
button
tabIndex
should only be passed to interactive elements, thus not adiv
(https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/0be7ea95f560c6afc6817d381054d914ebd0b2ca/docs/rules/no-noninteractive-tabindex.md)The text was updated successfully, but these errors were encountered: