Skip to content

Commit

Permalink
Update autocomplete-search.component.html (#536)
Browse files Browse the repository at this point in the history
* Update autocomplete-search.component.html

Add aria-label to autocomplete-search html

* Remove aria-autocomplete to fix 508 issue
  • Loading branch information
shivankar-reisys authored Jun 17, 2021
1 parent a9eaba9 commit 7c0c9c0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div sam-click-outside (clickOutside)="clickOutSide($event)" sam-tab-outside (tabOutside)="clickOutSide($event)">
<div class="input-container">
<div role="combobox" [attr.id]="configuration.id + '-container'" [attr.aria-expanded]="showResults"
<div role="combobox" [attr.aria-label]="configuration.id + '-label'" [attr.id]="configuration.id + '-container'" [attr.aria-expanded]="showResults"
[attr.aria-owns]="showResults ? configuration.id + '-listbox' : undefined" aria-haspopup="listbox">
<input [disabled]="disabled" (keypress)="onkeypress($event)" (input)="textChange($event)"
class="usa-input padding-right-3" [ngClass]="getClass()" #input
[attr.aria-label]="configuration.ariaLabelText ? configuration.ariaLabelText : configuration.labelText"
[attr.id]="configuration.id" type="text" (focus)="inputFocusHandler()" (keydown)="onKeydown($event)"
[(ngModel)]="inputValue" aria-autocomplete="list" [attr.placeholder]="configuration.autocompletePlaceHolderText"
[(ngModel)]="inputValue" [attr.placeholder]="configuration.autocompletePlaceHolderText"
[attr.aria-activedescendant]="
showResults
? configuration.id + '-resultItem-' + highlightedIndex
Expand Down Expand Up @@ -171,4 +171,4 @@
<li>{{ srOnlyText }}</li>
</ul>
</div>
</div>
</div>

0 comments on commit 7c0c9c0

Please sign in to comment.