
font colors and backgrounds
This is an outdated draft.
Current information is linked from the WAI website: w3.org/WAI
Some 2020 information on text and background contrast is in
Understanding Success Criterion 1.4.3: Contrast
On this page:
Test
1 |
References
|
About these tests
Nearby:
More HTML 4.01 Tests
|
UAAG 1.0 Test Suite
UAAG 1.0 Requirement
-
Checkpoint
4.3
Configure text colors
(Priority
1
)
-
Provision
1
:
Allow global configuration of the foreground and background color of all visually rendered text content.
-
Provision
2
:
As part of satisfying provision one of this checkpoint, provide a configuration option to override foreground and background colors specified by the author or user agent defaults.
Procedure
- Configure the user agent to render the following test text using user specified colors and background colors.
Run test
Text color: black, background-color: white
Text color: white, background-color: black
Text color: red, background-color: white
Text color: blue, background-color: white
Text color: green, background-color: yellow
Text color: white, background-color: red
Expected results
- The user agent allows the user to chose font color and background color to be used to render text.
- The user agent makes available to the user a range of font and background colors.
Source code
<div style="font-size: large; font-family: sans-serif">
<p style="color: #000000; background-color: #ffffff">Text color: black, background-color: white</p>
<p style="color: #ffffff; background-color: #000000">Text color: white, background-color: black</p>
<p style="color: #ff0000; background-color: #ffffff">Text color: red, background-color: white</p>
<p style="color: blue; background-color: #ffffff">Text color: blue, background-color: white</p>
<p style="color: green; background-color: #ffff42">Text color: green, background-color: yellow</p>
<p style="color: #ffffff; background-color: #ff0000">Text color: white, background-color: red</p>
</div>
-
HTML 4.01 specification for STYLE
-
CSS2 specification for colors and backgrounds
This test is part of a
test suite
for the
User Agent Accessibility Guidelines (UAAG)
1.0
. This work is conducted by the
User Agent Accessibility Guidelines Working
Group
, which is part of W3C's
Web Accessibility Initiative (WAI)
. Please send comments on this test to w3c-wai-ua@w3.org (
public archive
).
Test created by:
Last modified: $Date: 2020/11/04 18:27:50 $ by $Author: shawn $
Copyright
© 1999 - 2003
W3C®
(
MIT
,
INRIA
,
Keio
), All Rights Reserved. W3C
liability
,
trademark
,
document use
and
software licensing
rules apply.