jbetancur / react-data-table-component

A responsive table library with built-in sorting, pagination, selection, expandable rows, and customizable styling.
https://react-data-table-component.netlify.app
Apache License 2.0
2.04k stars 411 forks source link

Accessibility Feature: Remove focusability from empty or specific header cells #1159

Open mikematos84 opened 1 year ago

mikematos84 commented 1 year ago

Feature Check list

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

BackupMiles commented 2 months ago

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