Skip to content

Commit 1e917b7

Browse files
committed
fix(material/tabs): add HCM disabled styles
This adds disabled styles for tab labels in high contrast mode
1 parent e74be63 commit 1e917b7

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/material-experimental/mdc-tabs/tab-header.scss

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use '@angular/cdk';
12
@use './tabs-common';
23

34
@include tabs-common.paginated-tab-header;
@@ -10,8 +11,18 @@
1011
@include tabs-common.paginated-tab-header-item-wrapper('.mat-mdc-tab-header');
1112
}
1213

13-
// For the tab element, default inset/offset values are necessary to ensure that
14-
// the focus indicator is sufficiently contrastive and renders appropriately.
15-
.mat-mdc-tab::before {
16-
margin: 5px;
14+
.mat-mdc-tab {
15+
// For the tab element, default inset/offset values are necessary to ensure that
16+
// the focus indicator is sufficiently contrastive and renders appropriately.
17+
&::before {
18+
margin: 5px;
19+
}
20+
21+
// When a tab is disabled in high contrast mode, set the text color to the disabled
22+
// color, which is (unintuitively) named "GrayText".
23+
@include cdk.high-contrast(active, off) {
24+
&[aria-disabled="true"] {
25+
color: GrayText;
26+
}
27+
}
1728
}

0 commit comments

Comments
 (0)