react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Accessibility Issue - Use of grid, row, gridcell aria roles

Open jmhellman opened this issue 2 years ago • 4 comments

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

jmhellman avatar Jul 27 '22 02:07 jmhellman

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.

jmhellman avatar Aug 08 '22 11:08 jmhellman

@martijnrusschen thoughts on this?

reinrl avatar Oct 11 '23 16:10 reinrl

@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.

martijnrusschen avatar Oct 11 '23 17:10 martijnrusschen