Skip to content

Commit c2f337e

Browse files
crisbetoannieyw
authored andcommitted
fix(material/core): unable to distinguish disabled mat-option in high contrast mode (#21484)
Fixes that disabled `mat-option` instances cannot be distinguished from enabled ones in high contrast mode. (cherry picked from commit e608da3)
1 parent a0adffd commit c2f337e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/material/core/option/option.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
border: solid $high-contrast-border-width currentColor;
4545
margin: 0;
4646
}
47+
48+
// Fade out the option when it is disabled so that it can be distinguished from the enabled
49+
// options. Note that ideally we'd use `color: GreyText` here which is what the browser uses
50+
// for disabled buttons, but we can't because Firefox doesn't recognize it.
51+
&[aria-disabled='true'] {
52+
opacity: 0.5;
53+
}
4754
}
4855
}
4956

0 commit comments

Comments
 (0)