<?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>24135</bug_id>
          
          <creation_ts>2013-12-19 10:17:42 +0000</creation_ts>
          <short_desc>form[name] non-normative text inconsistent</short_desc>
          <delta_ts>2014-03-07 23:53:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>sof</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97802</commentid>
    <comment_count>0</comment_count>
    <who name="">sof</who>
    <bug_when>2013-12-19 10:17:42 +0000</bug_when>
    <thetext>The non-normative text for form[name] in

 http://www.whatwg.org/specs/web-apps/current-work/#the-form-element

states that only &lt;img&gt; elements with the given ID can match. I believe this should be by ID or name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97932</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-01-02 20:40:05 +0000</bug_when>
    <thetext>Do you have a test demonstrating this? I&apos;m not 100% sure I follow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97945</commentid>
    <comment_count>2</comment_count>
    <who name="">sof</who>
    <bug_when>2014-01-02 21:05:20 +0000</bug_when>
    <thetext>Certainly,

 &lt;form&gt;&lt;img name=&quot;n&quot;/&gt;&lt;/form&gt;&lt;script&gt;alert(document.forms[0][&quot;n&quot;]);&lt;/script&gt;

Per that non-normative text afaict, the &lt;img/&gt; won&apos;t match.

(I&apos;m assuming the &quot;Returns the form control&quot; part of that text to refer to the &apos;listed elements&apos; of the form. Which does not have &lt;img/&gt;.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98003</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-01-04 22:10:15 +0000</bug_when>
    <thetext>Ah, I see. Yeah, that&apos;s intentional. The non-normative text ignores what happens for non-normative content. &lt;img name&gt; is non-normative.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98007</commentid>
    <comment_count>4</comment_count>
    <who name="">sof</who>
    <bug_when>2014-01-05 07:10:24 +0000</bug_when>
    <thetext>That doesn&apos;t make much sense :-) Where is &lt;img name&gt; called out as being outside of what the spec requires when the algorithms below (in normative text) includes it, but without stating that it is not a requirement to also consider &lt;img name&gt;?
I would expect the non-normative box to be a summary of normative text, at least here.

(A trifling detail given that the text isn&apos;t normative, but still.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98216</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-01-09 19:02:51 +0000</bug_when>
    <thetext>(In reply to sof from comment #4)
&gt; Where is &lt;img name&gt; called out as being
&gt; outside of what the spec requires when the algorithms below (in normative
&gt; text) includes it, but without stating that it is not a requirement to also
&gt; consider &lt;img name&gt;?

I don&apos;t understand that question.

The idea is that implementors refer to the normative text to implement browsers, and authors refer to the non-normative text when figuring out how the APIs work.

Authors don&apos;t need to know anything about what happens with &lt;img name&gt;, since if they&apos;re using it they&apos;ve probably made a mistake, and the validator will help them to convert to using id=&quot;&quot; or whatnot. So the non-normative text doesn&apos;t mention it. This is one of the main ways the non-normative API descriptions differ from the normative ones; if the non-normative text were pedantically correct, it might as well be normative.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98225</commentid>
    <comment_count>6</comment_count>
    <who name="">sof</who>
    <bug_when>2014-01-09 20:29:03 +0000</bug_when>
    <thetext>A problem here is/was how the line between normative and not is drawn (where is that defined); just trust the non-normative text as always being accurate?

But I now see that 

 http://www.whatwg.org/specs/web-apps/current-work/#non-conforming-features

enumerates img.name as obsolete. So, we&apos;re fine in this regard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102093</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-07 23:53:17 +0000</bug_when>
    <thetext>(In reply to sof from comment #6)
&gt; A problem here is/was how the line between normative and not is drawn (where
&gt; is that defined); just trust the non-normative text as always being accurate?

As an implementors, you should just ignore the non-normative text entirely. Especially the domintro blocks, but also anything that says &quot;Note:&quot;, to be honest.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102094</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-07 23:53:55 +0000</bug_when>
    <thetext>And definitely ignore all the examples. And the diagrams. And the text in the indexes, and any tables marked non-normative, and... :-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>