Skip to content

Commit

Permalink
feat(a11y): add aria-busy attribute to loading table (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman authored Oct 19, 2021
1 parent aac8c43 commit e41e2cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ const Table = React.forwardRef((props: TableProps, ref) => {
// Its value is an integer equal to the total number of rows available, including header rows.
aria-rowcount={data.length + 1}
aria-colcount={colCounts.current}
aria-busy={loading}
{...rest}
className={classes}
style={styles}
Expand Down
1 change: 1 addition & 0 deletions test/TableSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ describe('Table', () => {

assert.include(instance.className, 'rs-table-loading');
assert.ok(instance.querySelectorAll('.rs-table-loader').length);
assert.equal(instance.getAttribute('aria-busy'), 'true');
});

it('Should render custom loading', () => {
Expand Down

0 comments on commit e41e2cf

Please sign in to comment.