User Tools

Site Tools


accessibility:common_issues:color

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
accessibility:common_issues:color [2024/01/08 11:53] – added section on distinguishing items using color sclaccessibility:common_issues:color [2024/04/18 14:07] (current) – [Windows High Contrast Mode and Forced Colors Mode] sleary
Line 15: Line 15:
 For links, this means that there must be some kind of text decoration, preferably an underline, in addition to a color that has sufficient contrast with the surrounding text. For links, this means that there must be some kind of text decoration, preferably an underline, in addition to a color that has sufficient contrast with the surrounding text.
  
-In maps and charts, neighboring regions need to be distinguished by something other than color. Using [[https://twitter.com/steveschoger/status/1112731452704202752|one hue at different shades of lightness]] is one solution. The [[https://visa.github.io/visa-chart-components/?path=/story/introduction--page|Visa Chart Components]] library uses subtle background patterns in addition to color gradients. +In maps and charts, neighboring regions need to be distinguished by something other than color. Using [[https://twitter.com/steveschoger/status/1112731452704202752|one hue at different shades of lightness]] is one solution. The [[https://visa.github.io/visa-chart-components/?path=/story/introduction--page|Visa Chart Components]] library uses subtle background patterns in addition to color gradients. [[https://www.barrierbreak.com/decoding-wcag-1-4-11-non-text-contrast-part-2/#chart_images|Adding high-contrast text labels to pie chart slices]] is also a good solution to adjacent colors that don't have enough contrast with each other.
 ===== Borders and background colors ===== ===== Borders and background colors =====
  
 For some people with autism, ADHD, dyslexia, or other sensory processing issues, designs that feature dense information with high-contrast borders and brightly colored buttons may trigger discomfort or even panic attacks. Unlike people with low vision, this group may want to reduce color contrast. The use of red, orange, and yellow background colors in large blocks can cause problems for some people in this group (see "High-Alert Colors" in [[https://www.tpgi.com/beyond-wcag-losing-spoons-online/|Beyond WCAG: Losing Spoons Online]]). For some people with autism, ADHD, dyslexia, or other sensory processing issues, designs that feature dense information with high-contrast borders and brightly colored buttons may trigger discomfort or even panic attacks. Unlike people with low vision, this group may want to reduce color contrast. The use of red, orange, and yellow background colors in large blocks can cause problems for some people in this group (see "High-Alert Colors" in [[https://www.tpgi.com/beyond-wcag-losing-spoons-online/|Beyond WCAG: Losing Spoons Online]]).
  
 +===== Windows High Contrast Mode and Forced Colors Mode =====
 +
 +[[https://www.smashingmagazine.com/2022/03/windows-high-contrast-colors-mode-css-custom-properties/|Windows High Contrast Mode and Forced Colors Mode]] are color modes set in the operating system preferences. While they are often used for dark modes or stark black/white color schemes, they allow users to specify //any// colors, which may result in a palette with //less// contrast than the default OS styles.
 +
 +In forced colors mode, the following styles will reflect the user's preferences rather than the app stylesheet's:
 +
 +  * text and link color
 +  * background color
 +  * borders, focus outlines, and text decoration (link underlines)
 +  * scrollbar colors
 +  * SVG fill and stroke color
 +
 +See [[https://www.w3.org/TR/css-color-adjust-1/#forced-colors-mode|the W3C specs for details on the affected properties]]. Other properties affecting color, like box-shadow and text-shadow, are removed entirely.
 +
 +Some Bootstrap styles used in Evergreen may need to be adjusted for forced colors mode. For example, Bootstrap's focus highlight style uses a box-shadow instead of an outline. This doesn't work well in forced colors mode, where box-shadows are turned off. The suggested solution is to add a transparent border to the focus style. The border will be changed to the user's preferred border color in forced color modes. There may be other cases where transparent borders should be removed in forced colors mode in order to preserve our intended styling.
 +
 +See [[https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/|Microsoft's article on styling High Contrast Mode]] for examples, including the exact media queries you can use to target specific modes.
 +
 +==== Testing Forced Colors / High Contrast ====
 +
 +You can turn on forced colors mode in your operating system's preferences, but this is often quite jarring. You can use a browser extension instead to emulate the operating system's mode, but only for websites. Note that it will affect all the sites you visit until you turn the extension off.
 +
 +  * [[https://chromewebstore.google.com/detail/high-contrast/djcfdncoelnlbldjfhinnjlhdjlikmph?pli=1|Firefox High Contrast Toggle extension]]
 +  * [[https://chromewebstore.google.com/detail/high-contrast/djcfdncoelnlbldjfhinnjlhdjlikmph?pli=1|Chrome High Contrast extension]]
 ===== Color in OPAC Branding ===== ===== Color in OPAC Branding =====
  
accessibility/common_issues/color.1704732794.txt.gz · Last modified: 2024/01/08 11:53 by scl

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.