react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

Accessibility Feature: Remove focusability from empty or specific header cells

Open mikematos84 opened this issue 2 years ago • 2 comments

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

mikematos84 avatar Aug 29 '23 23:08 mikematos84

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

BackupMiles avatar Jul 10 '24 10:07 BackupMiles

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.

kenirwin avatar Sep 19 '25 12:09 kenirwin