/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/material/core/option/option.html
34 строки
1 KB
Kristiyan Kostadinov
fix(multiple): consolidate strong focus indicators (#29623)
26 авг 2024, 23:22
Не верифицирован
26 авг 2024, 23:22
a9da72e
Код
Авторство
О чём код?
<!-- Set aria-hidden="true" to this DOM node and other decorative nodes in this file. This might be contributing to issue where sometimes VoiceOver focuses on a TextNode in the a11y tree instead of the Option node (#23202). Most assistive technology will generally ignore non-role, non-text-content elements. Adding aria-hidden seems to make VoiceOver behave more consistently. --> @if (multiple) { <mat-pseudo-checkbox class="mat-mdc-option-pseudo-checkbox" [disabled]="disabled" [state]="selected ? 'checked' : 'unchecked'" aria-hidden="true"></mat-pseudo-checkbox> } <ng-content select="mat-icon"></ng-content> <span class="mdc-list-item__primary-text" #text><ng-content></ng-content></span> <!-- Render checkmark at the end for single-selection. --> @if (!multiple && selected && !hideSingleSelectionIndicator) { <mat-pseudo-checkbox class="mat-mdc-option-pseudo-checkbox" [disabled]="disabled" state="checked" aria-hidden="true" appearance="minimal"></mat-pseudo-checkbox> } <!-- See a11y notes inside optgroup.ts for context behind this element. --> @if (group && group._inert) { <span class="cdk-visually-hidden">({{ group.label }})</span> } <div class="mat-mdc-option-ripple mat-focus-indicator" aria-hidden="true" mat-ripple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="disabled || disableRipple"> </div>