Skip to content

Commit

Permalink
fix: add aria-hidden to pagination button, so it can't be clicked by …
Browse files Browse the repository at this point in the history
…screen reader
  • Loading branch information
noa.santo committed Jan 22, 2024
1 parent c3055a8 commit e1e5702
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ui/pagination/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const Pagination = ({
<PaginationContainer className={className}>
<StyledLink
onClick={onPreviousClick}
aria-hidden={currentPage === 1}
$disabled={currentPage === 1}
aria-label="Previous Page"
tabIndex={currentPage === 1 ? -1 : 0}
Expand All @@ -103,6 +104,7 @@ export const Pagination = ({
<StyledLink
onClick={onNextClick}
$disabled={currentPage === amountOfPages}
aria-hidden={currentPage === amountOfPages}
aria-label="Next Page"
tabIndex={currentPage === amountOfPages ? -1 : 0}
>
Expand Down

0 comments on commit e1e5702

Please sign in to comment.