Skip to content
Permalink
Browse files

[giow] (2) WF2: Change <legend> to be treated more like <option> than…

… like a fully-fledged form-associatd element. Simpler to implement.

git-svn-id: http://svn.whatwg.org/webapps@2528 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Dec 3, 2008
1 parent 1952b01 commit dc38c1bc3af5bab59b053a876c340dffa04d9212
Showing with 34 additions and 31 deletions.
  1. +17 −16 index
  2. +17 −15 source
33 index
@@ -17,7 +17,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
<h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 2 December 2008</h2>
<h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 3 December 2008</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
elements</a> can be, depending on their attributes, <dfn id=concept-button title=concept-button>buttons</dfn>. The prose below defines when
an element is a button. Some buttons are specifically <dfn id=concept-submit-button title=concept-submit-button>submit buttons</dfn>.</p>

<p class=note>The <code><a href=#the-object-element>object</a></code> amd <code><a href=#the-legend-element>legend</a></code>
elements are also <a href=#form-associated-element title="form-associated
element">form-associated elements</a>. With the use of a suitable
<a href=#plugin>plugin</a>, the <code><a href=#the-object-element>object</a></code> element can even
partake in form submission.</p>
<p class=note>The <code><a href=#the-object-element>object</a></code> element is also a
<a href=#form-associated-element>form-associated element</a> and can, with the use of a
suitable <a href=#plugin>plugin</a>, partake in form submission.</p>


<h4 id=the-form-element><span class=secno>4.10.1 </span>The <dfn><code>form</code></dfn> element</h4>
or has a <code><a href=#the-colgroup-element>colgroup</a></code> element as its parent and that
<code><a href=#the-colgroup-element>colgroup</a></code> element has a <code><a href=#the-select-element>select</a></code> element as
its parent, then the <code title=dom-option-form><a href=#dom-option-form>form</a></code> DOM
attribute must return the same value as the <code title=dom-select-form>form</code> DOM attribute on that
attribute must return the same value as the <code title=dom-fae-form><a href=#dom-fae-form>form</a></code> DOM attribute on that
<code><a href=#the-select-element>select</a></code> element. Otherwise, it must return null.</p>

<p>Several constructors are provided for creating
<h4 id=the-legend-element><span class=secno>4.12.1 </span>The <dfn><code>legend</code></dfn> element</h4>

<dl class=element><dt>Categories</dt>
<dd><a href=#form-associated-element>Form-associated element</a>.</dd>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As the first child of a <code><a href=#the-fieldset-element>fieldset</a></code> element.</dd>
<dd>As the first child of a <code><a href=#the-details-element>details</a></code> element.</dd>
<dd>As a child of a <code><a href=#the-figure-element>figure</a></code> element, if there are no other <code><a href=#the-legend-element>legend</a></code> element children of that element.</dd>
<dt>Content model:</dt>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Element-specific attributes:</dt>
<dd><code title=attr-fae-form><a href=#attr-fae-form>form</a></code></dd>
<dd>None.</dd>
<dt>DOM interface:</dt>
<dd>
<pre class=idl>interface <dfn id=htmllegendelement>HTMLLegendElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <a href=#dom-fae-form title=dom-fae-form>form</a>;
<pre class=idl>interface <dfn id=htmllegendelement>HTMLLegendElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <a href=#dom-legend-form title=dom-legend-form>form</a>;
};</pre>
</dd>
</dd>
</dl><p>The <code><a href=#the-legend-element>legend</a></code> element represents a title or explanatory
caption for the rest of the contents of the <code><a href=#the-legend-element>legend</a></code>
element's parent element.</p>

<p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
explicitly associate the <code><a href=#the-label-element>label</a></code> element with its
<a href=#form-owner>form owner</a>.</p>

<p>The <dfn id=dom-legend-form title=dom-legend-form><code>form</code></dfn> DOM
attribute's behavior depends on whether the <code><a href=#the-legend-element>legend</a></code>
element is in a <code><a href=#the-fieldset-element>fieldset</a></code> element or not. If the
<code><a href=#the-legend-element>legend</a></code> has a <code><a href=#the-fieldset-element>fieldset</a></code> element as its
parent, then the <code title=dom-legend-form><a href=#dom-legend-form>form</a></code> DOM
attribute must return the same value as the <code title=dom-fae-form><a href=#dom-fae-form>form</a></code> DOM attribute on that
<code><a href=#the-fieldset-element>fieldset</a></code> element. Otherwise, it must return null.</p>


<h4 id=the-div-element><span class=secno>4.12.2 </span>The <dfn><code>div</code></dfn> element</h4>
32 source
an element is a button. Some buttons are specifically <dfn
title="concept-submit-button">submit buttons</dfn>.</p>

<p class="note">The <code>object</code> amd <code>legend</code>
elements are also <span title="form-associated
element">form-associated elements</span>. With the use of a suitable
<span>plugin</span>, the <code>object</code> element can even
partake in form submission.</p>
<p class="note">The <code>object</code> element is also a
<span>form-associated element</span> and can, with the use of a
suitable <span>plugin</span>, partake in form submission.</p>


<h4>The <dfn><code>form</code></dfn> element</h4>
<code>colgroup</code> element has a <code>select</code> element as
its parent, then the <code title="dom-option-form">form</code> DOM
attribute must return the same value as the <code
title="dom-select-form">form</code> DOM attribute on that
title="dom-fae-form">form</code> DOM attribute on that
<code>select</code> element. Otherwise, it must return null.</p>

<p>Several constructors are provided for creating

<dl class="element">
<dt>Categories</dt>
<dd><span>Form-associated element</span>.</dd>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As the first child of a <code>fieldset</code> element.</dd>
<dd>As the first child of a <code>details</code> element.</dd>
<dd>As a child of a <code>figure</code> element, if there are no other <code>legend</code> element children of that element.</dd>
<dt>Content model:</dt>
<dd><span>Phrasing content</span>.</dd>
<dt>Element-specific attributes:</dt>
<dd><code title="attr-fae-form">form</code></dd>
<dd>None.</dd>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">interface <dfn>HTMLLegendElement</dfn> : <span>HTMLElement</span> {
readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
<pre class="idl">interface <dfn>HTMLLegendElement</dfn> : <span>HTMLElement</span> {
readonly attribute <span>HTMLFormElement</span> <span title="dom-legend-form">form</span>;
};</pre>
</dd>
</dd>
</dl>

<p>The <code>legend</code> element represents a title or explanatory
caption for the rest of the contents of the <code>legend</code>
element's parent element.</p>

<p>The <code title="attr-fae-form">form</code> attribute is used to
explicitly associate the <code>label</code> element with its
<span>form owner</span>.</p>

<p>The <dfn title="dom-legend-form"><code>form</code></dfn> DOM
attribute's behavior depends on whether the <code>legend</code>
element is in a <code>fieldset</code> element or not. If the
<code>legend</code> has a <code>fieldset</code> element as its
parent, then the <code title="dom-legend-form">form</code> DOM
attribute must return the same value as the <code
title="dom-fae-form">form</code> DOM attribute on that
<code>fieldset</code> element. Otherwise, it must return null.</p>


<h4>The <dfn><code>div</code></dfn> element</h4>

0 comments on commit dc38c1b

Please sign in to comment.
You can’t perform that action at this time.