diff --git a/src/app/components/dialog/dialog.ts b/src/app/components/dialog/dialog.ts index bb7a21fcb6f..49a87468979 100755 --- a/src/app/components/dialog/dialog.ts +++ b/src/app/components/dialog/dialog.ts @@ -19,6 +19,7 @@ import { PLATFORM_ID, QueryList, Renderer2, + SimpleChanges, TemplateRef, ViewChild, ViewEncapsulation, @@ -73,13 +74,13 @@ const hideAnimation = animation([animate('{{transition}}', style({ transform: '{ (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog" - [attr.aria-labelledby]="getAriaLabelledBy()" + [attr.aria-labelledby]="ariaLabelledBy" [attr.aria-modal]="true" >
- {{ header }} - + {{ header }} + @@ -464,6 +465,8 @@ export class Dialog implements AfterContentInit, OnInit, OnDestroy { dragging: boolean | undefined; + ariaLabelledBy: string | undefined; + documentDragListener: VoidListener; documentDragEndListener: VoidListener; @@ -554,6 +557,12 @@ export class Dialog implements AfterContentInit, OnInit, OnDestroy { } } + ngOnChanges(changes: SimpleChanges): void { + if (changes.header) { + this.ariaLabelledBy = this.getAriaLabelledBy(); + } + } + getAriaLabelledBy() { return this.header !== null ? UniqueComponentId() + '_header' : null; } diff --git a/src/app/components/fileupload/fileupload.ts b/src/app/components/fileupload/fileupload.ts index 89f2e018818..4915f03dd72 100755 --- a/src/app/components/fileupload/fileupload.ts +++ b/src/app/components/fileupload/fileupload.ts @@ -467,7 +467,7 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe private http: HttpClient, public cd: ChangeDetectorRef, public config: PrimeNGConfig - ) { } + ) {} ngAfterContentInit() { this.templates?.forEach((item) => { @@ -901,4 +901,4 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe exports: [FileUpload, SharedModule, ButtonModule, ProgressBarModule, MessagesModule], declarations: [FileUpload] }) -export class FileUploadModule { } +export class FileUploadModule {} diff --git a/src/app/components/menu/menu.ts b/src/app/components/menu/menu.ts index 2418ba21800..8699bc99323 100755 --- a/src/app/components/menu/menu.ts +++ b/src/app/components/menu/menu.ts @@ -607,7 +607,7 @@ export class Menu implements OnDestroy { changeFocusedOptionIndex(index) { const links = DomHandler.find(this.containerViewChild.nativeElement, 'li[data-pc-section="menuitem"][data-p-disabled="false"]'); - if(links.length > 0) { + if (links.length > 0) { let order = index >= links.length ? links.length - 1 : index < 0 ? 0 : index; order > -1 && this.focusedOptionIndex.set(links[order].getAttribute('id')); } diff --git a/src/app/components/tieredmenu/tieredmenu.ts b/src/app/components/tieredmenu/tieredmenu.ts index 9330fbd843e..a044a0a6e8c 100755 --- a/src/app/components/tieredmenu/tieredmenu.ts +++ b/src/app/components/tieredmenu/tieredmenu.ts @@ -222,7 +222,7 @@ export class TieredMenuSub { @ViewChild('sublist', { static: true }) sublistViewChild: ElementRef; - constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public renderer: Renderer2, private cd: ChangeDetectorRef,@Inject(forwardRef(() => TieredMenu)) public tieredMenu: TieredMenu) {} + constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public renderer: Renderer2, private cd: ChangeDetectorRef, @Inject(forwardRef(() => TieredMenu)) public tieredMenu: TieredMenu) {} positionSubmenu() { let sublist = this.sublistViewChild && this.sublistViewChild.nativeElement; diff --git a/src/app/showcase/doc/carousel/circulardoc.ts b/src/app/showcase/doc/carousel/circulardoc.ts index f77b17dbd40..ae088e1a998 100644 --- a/src/app/showcase/doc/carousel/circulardoc.ts +++ b/src/app/showcase/doc/carousel/circulardoc.ts @@ -10,7 +10,7 @@ import { ProductService } from '../../service/productservice';

When autoplayInterval is defined in milliseconds, items are scrolled automatically. In addition, for infinite scrolling circular property needs to be added which is enabled automatically in auto play mode.

- +
@@ -81,7 +81,7 @@ export class CircularDoc implements OnInit { code: Code = { basic: ` - +
@@ -101,7 +101,7 @@ export class CircularDoc implements OnInit { `, html: `
- +