Skip to content

Accessibility issue: Users navigating with tab cannot trigger sort functionality #1238

@reginafcompton

Description

@reginafcompton

Description
A user navigating the table with the keyboard (i.e., with the tab key + enter key) cannot trigger the sort functionality.

To Reproduce
You can see this behavior in the Storybook example.
https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Sort%20Table&selectedStory=Enable%20Sort&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel

  1. Click on "Change Data" (to position the focus)
  2. Hit your tab key
  3. Hit your enter key

I expect the column to sort, but it does not do anything.

Hack/Workaround
I found a workaround for this issue with the following:

  1. Wrap the sortCaret icon in a button tag
  2. Disable the tabindex on the headers.

This workaround is not ideal, however.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions