Skip to content

Commit 7bf5e4e

Browse files
authored
fix(expansion): show header focus state when expanded (#16486)
The expansion-panel currently shows the header focus state when collapsed. This is an a11y problem because there's no indicator of focus state when expanded.
1 parent 1006cc2 commit 7bf5e4e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/material/expansion/_expansion-theme.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
border-top-color: mat-color($foreground, divider);
1818
}
1919

20-
.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header {
21-
&:not([aria-disabled='true']) {
22-
&.cdk-keyboard-focused,
23-
&.cdk-program-focused,
24-
&:hover {
20+
.mat-expansion-panel {
21+
& .mat-expansion-panel-header.cdk-keyboard-focused,
22+
& .mat-expansion-panel-header.cdk-program-focused,
23+
&:not(.mat-expanded) .mat-expansion-panel-header:hover {
24+
&:not([aria-disabled='true']) {
2525
background: mat-color($background, hover);
2626
}
2727
}

0 commit comments

Comments
 (0)