Scotopic sensitivity
You don’t know what you don’t know
It's important to recognise that experience is not a singular thing, our experience is not universal, not everyone accesses content the same way we do, on the same devices, on the same networks, in the same modalities we do.
And when we design the web in the way that we expereince it, we actually limit the way that other people experience it. We actually exclude the people that are not like us, and that's not great.
—Aaron Gustafson
A thing that exists
“Foreground and background colors
can be selected by the user.”
So close, and yet so far away
/* Targets the High Contrast Black theme: */
@media (-ms-high-contrast: white-on-black) { }
/* Targets the High Contrast White theme: */
@media (-ms-high-contrast: black-on-white) { }
/* Targets any active High Contrast theme */
@media (-ms-high-contrast: active) { }
/* Targets the High Contrast Black theme: */
@media (-ms-high-contrast: white-on-black) { }
/* Targets the High Contrast White theme: */
@media (-ms-high-contrast: black-on-white) { }
/* Targets any active High Contrast theme */
@media (-ms-high-contrast: active) { }
ActiveBorder | ActiveCaption | AppWorkspace | Background |
ButtonFace | ButtonHighlight | ButtonShadow | ButtonText |
CaptionText | GrayText | Highlight | HighlightText |
InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground |
InfoText | Menu | MenuText | Scrollbar |
ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow |
ThreeDShadow | Window | WindowFrame | WindowText |
ActiveBorder | ActiveCaption | AppWorkspace | Background |
ButtonFace | ButtonHighlight | ButtonShadow | ButtonText |
CaptionText | GrayText | Highlight | HighlightText |
InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground |
InfoText | Menu | MenuText | Scrollbar |
ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow |
ThreeDShadow | Window | WindowFrame | WindowText |
ActiveBorder, deprecated | ActiveCaption, deprecated | AppWorkspace, deprecated | Background, deprecated |
ButtonFace | ButtonHighlight, deprecated | ButtonShadow, deprecated | ButtonText, deprecated |
CaptionText, deprecated | GrayText, deprecated | Highlight | HighlightText |
InactiveBorder, deprecated | InactiveCaption, deprecated | InactiveCaptionText, deprecated | InfoBackground, deprecated |
InfoText, deprecated | Menu, deprecated | MenuText, deprecated | Scrollbar, deprecated |
ThreeDDarkShadow, deprecated | ThreeDFace, deprecated | ThreeDHighlight, deprecated | ThreeDLightShadow, deprecated |
ThreeDShadow, deprecated | Window | WindowFrame, deprecated | WindowText |
Keyword | Content Type |
---|---|
<a> |
Links |
windowText |
Text |
highlightText |
Selected Text Foreground |
highlight |
Selected Text Background |
buttonFace |
Button Text |
window |
Background Color |
Keyword | Content Type |
---|---|
<a> |
Links |
windowText |
Text |
highlightText |
Selected Text Foreground |
highlight |
Selected Text Background |
buttonFace |
Button Text |
window |
Background Color |
Keyword | Content Type |
---|---|
<a> |
Links |
windowText |
Text |
highlightText |
Selected Text Foreground |
highlight |
Selected Text Background |
buttonFace |
Button Text |
window |
Background Color |
Keyword | Content Type |
---|---|
<a> |
Links |
windowText |
Text |
highlightText |
Selected Text Foreground |
highlight |
Selected Text Background |
buttonFace |
Button Text |
window |
Background Color |
Keyword | Content Type |
---|---|
<a> |
Links |
windowText |
Text |
highlightText |
Selected Text Foreground |
highlight |
Selected Text Background |
buttonFace |
Button Text |
window |
Background Color |
Yes, that's the point!
Gentle nudges, not complete overhauls
/* Apply styling when High Contrast Mode is active */
@media (-ms-high-contrast: active) {
}
/* Apply styling when High Contrast Mode is active */
@media (-ms-high-contrast: active) {
input {
border: 2px solid #ffffff;
}
}
/* Apply styling when High Contrast Mode is active */
@media (-ms-high-contrast: active) {
input {
border: 2px solid buttonFace;
}
}
<span class="button" role="button" tabindex="0">
Download Pizza
</span>
<span class="button" role="button" tabindex="0">
Download Pizza
</span>
/* Apply styling when High Contrast Mode is active */
@media (-ms-high-contrast: active) {
}
<span class="button" role="button" tabindex="0">
Download Pizza
</span>
/* Apply styling when High Contrast Mode is active */
@media (-ms-high-contrast: active) {
[role="button"] {
border: 0.15em solid buttonText;
color: buttonText;
}
}
—Terrill Thompson
JPEGs, PNGs, GIFs, etc.
/* Slightly enhance important images */
@media screen and (-ms-high-contrast: active) {
img.hero {
filter: brightness(1) contrast(1) saturate(1.5);
}
}
Source: AP/REX/Shutterstock
Scalable Vector Graphics
/* Only applies to inline SVG */
/* Non-interactive icons */
.icon-svg {
fill: currentColor;
}
/* Interactive icons */
@media screen and (-ms-high-contrast: active) {
button.icon-svg {
background: none;
border-color: buttonText;
fill: buttonText;
}
}
/* Static color declarations */
.bar-chart { background-color: #ffffff; }
.bar-chart .frame { stroke: #000000; }
.bar-chart .text { fill: #000000; }
.bar-chart .age-sixtyfour-under { fill: #0074d9; }
.bar-chart .age-sixtyfour-under { fill: #ffdc00; }
/* Dynamic color when High Contrast mode is active */
@media (-ms-high-contrast: active) {
.bar-chart { background-color: window; }
.bar-chart .frame { stroke: highlightText; }
.bar-chart .text { fill: highlightText; }
.bar-chart .age-sixtyfour-under { fill: windowText; }
.bar-chart .age-sixtyfour-over { fill: highlight; }
}
Source: https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/gallardo.svg
Audio, video, etc.
/* Remove from High Contrast Mode, but maintain layout */
@media (-ms-high-contrast: active) {
.hcm-remove {
visibility: hidden;
}
}
/* Force content to display as text in High Contrast Mode */
@media (-ms-high-contrast: active) {
.hcm-display-as-text {
color: windowText;
}
}
if (window.matchMedia("(-ms-high-contrast: active)").matches) {
// We have support for IE 10+
} else {
// Load a good fallback experience
}
/* Invert inverted images */
@media (inverted-colors) {
img {
filter: invert(100%);
}
}
/* Boost contrast between elements */
@media (light-level: washed) {
body {
background-color: #ffffff;
}
p {
color: #000000;
font-size: 120%;
}
}
“But I don't have
a Windows computer!”
Free Virtual Machines from IE8 to MS Edge
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
Amazon WorkSpaces - Amazon AWS
https://aws.amazon.com/workspaces/