input
element contains text.
label
element.
input
elements.input
element's associated label.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>
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>