Skip to content

Commit

Permalink
Fixed #14361 - Add missing aria properties
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Dec 13, 2023
1 parent e48ab18 commit 101b5eb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/components/overlaypanel/overlaypanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ import { Subscription } from 'rxjs';
(@animation.done)="onAnimationEnd($event)"
role="dialog"
[attr.aria-modal]="overlayVisible"
[attr.aria-label]="ariaLabel"
[attr.aria-labelledBy]="ariaLabelledBy"
>
<div class="p-overlaypanel-content" (click)="onContentClick()" (mousedown)="onContentClick()">
<ng-content></ng-content>
Expand Down Expand Up @@ -94,6 +96,16 @@ import { Subscription } from 'rxjs';
}
})
export class OverlayPanel implements AfterContentInit, OnDestroy {
/**
* Defines a string that labels the input for accessibility.
* @group Props
*/
@Input() ariaLabel: string | undefined;
/**
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
* @group Props
*/
@Input() ariaLabelledBy: string | undefined;
/**
* Enables to hide the overlay when outside is clicked.
* @group Props
Expand Down

0 comments on commit 101b5eb

Please sign in to comment.