Skip to content

Commit 0d0c6d4

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 0793142 commit 0d0c6d4

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
@@ -111,9 +111,10 @@
111111
z-index: 1;
112112
}
113113

114-
// Add an outline to make it more visible in high contrast mode.
114+
// Add an outline to make buttons more visible in high contrast mode. Stroked buttons
115+
// don't need a special look in high-contrast mode, because those already have an outline.
115116
@include cdk-high-contrast {
116-
.mat-button, .mat-raised-button, .mat-icon-button, .mat-fab, .mat-mini-fab {
117+
.mat-button, .mat-flat-button, .mat-raised-button, .mat-icon-button, .mat-fab, .mat-mini-fab {
117118
outline: solid 1px;
118119
}
119120
}

0 commit comments

Comments
 (0)