diff --git a/src/app/components/paginator/paginator.ts b/src/app/components/paginator/paginator.ts index b3f39578822..69fb7ab092e 100755 --- a/src/app/components/paginator/paginator.ts +++ b/src/app/components/paginator/paginator.ts @@ -58,7 +58,8 @@ import { PaginatorState } from './paginator.interface'; *ngFor="let pageLink of pageLinks" class="p-paginator-page p-paginator-element p-link" [ngClass]="{ 'p-highlight': pageLink - 1 == getPage() }" - [attr.aria-label]="getAriaLabel('pageLabel')" + [attr.aria-label]="getPageAriaLabel(pageLink)" + [attr.aria-current]="pageLink - 1 == getPage() ? 'page' : undefined" (click)="onPageLinkClick($event, pageLink - 1)" pRipple > @@ -290,6 +291,10 @@ export class Paginator implements OnInit, AfterContentInit, OnChanges { return this.config.translation.aria ? this.config.translation.aria[labelType] : undefined; } + getPageAriaLabel(value) { + return this.config.translation.aria ? this.config.translation.aria.pageLabel.replace(/{page}/g, `Page ${value}`) : undefined; + } + getLocalization(digit: number) { const numerals = [...new Intl.NumberFormat(this.locale, { useGrouping: false }).format(9876543210)].reverse(); const index = new Map(numerals.map((d, i) => [i, d]));