Skip to content

fix(datepicker): high contrast accessibility improvements #10363

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
Apr 16, 2018
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
18 changes: 18 additions & 0 deletions src/lib/datepicker/calendar-body.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../cdk/a11y/a11y';

$mat-calendar-body-label-padding-start: 5% !default;
// We don't want the label to jump around when we switch between month and year views, so we use
// the same amount of padding regardless of the number of columns. We align the header label with
Expand Down Expand Up @@ -58,6 +60,22 @@ $mat-calendar-body-cell-content-size: 100% - $mat-calendar-body-cell-content-mar

// Choosing a value clearly larger than the height ensures we get the correct capsule shape.
border-radius: 999px;

@include cdk-high-contrast {
border: none;
}
}


@include cdk-high-contrast {
.mat-datepicker-popup,
.mat-calendar-body-selected {
outline: solid 1px;
}

.mat-calendar-body-today {
outline: dotted 1px;
}
}

[dir='rtl'] {
Expand Down