Element

textarea

Error Type

Known

Guidelines

  • WCAG 2.0 (Level A)
    Guideline Group1.3 Ensure that information and structure can be separated from presentation
    Guideline SubgroupSuccess Criteria 1.3.1 Info and Relationships (A)
  • WCAG 2.0 (Level AA)
    Guideline Group1.3 Adaptable: Create content that can be presented in different ways (for example simpler layout) without losing information or structure.
    Guideline SubgroupSuccess Criteria 1.3.1 Info and Relationships (A)
  • WCAG 2.0 (Level AAA)
    Guideline Group1.3 Adaptable: Create content that can be presented in different ways without losing information or structure.
    Guideline SubgroupSuccess Criteria 1.3.1 Info and Relationships (A)

Requirement

All textarea elements have a label containing text.

Error

textarea has no text in label.

Short Description

textarea element must have text in its associated label.

How To Repair

Add text to the textarea element's associated label that describes the purpose or function of the control.

Steps To Check

Procedure

1. Check all textarea elements.
2. The textarea element must have an explicitly associated label using one or more of the following methods.
3. The textarea element has an id attribute value that matches the for attribute value of a label element.
4. and/or
5. The textarea element has a title attribute.
6. and/or
7. The textarea element is contained by a label element.
8. Check if the label contains text.

Expected Result

1. All textarea elements have a label containing text.

Failed Result

1. Add text to the label that describes the purpose or function of the control.

Examples

Pass Examples

Label using for and id contains text.
<?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 #212.2 - Negative</title>
</head>
<body>

<form action="http://www.test.com/testing" method="post">
<label for="text1">comments:</label>
<textarea name="nametext" id="text1" rows="5" cols="40">
</textarea>
</form>

</body>
</html>

Fail Examples

Label using for and id does not contain text.
<?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 #212.1 - Positive</title>
</head>
<body>

<form action="http://www.test.com/testing" method="post">
<label for="text1"></label>
<textarea name="nametext" id="text1" rows="5" cols="40">
</textarea>
</form>

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