- From: WCAG 2.0 Techniques Submission Form <nobody@w3.org>
- Date: Tue, 27 Jun 2006 20:50:37 +0000 (UTC)
- To: public-wcag2-techs@w3.org
Submitter's Name: Christophe Strobbe Submitter's Email: christophe.strobbe@esat.kuleuven.be Technique ID: UNKNOWN Short Name: Failure due to omitting labels for form controls for item selection or text input Technique Category: Common Failures Guideline Reference: content-structure-separation-programmatic Success Criterion Reference: UNKNOWN Applicability: HTML and XHTML controls that use external labels UA Issues: The HTML specification allows both implicit and explicit labels. However, many assistive technologies do not correctly handle implicit labels (for example, &lt;label&gt;First name &lt;input type=&quot;text&quot; name=&quot;firstname&quot;&gt;&lt;/label&gt;). [This is copied from technique H44: Using label elements to associate text labels with form controls] Description: The objective of this technique is to describe a failure that occurs when no label elements are used to explicitly associate a form control with a label. [Notes below are copied from H44.] Note: Elements that use explicitly associated labels are * input type=&quot;text&quot;, * input type=&quot;checkbox&quot;, * input type=&quot;radio&quot;, * input type=&quot;file&quot;, * input type=&quot;password&quot;, * textarea, * select. Note 1: The label element is not used for the following: * submit and reset buttons (input type=&quot;submit&quot; or input type=&quot;reset&quot;), * image buttons (input type=&quot;image&quot;), * hidden input fields (input type=&quot;hidden&quot;), * script buttons (button elements or &lt;input type=&quot;button&quot;&gt;). Note 2: Labels for these elements are implicitly associated via the value attribute (for Submit and Reset buttons), the alt attribute (for image buttons), or element content (button). Related Techniques: H44 H65 Test Procedure: For all input elements of type text, file or password, for all textareas and for all select elements in the Web unit: 1. check that there is a label element with at least one printable character before the input element; 2. check that the for attribute of the label element matches the id of the input element. Expected Result: If any check above is false, then this failure condition applies and the content fails the success criterion. Additional Notes: This also applies to SC 4.1.2. See LC comment 654: http://www.w3.org/WAI/GL/WCAG20/issue-tracking/viewdata_individual.php?id=654. No example 1 header was submitted! No example 1 description was submitted! No example 2 header was submitted! No example 2 description was submitted! No resource 1 title submitted! No resource 1 URI submitted! No resource 2 title submitted! No resource 2 URI submitted! No test file 1 was submitted! No test file 1 pass/fail was submitted! No test file 2 was submitted! No test file 2 pass/fail was submitted! ------------------------------------------------ <technique id="UNKNOWN"> <short-name>Failure due to omitting labels for form controls for item selection or text input</short-name> <applies-to> <guideline idref="content-structure-separation-programmatic" /> <success-criterion idref="UNKNOWN" /> </applies-to> <applicability> HTML and XHTML controls that use external labels </applicability> <ua_issues> The HTML specification allows both implicit and explicit labels. However, many assistive technologies do not correctly handle implicit labels (for example, &lt;label&gt;First name &lt;input type=&quot;text&quot; name=&quot;firstname&quot;&gt;&lt;/label&gt;). [This is copied from technique H44: Using label elements to associate text labels with form controls] </ua_issues> <description> The objective of this technique is to describe a failure that occurs when no label elements are used to explicitly associate a form control with a label. [Notes below are copied from H44.] Note: Elements that use explicitly associated labels are * input type=&quot;text&quot;, * input type=&quot;checkbox&quot;, * input type=&quot;radio&quot;, * input type=&quot;file&quot;, * input type=&quot;password&quot;, * textarea, * select. Note 1: The label element is not used for the following: * submit and reset buttons (input type=&quot;submit&quot; or input type=&quot;reset&quot;), * image buttons (input type=&quot;image&quot;), * hidden input fields (input type=&quot;hidden&quot;), * script buttons (button elements or &lt;input type=&quot;button&quot;&gt;). Note 2: Labels for these elements are implicitly associated via the value attribute (for Submit and Reset buttons), the alt attribute (for image buttons), or element content (button). </description> <examples> <ex_head_1> </ex_head_1> <ex_desc_1> </ex_desc_1> <ex_head_2> </ex_head_2> <ex_desc_2> </ex_desc_2> </examples> <resources> <resources_title1> </resources_title1> <resource_uri1> </resource_uri1> <resources_title2> </resources_title2> <resource_uri2> </resource_uri2> </resources> <related_techniques> <related_technique> H44 </related_technique> <related_technique> H65 </related_technique> </related_techniques> <tests> <procedure> For all input elements of type text, file or password, for all textareas and for all select elements in the Web unit: 1. check that there is a label element with at least one printable character before the input element; 2. check that the for attribute of the label element matches the id of the input element. </procedure> <expected_result> If any check above is false, then this failure condition applies and the content fails the success criterion. </expected_result> <test_file_1> </test_file_1> <pass_fail_1> </pass_fail_1> <test_file_2> </test_file_2> <pass_fail_2> </pass_fail_2> </tests> </technique> Additional Notes: This also applies to SC 4.1.2. See LC comment 654: http://www.w3.org/WAI/GL/WCAG20/issue-tracking/viewdata_individual.php?id=654.
Received on Tuesday, 27 June 2006 20:50:33 UTC