react-data-table-component
react-data-table-component copied to clipboard
Accessibility Feature: Remove focusability from empty or specific header cells
Feature Check list
- [x] Agree to the Code of Conduct
- [x] Read the README to ensure the feature is not already present
- [x] You read Creating Issues, Features and Pull Requests
- [x] Considered the value versus complexity for all users of the library as well as library maintenance
- [x] Considered if this can be a storybook or documentation example
Is your feature request related to a problem? Please describe
Allow for disabling of tabbing on empty header cells so they do not get read by screen readers
Describe the solution you'd like
Allow the passing of tabindex to be passed through to TableCol cell so the user gains greater flexibility, or simple set tabindex="-1" if the content is empty
Describe alternatives you've considered
Additional context
I agree with this issue, I would also include a default behaviour: if a header cell has "sortable" set to false, a tabindex should not be applied imho
The accessibility angle @BackupMiles mentioned is an important one. The "main" issue I'd put in the "it might be nice" column, but for accessibility tabindex="-1" when not sortable should be a priority.