<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15101</bug_id>
          
          <creation_ts>2011-12-07 16:30:40 +0000</creation_ts>
          <short_desc>Multiple input buttons inside a label</short_desc>
          <delta_ts>2011-12-14 19:55:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>check</component>
          <version>HEAD</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>zwwwz</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>ville.skytta</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>61095</commentid>
    <comment_count>0</comment_count>
    <who name="">zwwwz</who>
    <bug_when>2011-12-07 16:30:40 +0000</bug_when>
    <thetext>Per http://www.w3.org/TR/html/dtds.html
# The label element may contain at most one descendant input element, button element, select element, or textarea element.

This is not caught when validating local html.
I was trying to troubleshoot a possible jQuery problem when I stumbled upon this:
http://jsfiddle.net/dDJCS/

Validated local source: This document was successfully checked as XHTML 1.0 Transitional!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61098</commentid>
    <comment_count>1</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-12-07 18:23:53 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Per http://www.w3.org/TR/html/dtds.html
&gt; # The label element may contain at most one descendant input element, button
&gt; element, select element, or textarea element.

I don&apos;t see that text in the cited document.  It does say &quot;Each label must not contain more than ONE field&quot;, but that&apos;s just a comment in the DTD and not specified in a form that could be used when validating a document against the DTD.  http://validator.w3.org/docs/help.html#validation_basics</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61204</commentid>
    <comment_count>2</comment_count>
    <who name="">zwwwz</who>
    <bug_when>2011-12-08 00:18:02 +0000</bug_when>
    <thetext>http://dev.w3.org/html5/markup/label.html
# The label element may contain at most one descendant input element, button
element, select element, or textarea element. 

same concept applies to xhtml but isn&apos;t being enforced in the validator</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61252</commentid>
    <comment_count>3</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-12-08 17:50:06 +0000</bug_when>
    <thetext>HTML5 validation rules are very different from XHTML or HTML &lt; 5 validation.

For HTML5 the issue is caught:

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;&lt;title&gt;&lt;/title&gt;
    &lt;label&gt;
        &lt;input type=&quot;button&quot; class=&quot;setNamePattern&quot; value=&quot;1111&quot;&gt;
        &lt;input type=&quot;button&quot; class=&quot;setNamePattern&quot; value=&quot;2222&quot;&gt;
    &lt;/label&gt;
&lt;/html&gt;

Line 6, Column 65: The label element may contain at most one input, button, select, textarea, or keygen descendant.
Line 4, Column 11: label element with multiple labelable descendants.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61436</commentid>
    <comment_count>4</comment_count>
    <who name="">zwwwz</who>
    <bug_when>2011-12-11 23:51:04 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; HTML5 validation rules are very different from XHTML or HTML &lt; 5 validation.
&gt; 
&gt; For HTML5 the issue is caught:
&gt; 
&gt; &lt;!DOCTYPE html&gt;
&gt; &lt;html&gt;
&gt; &lt;head&gt;&lt;title&gt;&lt;/title&gt;
&gt;     &lt;label&gt;
&gt;         &lt;input type=&quot;button&quot; class=&quot;setNamePattern&quot; value=&quot;1111&quot;&gt;
&gt;         &lt;input type=&quot;button&quot; class=&quot;setNamePattern&quot; value=&quot;2222&quot;&gt;
&gt;     &lt;/label&gt;
&gt; &lt;/html&gt;
&gt; 
&gt; Line 6, Column 65: The label element may contain at most one input, button,
&gt; select, textarea, or keygen descendant.
&gt; Line 4, Column 11: label element with multiple labelable descendants.

so are you saying that I should be able to put multiple buttons in a label?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61442</commentid>
    <comment_count>5</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-12-12 06:06:49 +0000</bug_when>
    <thetext>No, comments 1 and 3 are what I&apos;m saying.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61561</commentid>
    <comment_count>6</comment_count>
    <who name="">zwwwz</who>
    <bug_when>2011-12-14 19:55:38 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; No, comments 1 and 3 are what I&apos;m saying.

If you check out the jsfiddle example you see that jquery does not work correctly. I filed a bug with jquery, they said that this is just invalid html and told me to file a bug with w3c since you guys say it is valid.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>