Skip to content

Commit 9e37957

Browse files
committed
fix(material/stepper): add styling to stepper for high contrast mode
1 parent 01734b3 commit 9e37957

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/material/stepper/_stepper-theme.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@use '../core/typography/typography-utils';
66
@use '../core/density/private/compatibility';
77
@use './stepper-variables';
8+
@use '../../cdk/a11y';
89

910
@mixin color($config-or-theme) {
1011
$config: theming.get-color-config($config-or-theme);
@@ -15,6 +16,19 @@
1516
$warn: map.get($config, warn);
1617

1718
.mat-step-header {
19+
@include a11y.high-contrast(active, off) {
20+
outline: solid 1px;
21+
&.cdk-keyboard-focused, &.cdk-program-focused {
22+
outline: solid 3px;
23+
}
24+
25+
&[aria-selected='true'] {
26+
.mat-step-label {
27+
text-decoration: underline;
28+
}
29+
}
30+
}
31+
1832
&.cdk-keyboard-focused,
1933
&.cdk-program-focused,
2034
&:hover:not([aria-disabled]),
@@ -100,6 +114,12 @@
100114
background-color: theming.get-color-from-palette($background, card);
101115
}
102116

117+
.mat-horizontal-content-container, .mat-vertical-content-container {
118+
@include a11y.high-contrast(active, off) {
119+
outline: solid 1px;
120+
}
121+
}
122+
103123
.mat-stepper-vertical-line::before {
104124
border-left-color: theming.get-color-from-palette($foreground, divider);
105125
}

0 commit comments

Comments
 (0)