Skip to content

Commit

Permalink
Fix various axe failures on custom EuiTable example
Browse files Browse the repository at this point in the history
- missing labels on checkbox elements, duplicate checkbox ID (solved in elastic#5237)

- These are all a11y solutions that come OOTB in EuiBasicTable, but need to be added for the custom example
  • Loading branch information
cee-chen committed Oct 4, 2021
1 parent 284ee35 commit e4983b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src-docs/src/views/tables/custom/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,10 @@ export default class extends Component {
renderSelectAll = (mobile) => {
return (
<EuiCheckbox
id="selectAllCheckbox"
label={mobile ? 'Select all' : null}
id={mobile ? 'selectAllCheckboxMobile' : 'selectAllCheckboxDesktop'}
label={mobile ? 'Select all rows' : null}
aria-label="Select all rows"
title="Select all rows"
checked={this.areAllItemsSelected()}
onChange={this.toggleAll.bind(this)}
type={mobile ? null : 'inList'}
Expand Down Expand Up @@ -522,6 +524,8 @@ export default class extends Component {
checked={this.isItemSelected(item.id)}
onChange={this.toggleItem.bind(this, item.id)}
type="inList"
title="Select this row"
aria-label="Select this row"
/>
</EuiTableRowCellCheckbox>
);
Expand Down

0 comments on commit e4983b9

Please sign in to comment.