Skip to content

Commit

Permalink
[EuiTablePagination] Add aria-current to rows per page menu (#7186)
Browse files Browse the repository at this point in the history
Co-authored-by: Cee Chen <[email protected]>
  • Loading branch information
1Copenut and cee-chen authored Sep 14, 2023
1 parent 3e0438a commit 0f42263
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ exports[`EuiTablePagination renders 1`] = `
>
<div>
<button
aria-current="true"
class="euiContextMenuItem"
data-test-subj="tablePagination-10-rows"
type="button"
Expand Down
3 changes: 3 additions & 0 deletions src/components/table/table_pagination/table_pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ export const EuiTablePagination: FunctionComponent<EuiTablePaginationProps> = (
<EuiContextMenuItem
key={itemsPerPageOption}
icon={itemsPerPageOption === itemsPerPage ? 'check' : 'empty'}
aria-current={
itemsPerPageOption === itemsPerPage ? 'true' : undefined
}
onClick={() => {
closePopover();
onChangeItemsPerPage?.(itemsPerPageOption);
Expand Down
3 changes: 3 additions & 0 deletions upcoming_changelogs/7186.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Accessibility**

- Added `aria-current` attribute to `EuiTablePagination`

0 comments on commit 0f42263

Please sign in to comment.