This is a draft document supplied by the WCAG Techniques Task Force. It in no way represents a WCAG Working Group consensus or agreement and is provided for informational and discussion purposes only. The accessibility test listed below should not be construed as required for conformance with the proposed WCAG2.
input
elements, with type
of "checkbox", have an explicitly associated label
.Copyright 2005, ATRC, University Of Toronto, All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This test case was created by the ATRC at the University Of Toronto. It should not be construed as required for conformance with the proposed WCAG2.
The complete list of tests may be found at http://www.w3.org/WAI/GL/WCAG20/tests/
Comments on this test may be made to the WCAG mailing list.
As part of the conformance test process, this test has a status of 'accepted'.
Guideline: 1.3 - Ensure that information, functionality, and structure can be separated from presentation.
Success Criteria:
1. Structures within the content can be programmatically determined . How to ensure that structures and relationships in content can be programmatically determined . (Informative) The concepts of "reliable" and "standard" need to be incorporated into the definition of "programmatically determined."
Level 1
The WCAG2 has 3 priority levels for making Web content accessible. This test has a priority of 'Level 1'.
The WCAG Working Group has created techniques that describe how Web content may be made accessible. The following techniques are related to this test:
There are no prerequisite tests for this test.
input
elements that have a type
attribute value of "checkbox".input
element must have an explicitly associated label using one or more of the following methods.input
element has an id
attribute value that matches the for
attribute value of a label
element.input
element has a title
attribute.input
element is contained by a label
element.input
elements, with type
of "checkbox", have an explicitly associated label
.label
element for the input
element and associate these elements using the ID and for
attributes.title
attribute to the input
element.label
element that contains the input
element.Any accessibility check may be performed after this test.
These test files contain examples of the accessibility problem detectable by this test. They may also contain more accessibility problems than the one described in this test. Please ignore any extraneous accessibility problems in these files.
input
element, type
of "checkbox", does not have associated label.)
<?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>OAC Testfile - Check #119 - Positive</title>
</head>
<body>
<form action="http://somesite.com/prog/adduser" method="post">
<p>
<label>Cats</label>
<input type="checkbox" name="cats" tabindex="1" />
</p>
</form>
</body>
</html>
input
element has an associated label using label
element.)
<?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>OAC Testfile - Check #119 - Negative</title>
</head>
<body>
<form action="http://somesite.com/prog/adduser" method="post">
<p>
<label for="catbox">Cats</label>
<input type="checkbox" id="catbox" name="cats" tabindex="1" />
</p>
</form>
</body>
</html>
input
element has an associated label using title
attribute.)
<?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>OAC Testfile - Check #119 - Negative</title>
</head>
<body>
<form action="http://somesite.com/prog/adduser" method="post">
<p>
<input type="checkbox" title="cats" name="cats" tabindex="1" />
</p>
</form>
</body>
</html>
input
has associated label using label
element containing input
element.)
<?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>OAC Testfile - Check #57 - Negative</title>
</head>
<body>
<form action="http://somesite.com/prog/adduser" method="post">
<p>
<label>cats: <input type="checkbox" name="cats" /></label>
</p>
</form>
</body>
</html>