Element

a

Error Type

Known

Guidelines

Requirement

Adjacent links with same resource must be combined.

Error

Adjacent links with same resource are not combined.

Short Description

If 2 adjacent links have the same destination then this error will be generated.

How To Repair

Combine both a (anchor) elements into one anchor element.

Repair Example

<a href="products.html"><img src="icon.gif" alt="" />Products pag</a>

Steps To Check

Procedure

1. Check each a (anchor) element for a following a (anchor) element.
2. If the a (anchor) element has a following a (anchor) element then check if both elements have the same destination (the values of their href attribute match).

Expected Result

1. Sequential a (anchor) elements are expected to have different HREF values.

Failed Result

1. Combine both a (anchor) elements into one anchor element.

Examples

Pass Examples

Two sequential Anchor elements that have different targets.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html xml:lang="en-US" lang="en">
<head>
<title>OAC Testfile - Check #180 - Negative</title>
</head>
<body>
<a href="dogs.html"><img src="icon.gif" alt="Products for dogs" /></a>
<a href="cats.html">Products For Cats</a>
</body>
</html>

Fail Examples

Two sequential Anchor elements that have the same target.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html xml:lang="en-US" lang="en">
<head>
<title>OAC Testfile - Check #180 - Positive</title>
</head>
<body>
<a href="dogs.html"><img src="icon.gif" alt="Products for dogs" /></a>
<a href="dogs.html">Products For Dogs</a>
</body>
</html>

English | German | Italiano


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