Skip to content

Commit

Permalink
Fixed #14850 - Dropdown | aria-expanded attribute not present
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Feb 27, 2024
1 parent fc8747b commit faf79b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class DropdownItem {
[attr.aria-label]="ariaLabel || (label() === 'p-emptylabel' ? undefined : label())"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-haspopup]="'listbox'"
[attr.aria-expanded]="overlayVisible"
[attr.aria-expanded]="overlayVisible ?? false"
[attr.aria-controls]="id + '_list'"
[attr.tabindex]="!disabled ? tabindex : -1"
pAutoFocus
Expand All @@ -164,7 +164,7 @@ export class DropdownItem {
[disabled]="disabled"
aria-haspopup="listbox"
[attr.placeholder]="modelValue() === undefined || modelValue() === null ? placeholder() : undefined"
[attr.aria-expanded]="overlayVisible"
[attr.aria-expanded]="overlayVisible ?? false"
(input)="onEditableInput($event)"
(keydown)="onKeyDown($event)"
(focus)="onInputFocus($event)"
Expand All @@ -177,7 +177,7 @@ export class DropdownItem {
</span>
</ng-container>
<div class="p-dropdown-trigger" role="button" aria-label="dropdown trigger" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible" [attr.data-pc-section]="'trigger'">
<div class="p-dropdown-trigger" role="button" aria-label="dropdown trigger" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible ?? false" [attr.data-pc-section]="'trigger'">
<ng-container *ngIf="!dropdownIconTemplate">
<span class="p-dropdown-trigger-icon" *ngIf="dropdownIcon" [ngClass]="dropdownIcon"></span>
<ChevronDownIcon *ngIf="!dropdownIcon" [styleClass]="'p-dropdown-trigger-icon'" />
Expand Down

0 comments on commit faf79b2

Please sign in to comment.