mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 14:46:18 +08:00
A11Y: Improve accessibility in WHCM themes (#18606)
This commit is contained in:
parent
f5419521f0
commit
4b4dbbf580
|
@ -4,6 +4,7 @@
|
||||||
@import "vendor/pikaday";
|
@import "vendor/pikaday";
|
||||||
@import "vendor/tippy";
|
@import "vendor/tippy";
|
||||||
@import "vendor/svg-arrow";
|
@import "vendor/svg-arrow";
|
||||||
|
@import "common/whcm";
|
||||||
@import "common/foundation/helpers";
|
@import "common/foundation/helpers";
|
||||||
@import "common/foundation/base";
|
@import "common/foundation/base";
|
||||||
@import "common/select-kit/_index";
|
@import "common/select-kit/_index";
|
||||||
|
|
|
@ -163,6 +163,7 @@
|
||||||
padding-top: 0.25em;
|
padding-top: 0.25em;
|
||||||
padding-bottom: 0.25em;
|
padding-bottom: 0.25em;
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
|
outline: 2px solid transparent;
|
||||||
background-color: var(--tertiary-very-low);
|
background-color: var(--tertiary-very-low);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
color: $icon-color;
|
color: $icon-color;
|
||||||
margin-right: 0.45em;
|
margin-right: 0.45em;
|
||||||
transition: color 0.25s;
|
transition: color 0.25s;
|
||||||
|
// For Windows High Contrast (see whcm.scss for more)
|
||||||
|
@media (forced-colors: active) {
|
||||||
|
color: ButtonText;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.d-button-label + .d-icon {
|
.d-button-label + .d-icon {
|
||||||
margin-left: 0.45em;
|
margin-left: 0.45em;
|
||||||
|
@ -42,6 +46,10 @@
|
||||||
color: $hover-text-color;
|
color: $hover-text-color;
|
||||||
.d-icon {
|
.d-icon {
|
||||||
color: $hover-icon-color;
|
color: $hover-icon-color;
|
||||||
|
// For Windows High Contrast (see whcm.scss for more)
|
||||||
|
@media (forced-colors: active) {
|
||||||
|
color: Highlight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:focus {
|
&:focus {
|
||||||
|
@ -50,6 +58,9 @@
|
||||||
color: $hover-text-color;
|
color: $hover-text-color;
|
||||||
.d-icon {
|
.d-icon {
|
||||||
color: $hover-icon-color;
|
color: $hover-icon-color;
|
||||||
|
@media (forced-colors: active) {
|
||||||
|
color: Highlight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&[href] {
|
&[href] {
|
||||||
|
|
21
app/assets/stylesheets/common/whcm.scss
Normal file
21
app/assets/stylesheets/common/whcm.scss
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
// Overrides for Windows High Contrast Mode
|
||||||
|
|
||||||
|
/*
|
||||||
|
Some @media (forced-colors: active) {} styles
|
||||||
|
have also been used inside mixins in:
|
||||||
|
- common/components/buttons.scss
|
||||||
|
|
||||||
|
See file above for overrides.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Select Kit
|
||||||
|
.select-kit {
|
||||||
|
.select-kit-row {
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
@media (forced-colors: active) {
|
||||||
|
outline: 2px auto transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user