Skip to content

Commit d6fb3c2

Browse files
dgp1130crisbeto
authored andcommitted
refactor: replaces aria-hidden with alt="" (#25911)
An `alt` attribute is required for an upcoming extended diagnostic, and from my understanding is desirable over `aria-hidden` since it maintains `role="img"` while also indicating that the image is decorative. (cherry picked from commit b260cb1)
1 parent f36d70c commit d6fb3c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components-examples/material/autocomplete/autocomplete-overview/autocomplete-overview-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[formControl]="stateCtrl">
88
<mat-autocomplete #auto="matAutocomplete">
99
<mat-option *ngFor="let state of filteredStates | async" [value]="state.name">
10-
<img class="example-option-img" aria-hidden [src]="state.flag" height="25">
10+
<img alt="" class="example-option-img" [src]="state.flag" height="25">
1111
<span>{{state.name}}</span> |
1212
<small>Population: {{state.population}}</small>
1313
</mat-option>

0 commit comments

Comments
 (0)