Technique G148:Not specifying background color, not specifying text color, and not using technology features that change those defaults
About this Technique
This technique relates to:
- 1.4.3: Contrast (Minimum) (Sufficient)
- 1.4.6: Contrast (Enhanced) (Sufficient)
- 1.4.8: Visual Presentation (Sufficient)
This technique applies to any technology where text and background color are specified separately and browsers can control default colors.
Description
The objective of this technique is to make sure that users can read text that is presented over a background. With this technique the author avoids having to do any contrast measures by simply not specifying the text color and not specifying the background. As a result the colors of both are completely determined by the user agent.
Some people who have vision disabilities set their user agent to override certain colors that they have trouble seeing. This technique will help avoid a situation where the user agent and web site conflict with each other over the foreground and/or background colors resulting in the same color for text and background, which would make it invisible for user who set their own colors in their browser or Assistive Technology.
Examples
Example 1
The author specifies neither text color nor background, and does not use CSS. As a result the user can set their browser defaults to provide the colors and contrasts that work well for them.
Related Resources
No endorsement implied.
- TPGi Colour Contrast Analyser (CCA) – Application
- Contrast Ratio Analyser - online service
- Color Contrast Samples
- Atypical colour response
- Colors On the Web Color Contrast Analyzer
- Tool to convert images based on color loss so that contrast is restored as luminance contrast when there was only color contrast (that was lost due to color deficiency)
- List of color contrast tools
Tests
Procedure
- Look in all places that text color can be specified
- Check that text color is not specified
- Look in all areas that background color or image used as a background can be specified
- Check that no background color or image used as a background is specified
Expected Results
- # 2 and 4 are true