Element

a

Error Type

Known

Guidelines

Requirement

Link text colour must contrast sufficiently with its background colour.

Error

The contrast between the colour of link text and its background is not sufficient to meet WCAG2.0 Level AA.

Short Description

The visual presentation of link text must have a contrast ratio of at least 4.5:1, except for large-scale text, which must have a contrast ratio of at least 3:1 as determined by a contrast algorithm specified by WCAG2.0. Large scale text is considered to be at least 18-point (or 14 point when bold).

Rationale

The rationale is based on a) adoption of the 3:1 contrast ratio for minimum acceptable contrast for normal observers, in the ANSI standard, and b) the empirical finding that in the population, visual acuity of 20/40 is associated with a contrast sensitivity loss of roughly 1.5 [ARDITI-FAYE]. A user with 20/40 would thus require a contrast ratio of 3 * 1.5 = 4.5 to 1. Following analogous empirical findings and the same logic, the user with 20/80 visual acuity would require contrast of about 7:1.

How To Repair

Use a colour contrast evaluator to determine if link text and background colours provide a contrast ratio of 4.5:1 for standard text, or 3:1 for larger text. Change colour codes to produce sufficient contrast. http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html#visual-audio-contrast-contrast-resources-head

Repair Example

<style type="text/css">
a:link {color:blue;}
</style>
<div style="background-color:#FFFFFF">
<a href="textcolour.html">Coloured link text must contrast sufficiently with a coloured background</a>
/div>

How To Determine

Question Does the colour of link text on a coloured background provide a contrast ratio of 4.5:1 or greater?
PASS Yes, the contrast ratio is at least 4.5:1 for standard link text, and 3:1 for large text.
FAIL No, the contrast ratio is less than 4.5:1 for link text, and less than 3:1 for large text.

Steps To Check

Procedure

1. Enter the URL, or upload the HTML of a Web page in which colour values are defined for text and/or backgrounds, to have the contrast evaluator determine the contrast ratio between text and background colours.
2. For some contrast evaluation tools, enter the Hex colour codes (e.g #FFEE00) for the text and the background on which it appears to calculate the contrast ratio.

Expected Result

1. The contrast evaluator will display a contrast ratio of at least 4.5:1 for standard sized text. Standard sized text is considered to be less than 18-point (or 14 point when bold).
2. The contrast evaluator will display a contrast ratio of at least 3:1 for large scale text. Large scale text is considered to be at least 18-point (or 14 point when bold).

Failed Result

1. The contrast evaluator will display a contrast ratio less than 4.5:1 for standard sized text. Standard sized text is considered to be less than 18-point (or 14 point when bold).
2. The contrast evaluator will display a contrast ratio less than 3:1 for large scale text. Large scale text is considered to be at least 18-point (or 14 point when bold).

Examples

Pass Examples

Style assigns higher contrast blue as link colour on a white background.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>OAC Testfile - Check #305 - Positive</title>
<style type="text/css">
a:link{color:blue;}
</style>
</head>
<body>
<p style="background-color:#ffffff;color:#000000;">
Read the <a href="carol-text-dogs.txt">text transcript of Carol's talk about dogs</a>.
</p>
</body>
</html>

Fail Examples

Style assigns low contrast yellow to visited link colour on a white background.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>OAC Testfile - Check #305 - Negative</title>
<style type="text/css">
a:link{color:yellow;}
</style>
</head>
<body>
<p style="background-color:#ffffff;color:#000000;">
Read the <a href="carol-text-dogs.txt">text transcript of Carol's talk about dogs</a>.
</p>
</body>
</html>

English | German | Italiano


Web site engine's code is copyright © 2011
Inclusive Design Institute
Web Service API