Element

ol

Error Type

Likely

Guidelines

Requirement

List items must not be used to format text.

Error

List item used to format text.

Short Description

OL element should not contain only one LI element.

How To Determine

Question Is this list item used appropriately (not just to format text)?
PASS List item is used appropriately.
FAIL List item is not used appropriately (its used just to format text).

Steps To Check

Procedure

1. Check each OL element in the content.
2. Count the number of LI elements contained by the OL element.
3. If the OL element contains only one LI element then check if the LI element is really a list item.
4. LI elements may be misused to format text.

Expected Result

1. LI elements are really list items and not used to format text.

Failed Result

1. Remove the OL and LI elements and replace them with other markup that properly formats the text.

Examples

Pass Examples

List with two items.
<!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 #81 - Negative</title>
</head>
<body>

<ol>
<li>Item text 1</li>
<li>Item text 2</li>
</ol>

</body>
</html>

Fail Examples

List with only one item.
<!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 #81 - Positive</title>
</head>
<body>

<ol>
<li>Item text</li>
</ol>

</body>
</html>

English | German | Italiano


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