Skip to content

Commit e65f007

Browse files
devversionmmalerba
authored andcommitted
fix(button): better accessibility for flat buttons in high-contrast (#9783)
* Improves the accessibility for `mat-flat-button` elements in high-contrast mode. Currently it's nearly impossible to figure out, whether it's a button or not.
1 parent d062ccb commit e65f007

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/button/button.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@
124124
z-index: 1;
125125
}
126126

127-
// Add an outline to make it more visible in high contrast mode.
127+
// Add an outline to make buttons more visible in high contrast mode. Stroked buttons
128+
// don't need a special look in high-contrast mode, because those already have an outline.
128129
@include cdk-high-contrast {
129-
.mat-button, .mat-raised-button, .mat-icon-button, .mat-fab, .mat-mini-fab {
130+
.mat-button, .mat-flat-button, .mat-raised-button, .mat-icon-button, .mat-fab, .mat-mini-fab {
130131
outline: solid 1px;
131132
}
132133
}

0 commit comments

Comments
 (0)