diff --git a/src/app/components/api/primengconfig.ts b/src/app/components/api/primengconfig.ts index c096885cdc7..ac1e4d96c16 100644 --- a/src/app/components/api/primengconfig.ts +++ b/src/app/components/api/primengconfig.ts @@ -140,7 +140,8 @@ export class PrimeNGConfig { listLabel: 'Option List', selectColor: 'Select a color', removeLabel: 'Remove', - browseFiles: 'Browse Files' + browseFiles: 'Browse Files', + maximizeLabel: 'Maximize' } }; diff --git a/src/app/components/api/translation.ts b/src/app/components/api/translation.ts index bc7030211c0..2c43c19c9a6 100644 --- a/src/app/components/api/translation.ts +++ b/src/app/components/api/translation.ts @@ -131,4 +131,5 @@ export interface Aria { selectColor?: string; removeLabel?: string; browseFiles?: string; + maximizeLabel?: string; } diff --git a/src/app/components/dialog/dialog.ts b/src/app/components/dialog/dialog.ts index 81c6282a694..b6fe779c5fc 100755 --- a/src/app/components/dialog/dialog.ts +++ b/src/app/components/dialog/dialog.ts @@ -25,7 +25,7 @@ import { ViewEncapsulation, ViewRef } from '@angular/core'; -import { Footer, Header, PrimeNGConfig, PrimeTemplate, SharedModule } from 'primeng/api'; +import { Footer, Header, PrimeNGConfig, PrimeTemplate, SharedModule, TranslationKeys } from 'primeng/api'; import { DomHandler } from 'primeng/dom'; import { FocusTrapModule } from 'primeng/focustrap'; import { TimesIcon } from 'primeng/icons/times'; @@ -101,6 +101,7 @@ const hideAnimation = animation([animate('{{transition}}', style({ transform: '{ (click)="maximize()" (keydown.enter)="maximize()" [attr.tabindex]="maximizable ? '0' : '-1'" + [attr.aria-label]="maximizeLabel" pRipple pButton > @@ -540,6 +541,10 @@ export class Dialog implements AfterContentInit, OnInit, OnDestroy { private window: Window; + get maximizeLabel(): string { + return this.config.getTranslation(TranslationKeys.ARIA)['maximizeLabel']; + } + constructor(@Inject(DOCUMENT) private document: Document, @Inject(PLATFORM_ID) private platformId: any, public el: ElementRef, public renderer: Renderer2, public zone: NgZone, private cd: ChangeDetectorRef, public config: PrimeNGConfig) { this.window = this.document.defaultView as Window; }