[html5] r2146 - [ct] (0) WF2: <label> element summary; make <label> and <fieldset> associate wit [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Sep 3 13:43:16 PDT 2008
Author: ianh
Date: 2008-09-03 13:43:09 -0700 (Wed, 03 Sep 2008)
New Revision: 2146
Modified:
index
source
Log:
[ct] (0) WF2: <label> element summary; make <label> and <fieldset> associate with the form element pointer.
Modified: index
===================================================================
--- index 2008-09-03 11:05:36 UTC (rev 2145)
+++ index 2008-09-03 20:43:09 UTC (rev 2146)
@@ -26792,9 +26792,43 @@
<p class=big-issue>...
- <h4 id=the-label><span class=secno>4.9.5 </span>The <code>label</code>
- element</h4>
+ <h4 id=the-label><span class=secno>4.9.5 </span>The <dfn
+ id=label><code>label</code></dfn> element</h4>
+ <dl class=element>
+ <dt>Categories
+
+ <dd><a href="#phrasing0">Phrasing content</a>.
+
+ <dd><a href="#interactive1">Interactive content</a>.
+
+ <dt>Contexts in which this element may be used:
+
+ <dd>Where <a href="#phrasing0">phrasing content</a> is expected.
+
+ <dt>Content model:
+
+ <dd><a href="#phrasing0">Phrasing content</a>.
+
+ <dt>Element-specific attributes:
+
+ <dd><code title=attr-label-form>form</code>
+
+ <dd><code title=attr-label-for>for</code>
+
+ <dt>DOM interface:
+
+ <dd>
+ <pre
+ class=idl>interface <dfn id=htmllabelelement>HTMLLabelElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
+ readonly attribute HTMLFormElement <span title=dom-label-form>form</span>;
+ attribute DOMString <span title=dom-label-htmlFor>htmlFor</span>;
+ readonly attribute <a href="#htmlelement">HTMLElement</a> <span title=dom-label-control>control</span>;
+};</pre>
+ </dl>
+
+ <p class=big-issue>...
+
<h4 id=the-select><span class=secno>4.9.6 </span>The <code>select</code>
element</h4>
@@ -29900,7 +29934,7 @@
<dd><code title=attr-command-type><a href="#type13">type</a></code>
- <dd><code title=attr-command-label><a href="#label">label</a></code>
+ <dd><code title=attr-command-label><a href="#label0">label</a></code>
<dd><code title=attr-command-icon><a href="#icon">icon</a></code>
@@ -29926,7 +29960,7 @@
<pre
class=idl>interface <dfn id=htmlcommandelement>HTMLCommandElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <a href="#type14" title=dom-command-type>type</a>;
- attribute DOMString <a href="#label0" title=dom-command-label>label</a>;
+ attribute DOMString <a href="#label1" title=dom-command-label>label</a>;
attribute DOMString <a href="#icon0" title=dom-command-icon>icon</a>;
attribute boolean <a href="#disabled5" title=dom-command-disabled>disabled</a>;
attribute boolean <a href="#checked1" title=dom-command-checked>checked</a>;
@@ -29953,7 +29987,7 @@
may also be omitted if the element is to represent the first of these
types, a simple command.
- <p>The <dfn id=label title=attr-command-label><code>label</code></dfn>
+ <p>The <dfn id=label0 title=attr-command-label><code>label</code></dfn>
attribute gives the name of the command, as shown to the user.
<p>The <dfn id=title6 title=attr-command-title><code>title</code></dfn>
@@ -30011,7 +30045,7 @@
</div>
<p>The <dfn id=type14 title=dom-command-type><code>type</code></dfn>, <dfn
- id=label0 title=dom-command-label><code>label</code></dfn>, <dfn id=icon0
+ id=label1 title=dom-command-label><code>label</code></dfn>, <dfn id=icon0
title=dom-command-icon><code>icon</code></dfn>, <dfn id=disabled5
title=dom-command-disabled><code>disabled</code></dfn>, <dfn id=checked1
title=dom-command-checked><code>checked</code></dfn>, <dfn id=radiogroup0
@@ -30310,7 +30344,7 @@
<dd><code title=attr-menu-type><a href="#type17">type</a></code>
- <dd><code title=attr-menu-label><a href="#label1">label</a></code>
+ <dd><code title=attr-menu-label><a href="#label2">label</a></code>
<dt>DOM interface:
@@ -30318,7 +30352,7 @@
<pre
class=idl>interface <dfn id=htmlmenuelement>HTMLMenuElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <a href="#type18" title=dom-menu-type>type</a>;
- attribute DOMString <a href="#label2" title=dom-menu-label>label</a>;
+ attribute DOMString <a href="#label3" title=dom-menu-label>label</a>;
};</pre>
</dl>
@@ -30360,14 +30394,14 @@
href="#li">li</a></code> element children, <a href="#flow-content0">flow
content</a> describing available commands.
- <p>The <dfn id=label1 title=attr-menu-label><code>label</code></dfn>
+ <p>The <dfn id=label2 title=attr-menu-label><code>label</code></dfn>
attribute gives the label of the menu. It is used by user agents to
display nested menus in the UI. For example, a context menu containing
another menu would use the nested menu's <code title=attr-menu-label><a
- href="#label1">label</a></code> attribute for the submenu's menu label.
+ href="#label2">label</a></code> attribute for the submenu's menu label.
<p>The <dfn id=type18 title=dom-menu-type><code>type</code></dfn> and <dfn
- id=label2 title=dom-menu-label><code>label</code></dfn> DOM attributes
+ id=label3 title=dom-menu-label><code>label</code></dfn> DOM attributes
must <a href="#reflect">reflect</a> the content attributes of the same
name.
@@ -30523,7 +30557,7 @@
element.
<dt>A <code><a href="#menu">menu</a></code> element with no <code
- title=attr-menu-label><a href="#label1">label</a></code> attribute
+ title=attr-menu-label><a href="#label2">label</a></code> attribute
<dt>A <code>select</code> element
@@ -30532,7 +30566,7 @@
then append another separator.
<dt>A <code><a href="#menu">menu</a></code> element with a <code
- title=attr-menu-label><a href="#label1">label</a></code> attribute
+ title=attr-menu-label><a href="#label2">label</a></code> attribute
<dt>An <code>optgroup</code> element
@@ -30546,14 +30580,15 @@
<dd><a href="#ignored">Ignore</a> the node.
</dl>
- <p class=issue>We should support <code>label</code> in the algorithm above
- -- just iterate through the contents like with <code><a
- href="#li">li</a></code>, to support <code><a
- href="#input0">input</a></code> elements in <code>label</code> elements.
- Also, <code>optgroup</code> elements without labels should be ignored
- (maybe? or at least should say they have no label so that they are dropped
- below), and <code>select</code> elements inside <code>label</code>
- elements may need special processing.
+ <p class=issue>We should support <code><a href="#label">label</a></code> in
+ the algorithm above -- just iterate through the contents like with
+ <code><a href="#li">li</a></code>, to support <code><a
+ href="#input0">input</a></code> elements in <code><a
+ href="#label">label</a></code> elements. Also, <code>optgroup</code>
+ elements without labels should be ignored (maybe? or at least should say
+ they have no label so that they are dropped below), and
+ <code>select</code> elements inside <code><a
+ href="#label">label</a></code> elements may need special processing.
<p>Once all the nodes have been processed as described above, the user
agent must the post-process the menu as follows:
@@ -30684,7 +30719,7 @@
or from script. If a command has no ID, it is an <dfn
id=anonymous>anonymous command</dfn>.
- <dt><dfn id=label3 title=command-facet-Label>Label</dfn>
+ <dt><dfn id=label4 title=command-facet-Label>Label</dfn>
<dd>The name of the command as seen by the user.
@@ -30742,7 +30777,7 @@
-->
readonly attribute DOMString <a href="#commandtype" title=dom-command-ro-commandType>commandType</a>;
readonly attribute DOMString <a href="#id2" title=dom-command-ro-id>id</a>;
- readonly attribute DOMString <a href="#label4" title=dom-command-ro-label>label</a>;
+ readonly attribute DOMString <a href="#label5" title=dom-command-ro-label>label</a>;
readonly attribute DOMString <a href="#title7" title=dom-command-ro-title>title</a>;
readonly attribute DOMString <a href="#icon2" title=dom-command-ro-icon>icon</a>;
readonly attribute boolean <a href="#hidden0" title=dom-command-ro-hidden>hidden</a>;
@@ -30780,10 +30815,10 @@
by the <code title=dom-id><a href="#id0">id</a></code> DOM attribute on
the <code><a href="#htmlelement">HTMLElement</a></code> interface.
- <p>The <dfn id=label4 title=dom-command-ro-label><code>label</code></dfn>
- attribute must return the command's <a href="#label3"
+ <p>The <dfn id=label5 title=dom-command-ro-label><code>label</code></dfn>
+ attribute must return the command's <a href="#label4"
title=command-facet-Label>Label</a>, or null if the element does not
- define a command or does not specify a <a href="#label3"
+ define a command or does not specify a <a href="#label4"
title=command-facet-Label>Label</a>. This attribute will be shadowed by
the <code title="">label</code> DOM attribute on <code>option</code> and
<code><a href="#command0">command</a></code> elements.
@@ -30883,7 +30918,7 @@
the element, if the attribute is present and not empty. Otherwise the
command is an <a href="#anonymous">anonymous command</a>.
- <p>The <a href="#label3" title=command-facet-Label>Label</a> of the command
+ <p>The <a href="#label4" title=command-facet-Label>Label</a> of the command
is the string given by the element's <code><a
href="#textcontent">textContent</a></code> DOM attribute.
@@ -30925,7 +30960,7 @@
href="#command1" title=concept-command>defines a command</a>.
<p>The <a href="#type19" title=command-facet-Type>Type</a>, <a href="#id1"
- title=command-facet-ID>ID</a>, <a href="#label3"
+ title=command-facet-ID>ID</a>, <a href="#label4"
title=command-facet-Label>Label</a>, <a href="#hint"
title=command-facet-Hint>Hint</a>, <a href="#icon1"
title=command-facet-Icon>Icon</a>, <a href="#hidden"
@@ -30964,7 +30999,7 @@
the element, if the attribute is present and not empty. Otherwise the
command is an <a href="#anonymous">anonymous command</a>.
- <p>The <a href="#label3" title=command-facet-Label>Label</a> of the command
+ <p>The <a href="#label4" title=command-facet-Label>Label</a> of the command
depends on the Type of the command:
<p>If the <a href="#type19" title=command-facet-Type>Type</a> is "command",
@@ -30974,14 +31009,14 @@
the button itself if the attribute is absent.
<p>Otherwise, the <a href="#type19" title=command-facet-Type>Type</a> is
- "radio" or "checkbox". If the element has a <code>label</code> element
- associated with it, the <code><a
+ "radio" or "checkbox". If the element has a <code><a
+ href="#label">label</a></code> element associated with it, the <code><a
href="#textcontent">textContent</a></code> of the first such element is
- the <a href="#label3" title=command-facet-Label>Label</a> (in DOM terms,
+ the <a href="#label4" title=command-facet-Label>Label</a> (in DOM terms,
this the string given by <code><var
title="">element</var>.labels[0].textContent</code>). Otherwise, the value
- of the <code>value</code> attribute, if present, is the <a href="#label3"
- title=command-facet-Label>Label</a>. Otherwise, the <a href="#label3"
+ of the <code>value</code> attribute, if present, is the <a href="#label4"
+ title=command-facet-Label>Label</a>. Otherwise, the <a href="#label4"
title=command-facet-Label>Label</a> is the empty string.
<p>The <a href="#hint" title=command-facet-Hint>Hint</a> of the command is
@@ -31039,7 +31074,7 @@
the element, if the attribute is present and not empty. Otherwise the
command is an <a href="#anonymous">anonymous command</a>.
- <p>The <a href="#label3" title=command-facet-Label>Label</a> of the command
+ <p>The <a href="#label4" title=command-facet-Label>Label</a> of the command
is the value of the <code>option</code> element's <code
title=attr-option-label>label</code> attribute, if there is one, or the
value of the <code>option</code> element's <code><a
@@ -31098,9 +31133,9 @@
the element, if the attribute is present and not empty. Otherwise the
command is an <a href="#anonymous">anonymous command</a>.
- <p>The <a href="#label3" title=command-facet-Label>Label</a> of the command
+ <p>The <a href="#label4" title=command-facet-Label>Label</a> of the command
is the value of the element's <code title=attr-command-label><a
- href="#label">label</a></code> attribute, if there is one, or the empty
+ href="#label0">label</a></code> attribute, if there is one, or the empty
string if it doesn't.
<p>The <a href="#hint" title=command-facet-Hint>Hint</a> of the command is
@@ -31154,7 +31189,7 @@
the element, if the attribute is present and not empty. Otherwise the
command is an <a href="#anonymous">anonymous command</a>.
- <p>The <a href="#label3" title=command-facet-Label>Label</a> of the command
+ <p>The <a href="#label4" title=command-facet-Label>Label</a> of the command
is the string given by the element's <code><a
href="#textcontent">textContent</a></code> DOM attribute, if that is not
the empty string, or a user-agent-defined string appropriate for the
@@ -50859,8 +50894,8 @@
<dt>A start tag whose tag name is one of: "address", "article", "aside",
"blockquote", "center", "datagrid", "details", "dialog", "dir", "div",
- "dl", "fieldset", "figure", "footer", "h1", "h2", "h3", "h4", "h5", "h6",
- "header", "menu", "nav", "ol", "p", "section", "ul"
+ "dl", "figure", "footer", "h1", "h2", "h3", "h4", "h5", "h6", "header",
+ "menu", "nav", "ol", "p", "section", "ul"
<dd> <!-- As of May 2008 this doesn't match any browser exactly, but is
as close to what IE does as I can get without doing the non-tree
@@ -50923,6 +50958,24 @@
the <code title=form><a href="#form">form</a></code> element pointer to
point to the element created.</p>
</dd>
+ <!-- as normal, but associated with the form element pointer -->
+
+ <dt>A start tag whose tag name is "fieldset"
+
+ <dd>
+ <p>If the <a href="#stack">stack of open elements</a> <a href="#have-an"
+ title="has an element in scope">has a <code>p</code> element in
+ scope</a>, then act as if an end tag with the tag name "p" had been
+ seen.</p>
+
+ <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
+
+ <p>If the <a href="#form-element"><code title="">form</code> element
+ pointer</a> is not null, then <span>associate</span><!--XXX xref! -->
+ the newly created <code><a href="#fieldset">fieldset</a></code> element
+ with the <code><a href="#form">form</a></code> element pointed to by the
+ <a href="#form-element"><code title="">form</code> element pointer</a>.</p>
+ </dd>
<!-- as normal, but imply </li> when there's another <li> open in weird cases -->
<dt>A start tag whose tag name is "li"
@@ -51583,6 +51636,20 @@
the <code><a href="#form">form</a></code> element pointed to by the <a
href="#form-element"><code title="">form</code> element pointer</a>.</p>
+ <dt>A start tag whose tag name is "input"
+
+ <dd>
+ <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
+ if any.</p>
+
+ <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
+
+ <p>If the <a href="#form-element"><code title="">form</code> element
+ pointer</a> is not null, then <span>associate</span><!--XXX xref! -->
+ the newly created <code><a href="#label">label</a></code> element with
+ the <code><a href="#form">form</a></code> element pointed to by the <a
+ href="#form-element"><code title="">form</code> element pointer</a>.</p>
+
<dt id=isindex>A start tag whose tag name is "isindex"
<dd>
Modified: source
===================================================================
--- source 2008-09-03 11:05:36 UTC (rev 2145)
+++ source 2008-09-03 20:43:09 UTC (rev 2146)
@@ -24102,8 +24102,32 @@
<p class="big-issue">...</p>
- <h4>The <code>label</code> element</h4>
+ <h4>The <dfn><code>label</code></dfn> element</h4>
+ <dl class="element">
+ <dt>Categories</dt>
+ <dd><span>Phrasing content</span>.</dd>
+ <dd><span>Interactive content</span>.</dd>
+ <dt>Contexts in which this element may be used:</dt>
+ <dd>Where <span>phrasing content</span> is expected.</dd>
+ <dt>Content model:</dt>
+ <dd><span>Phrasing content</span>.</dd>
+ <dt>Element-specific attributes:</dt>
+ <dd><code title="attr-label-form">form</code></dd>
+ <dd><code title="attr-label-for">for</code></dd>
+ <dt>DOM interface:</dt>
+ <dd>
+<pre class="idl">interface <dfn>HTMLLabelElement</dfn> : <span>HTMLElement</span> {
+ readonly attribute HTMLFormElement <span title="dom-label-form">form</span>;
+ attribute DOMString <span title="dom-label-htmlFor">htmlFor</span>;
+ readonly attribute <span>HTMLElement</span> <span title="dom-label-control">control</span>;
+};</pre>
+ </dd>
+ </dl>
+
+ <p class="big-issue">...</p>
+
+
<h4>The <code>select</code> element</h4>
<h4>The <code>datalist</code> element</h4>
@@ -47589,9 +47613,9 @@
<!-- the normal ones -->
<dt>A start tag whose tag name is one of: "address", "article",
"aside", "blockquote", "center", "datagrid", "details", "dialog",
- "dir", "div", "dl", "fieldset", "figure", "footer", "h1", "h2",
- "h3", "h4", "h5", "h6", "header", "menu", "nav", "ol", "p",
- "section", "ul"</dt>
+ "dir", "div", "dl", "figure", "footer", "h1", "h2", "h3", "h4",
+ "h5", "h6", "header", "menu", "nav", "ol", "p", "section",
+ "ul"</dt>
<dd>
<!-- As of May 2008 this doesn't match any browser exactly, but is
@@ -47660,6 +47684,25 @@
</dd>
+ <!-- as normal, but associated with the form element pointer -->
+ <dt>A start tag whose tag name is "fieldset"</dt>
+ <dd>
+
+ <p>If the <span>stack of open elements</span> <span title="has
+ an element in scope">has a <code>p</code> element in
+ scope</span>, then act as if an end tag with the tag name
+ "p" had been seen.</p>
+
+ <p><span>Insert an HTML element</span> for the token.</p>
+
+ <p>If the <span><code title="">form</code> element pointer</span>
+ is not null, then <span>associate</span><!--XXX xref! --> the
+ newly created <code>fieldset</code> element with the
+ <code>form</code> element pointed to by the <span><code
+ title="">form</code> element pointer</span>.</p>
+
+ </dd>
+
<!-- as normal, but imply </li> when there's another <li> open in weird cases -->
<dt>A start tag whose tag name is "li"</dt>
<dd>
@@ -48353,6 +48396,22 @@
</dd>
+ <dt>A start tag whose tag name is "input"</dt>
+ <dd>
+
+ <p><span>Reconstruct the active formatting elements</span>, if
+ any.</p>
+
+ <p><span>Insert an HTML element</span> for the token.</p>
+
+ <p>If the <span><code title="">form</code> element pointer</span>
+ is not null, then <span>associate</span><!--XXX xref! --> the
+ newly created <code>label</code> element with the
+ <code>form</code> element pointed to by the <span><code
+ title="">form</code> element pointer</span>.</p>
+
+ </dd>
+
<dt id="isindex">A start tag whose tag name is "isindex"</dt>
<dd>
More information about the Commit-Watchers
mailing list