Skip to content

Commit

Permalink
add prev and next aria-label on pagination (#1640)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon Scott <[email protected]>
  • Loading branch information
usagi-f and brandongregoryscott authored May 5, 2023
1 parent afcaad7 commit 1855a78
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pagination/src/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ const Pagination = memo(
<Pane is="nav" role="navigation" aria-label="Pagination" {...rest} ref={ref}>
<Pane is="ul" display="flex" alignItems="center" padding={0}>
<Pane is="li" listStyle="none">
<IconButton appearance="minimal" icon={ChevronLeftIcon} disabled={page === 1} onClick={onPreviousPage} />
<IconButton
appearance="minimal"
icon={ChevronLeftIcon}
disabled={page === 1}
onClick={onPreviousPage}
aria-label="Previous page"
/>
</Pane>
{totalPages
? getPaginationButtonContent({ totalPages, page }).map((val, i) => {
Expand All @@ -142,6 +148,7 @@ const Pagination = memo(
icon={ChevronRightIcon}
disabled={totalPages ? page === totalPages : undefined}
onClick={onNextPage}
aria-label="Next page"
/>
</Pane>
</Pane>
Expand Down

0 comments on commit 1855a78

Please sign in to comment.