Skip to content

Commit 43bf300

Browse files
committed
feat: live region for pagination limit
1 parent eeee8f9 commit 43bf300

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/components/internal/Pagination/Pagination.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export default function Pagination({ next, hasNext, hasPrev, prev, limit, limitO
5151
/>
5252
</div>
5353
)}
54+
<div className="adyen-pe-visually-hidden" aria-atomic="true" aria-live={limit ? 'polite' : 'off'}>
55+
{limit && i18n.get('pagination.showing.notice', { values: { limit } })}
56+
</div>
5457
</div>
5558

5659
<div className="adyen-pe-pagination__controls">

src/translations/en-US.instructions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
"inputError.veryLargeFile": "Will be displayed as input validation error message if at least one uploaded file is of a size larger than the maximum allowed file size.",
186186
"noReportsFound": "Will be displayed if there is no reports data available for the given search criteria.",
187187
"pagination.showing": "Will be displayed to inform the user of the maximum number of records that can be shown for each page. The %{limit} placeholder should be taken to be a number.",
188+
"pagination.showing.notice": "Will be announced to inform the user of the maximum number of records that can be shown for each page. The %{limit} placeholder should be taken to be a number.",
188189
"payoutsNotice": "The preparation of payout information happens at midnight (12:00 AM) in UTC timezone. Payout, in this context, refers to a user's money that gets paid into their designated bank account. UTC here refers to the Coordinated Universal Time, which is the reference origin (0) for other timezones.",
189190
"refundActionErrorSubtitle": "Will be displayed as subtitle if there is an error on refund action.",
190191
"refundActionErrorTitle": "Will be displayed as a title if there is an error on refund action.",

src/translations/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@
653653
"pagination.nextPage": "Next page",
654654
"pagination.previousPage": "Previous page",
655655
"pagination.showing": "Showing %{limit}",
656+
"pagination.showing.notice": "Showing %{limit} records per page",
656657
"partial": "Partial",
657658
"paymentId": "Payment ID",
658659
"paymentMethod": "Payment method",

0 commit comments

Comments
 (0)