react-day-picker
react-day-picker copied to clipboard
Bug: gridcell ARIA role incorrectly added to Day button element
Discussed in https://github.com/gpbl/react-day-picker/discussions/1674
Originally posted by rihardsgravis February 2, 2023
Bug description
The ARIA gridcell role is added to the Day button, but that is an incorrect role for the button since it does not represent a cell in a grid – it is in fact a child of a cell. Accessibility tests using the component are failing.
Expected behaviour
The role for the button could be button or omitted at all since it's a HTM button component and the role for it is clear.
@gpbl for what its worth, aria-selected is also erroring as Critical with aXe. I'm having to destructure it out of the buttonProps and leave it as an unused variable to avoid the errors.

Waiting on a fix for this!
Reason this is taking so long is because it is a breaking change: changing the HTML structure will likely break tests selectors and styles.
I could finally make some progress with this in PR #2089 and will cut a mayor release for this fix. More details coming soon... thanks a lot for your patience!