Skip to content

Commit

Permalink
[Accessibility] Allow setting of the aria-label of table row selectio…
Browse files Browse the repository at this point in the history
…n checkboxes (#2043)

`title` attribute is now equal to `aria-label` attribute or, if not passed down, equals to "Select this row"
  • Loading branch information
PhilippBaranovskiy authored Jun 25, 2019
1 parent 8d9d8a9 commit 391dba2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ No public interface changes since `12.1.0`.
- Pass `EuiSuperSelect`'s `popoverClassName` to the popover's panel ([#2068](https://github.com/elastic/eui/pull/2068))
- Added `editorItemAlignLeft`, `editorItemAlignCenter`, `editorItemRight`, `editorItemAlignTop`, `editorItemAlignMiddle`, `editorItemAlignBottom`, `editorDistributeHorizontal`, `editorDistributeVertical`, `editorPositionTopLeft`, `editorPositionTopRight`, `editorPositionBottomRight`, and `editorPositionBottomLeft` glyphs to `EuiIcon` ([2070](https://github.com/elastic/eui/pull/2070))
- Added missing TS definitions for `EuiRange` ([#2072](https://github.com/elastic/eui/pull/2072))
- Made `aria-label` attribute equal to `title` of the the selection checkbox in table items (for each row) in `EuiBasicTable` ([#2043](https://github.com/elastic/eui/pull/2043))

**Bug fixes**

Expand Down
4 changes: 2 additions & 2 deletions src/components/basic_table/basic_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ export class EuiBasicTable extends Component {
disabled={disabled}
checked={checked}
onChange={onChange}
title={title}
aria-label={selectThisRow}
title={title || selectThisRow}
aria-label={title || selectThisRow}
data-test-subj={`checkboxSelectRow-${itemId}`}
/>
)}
Expand Down

0 comments on commit 391dba2

Please sign in to comment.