Skip to content

Commit

Permalink
Fixed #9834 - Facing accessibility-related issues with primeNg contro…
Browse files Browse the repository at this point in the history
…ls and AXE tools.
  • Loading branch information
yigitfindikli committed Mar 8, 2021
1 parent bdb5914 commit 221eacc
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 @@ -62,16 +62,16 @@ export class DropdownItem {
'p-disabled':disabled, 'p-dropdown-open':overlayVisible, 'p-focus':focused, 'p-dropdown-clearable': showClear && !disabled}"
(click)="onMouseclick($event)" [ngStyle]="style" [class]="styleClass">
<div class="p-hidden-accessible">
<input #in [attr.id]="inputId" type="text" [attr.aria-label]="label" readonly (focus)="onInputFocus($event)" aria-haspopup="listbox"
<input #in [attr.id]="inputId" type="text" readonly (focus)="onInputFocus($event)" aria-haspopup="listbox"
aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible" [attr.aria-labelledby]="ariaLabelledBy" (blur)="onInputBlur($event)" (keydown)="onKeydown($event, true)"
[disabled]="disabled" [attr.tabindex]="tabindex" [attr.autofocus]="autofocus" role="listbox">
[disabled]="disabled" [attr.tabindex]="tabindex" [attr.autofocus]="autofocus">
</div>
<span [ngClass]="{'p-dropdown-label p-inputtext':true,'p-dropdown-label-empty':(label == null || label.length === 0)}" *ngIf="!editable && (label != null)" [pTooltip]="tooltip" [tooltipPosition]="tooltipPosition" [positionStyle]="tooltipPositionStyle" [tooltipStyleClass]="tooltipStyleClass">
<ng-container *ngIf="!selectedItemTemplate">{{label||'empty'}}</ng-container>
<ng-container *ngTemplateOutlet="selectedItemTemplate; context: {$implicit: selectedOption}"></ng-container>
</span>
<span [ngClass]="{'p-dropdown-label p-inputtext p-placeholder':true,'p-dropdown-label-empty': (placeholder == null || placeholder.length === 0)}" *ngIf="!editable && (label == null)">{{placeholder||'empty'}}</span>
<input #editableInput type="text" [attr.maxlength]="maxlength" [attr.aria-label]="label" class="p-dropdown-label p-inputtext" *ngIf="editable" [disabled]="disabled" [attr.placeholder]="placeholder"
<input #editableInput type="text" [attr.maxlength]="maxlength" class="p-dropdown-label p-inputtext" *ngIf="editable" [disabled]="disabled" [attr.placeholder]="placeholder"
aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible" (click)="onEditableInputClick()" (input)="onEditableInputChange($event)" (focus)="onEditableInputFocus($event)" (blur)="onInputBlur($event)">
<i class="p-dropdown-clear-icon pi pi-times" (click)="clear($event)" *ngIf="value != null && showClear && !disabled"></i>
<div class="p-dropdown-trigger" role="button" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible">
Expand Down

0 comments on commit 221eacc

Please sign in to comment.