From 4f04f11cd90d425e69adca4b700645893426d535 Mon Sep 17 00:00:00 2001 From: Melloware Date: Mon, 2 May 2022 11:17:22 -0400 Subject: [PATCH] Fix #2827: Paginator accessible buttons (#2828) --- components/lib/api/Locale.js | 2 ++ components/lib/paginator/FirstPageLink.js | 8 +++----- components/lib/paginator/LastPageLink.js | 8 +++----- components/lib/paginator/NextPageLink.js | 8 +++----- components/lib/paginator/PageLinks.js | 8 ++++---- components/lib/paginator/PrevPageLink.js | 8 +++----- 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/components/lib/api/Locale.js b/components/lib/api/Locale.js index 2496c40c00..ea2451583c 100644 --- a/components/lib/api/Locale.js +++ b/components/lib/api/Locale.js @@ -49,6 +49,8 @@ let locales = { falseLabel: 'False', nullLabel: 'Not Selected', pageLabel: 'Page', + firstPageLabel: 'First Page', + lastPageLabel: 'Last Page', nextPageLabel: 'Next Page', previousPageLabel: 'Previous Page' } diff --git a/components/lib/paginator/FirstPageLink.js b/components/lib/paginator/FirstPageLink.js index 9e91e327a5..2ec945b712 100644 --- a/components/lib/paginator/FirstPageLink.js +++ b/components/lib/paginator/FirstPageLink.js @@ -1,15 +1,13 @@ import * as React from 'react'; -import { Ripple } from '../ripple/Ripple'; +import { ariaLabel } from '../api/Api'; +import { Button } from '../button/Button'; import { classNames, ObjectUtils } from '../utils/Utils'; export const FirstPageLink = React.memo((props) => { const className = classNames('p-paginator-first p-paginator-element p-link', { 'p-disabled': props.disabled }); const iconClassName = 'p-paginator-icon pi pi-angle-double-left'; const element = ( - + + + + ); if (props.template) { diff --git a/components/lib/paginator/PrevPageLink.js b/components/lib/paginator/PrevPageLink.js index 2e28fe7285..8a3545e3ab 100644 --- a/components/lib/paginator/PrevPageLink.js +++ b/components/lib/paginator/PrevPageLink.js @@ -1,15 +1,13 @@ import * as React from 'react'; -import { Ripple } from '../ripple/Ripple'; +import { ariaLabel } from '../api/Api'; +import { Button } from '../button/Button'; import { classNames, ObjectUtils } from '../utils/Utils'; export const PrevPageLink = React.memo((props) => { const className = classNames('p-paginator-prev p-paginator-element p-link', { 'p-disabled': props.disabled }); const iconClassName = 'p-paginator-icon pi pi-angle-left'; const element = ( - +