Element

input

Error Type

Known

Guidelines

  • WCAG 2.0 (Level A)
    Guideline Group3.3 Input Assistance: Help users avoid and correct mistakes.
    Guideline SubgroupSuccess Criteria 3.3.2 Labels or Instructions (A)
  • WCAG 2.0 (Level AA)
    Guideline Group3.3 Input Assistance: Help users avoid and correct mistakes.
    Guideline SubgroupSuccess Criteria 3.3.2 Labels or Instructions (A)
  • WCAG 2.0 (Level AAA)
    Guideline Group3.3 Input Assistance: Help users avoid and correct mistakes.
    Guideline SubgroupSuccess Criteria 3.3.2 Labels or Instructions (A)

Requirement

Each label associated with an input element contains text.

Error

Label text is empty.

Short Description

Label must contain some text.

How To Repair

Add text to the label element.

Steps To Check

Procedure

1. Check the associated label for all input elements.
2. Note: For information on what constitutes an associated label please see test 57.

Expected Result

1. Each associated label is expected to contain at least one printable character.

Failed Result

1. Add text to the input element's associated label.

Examples

Pass Examples

label contains one printable character.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<title>ATRC Testfile - Check #188 - Negative</title>
</head>
<body>

<form action="http://www.test.com" method="post">
<p>
<label for="name">First name: </label>
<input type="text" name="firstname" id="name"/>
</p>
</form>

</body>
</html>

Fail Examples

label is empty.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<title>ATRC Testfile - Check #188 - Positive</title>
</head>
<body>

<form action="http://www.test.com" method="post">
<p>
<label for="name"></label>
<input type="text" name="firstname" id="name"/>
</p>
</form>

</body>
</html>
Web site engine's code is copyright © 2023
Inclusive Design Institute