react-datepicker
react-datepicker copied to clipboard
Accessibility Issue - Use of grid, row, gridcell aria roles
Is your feature request related to a problem? Please describe.
Our most recent accessibility audit requires us to use grid
, row
, and gridcell
aria attributes for the datepicker instead of listbox
and option
values.
Describe the solution you'd like
A manner of control over the roles used for the grid layout of the datepicker by toggling from a listbox
based implementation to a grid
based implementation.
Describe alternatives you've considered
- individual control over the aria roles for the picker and the dates could work, however it seemed silly to allow someone to use a partial implementation
- grid, row, and cell render props to allow direct manipulation of the output, again seemed like too much unnecessary coordination
I'd like to develop a pull request to include this functionality and contribute to the codebase. Does what's proposed seem valuable or at least a direction this package should head? I was thinking of adding a calendarAriaRole
prop defaulted to listbox
that would drive the rendering.
@martijnrusschen thoughts on this?
@reinrl @jmhellman wow, I'm not sure how I initially missed this, my apologies! I think this is a good idea. Any improvements to accessibility are always welcome. Assuming these are just aria attributes, there's no much harm in adding them.