/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/material/chips/chips-input/chips-input-example.html
28 строк
938 B
Caleb Eggensperger
fix(material/chips): Example violates axe accessibility tests (#32679)
31 янв 2026, 00:49
Не верифицирован
31 янв 2026, 00:49
865e3d5
Код
Авторство
О чём код?
<mat-form-field class="example-chip-list"> <mat-label>Favorite Fruits</mat-label> <mat-chip-grid #chipGrid aria-label="Enter fruits"> @for (fruit of fruits(); track fruit) { <mat-chip-row (removed)="remove(fruit)" [editable]="true" (edited)="edit(fruit, $event)" [aria-description]="'press enter to edit ' + fruit.name" > <button matChipEdit [attr.aria-label]="'edit ' + fruit.name"> <mat-icon>edit</mat-icon> </button> {{fruit.name}} <button matChipRemove [attr.aria-label]="'remove ' + fruit.name"> <mat-icon>cancel</mat-icon> </button> </mat-chip-row> } </mat-chip-grid> <input placeholder="New fruit..." [matChipInputFor]="chipGrid" [matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="addOnBlur" (matChipInputTokenEnd)="add($event)" /> </mat-form-field>