Skip to content

Commit

Permalink
Merge pull request #9 from helsingborg-stad/fix/adding-pagination-labels
Browse files Browse the repository at this point in the history
fix: adding translation labels for pagination
  • Loading branch information
NiclasNorin authored May 3, 2024
2 parents 7d2191f + cf627e1 commit d5b6682
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/Pagination/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class Pagination extends Component {
total,
next,
prev,
goToPage
goToPage,
langNext,
langPrev
} = this.props;

const pageList = this.pageList();
Expand All @@ -63,7 +65,8 @@ class Pagination extends Component {
className="c-pagination__link"
size="small"
>
<i className="c-icon c-icon--size-sm material-icons" translate="no" role="img" alt="">
<span className="u-sr__only">{langPrev ?? "Previous page"}</span>
<i className="c-icon c-icon--size-sm material-icons" translate="no" aria-hidden="true">
chevron_left
</i>
</Button>
Expand Down Expand Up @@ -137,7 +140,8 @@ class Pagination extends Component {
className="c-pagination__link"
size="small"
>
<i className="c-icon c-icon--size-sm material-icons" translate="no" role="img" alt="">
<span className="u-sr__only">{langNext ?? "Next page"}</span>
<i className="c-icon c-icon--size-sm material-icons" translate="no" aria-hidden="true">
chevron_right
</i>
</Button>
Expand Down

0 comments on commit d5b6682

Please sign in to comment.