Skip to content

fix(list): no disabled indication in high contrast mode #18567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/material/list/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ mat-action-list {

.mat-list-item-disabled {
pointer-events: none;

// Since we can't use a color to indicate that the list
// item is disabled, we have to use opacity instead.
@include cdk-high-contrast {
opacity: 0.5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the contrast ratio end up being with this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't measured it, but this isn't the first place where we indicate disabled elements by reducing the opacity to 0.5.

}
}

@include cdk-high-contrast(active, off) {
Expand Down