Skip to content

Commit 2b44965

Browse files
Add aria-label to headers for ADA
1 parent 7b593a7 commit 2b44965

File tree

2 files changed

+831
-811
lines changed

2 files changed

+831
-811
lines changed

packages/react-bootstrap-table2/src/header-cell.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class HeaderCell extends eventDelegater(React.Component) {
7777

7878
if (sort) {
7979
const customClick = cellAttrs.onClick;
80+
cellAttrs['aria-label'] = sorting ? `${text} sort ${sortOrder}` : `${text} sortable`;
8081
cellAttrs.onKeyUp = (e) => {
8182
if (e.key === 'Enter') {
8283
onSort(column);

0 commit comments

Comments
 (0)