Skip to content

Commit f595c78

Browse files
committed
fix(material/core): Fix MacOS Hover feature compatibility with optgroup (#27239)
Corrects ARIA semantics for the mat-optgroup component. Add role="presentation" to the label and remove aria-hidden="true" from the label. Fix compatibility issue with MAC Hover text a11y feature #27080. The label of the option group does not need to be aria-hidden, and the Mac Hover text feature seems to rely on it. Previous PR#27081 fixed this issue for legacy component. This PR fixes it for the non-legacy optgroup component. Fix #27080 (cherry picked from commit 91fbe76)
1 parent 2c660bb commit f595c78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/material/core/option/optgroup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<span
22
class="mat-mdc-optgroup-label"
3-
aria-hidden="true"
3+
role="presentation"
44
[class.mdc-list-item--disabled]="disabled"
55
[id]="_labelId">
66
<span class="mdc-list-item__primary-text">{{ label }} <ng-content></ng-content></span>

0 commit comments

Comments
 (0)