W3C home > Mailing lists > Public > public-html-commits@w3.org > October 2008

html5/spec Overview.html,1.1470,1.1471

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 08 Oct 2008 00:08:19 +0000
To: public-html-commits@w3.org
Message-Id: <E1KnMbD-0003R0-Ah@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv13188

Modified Files:
	Overview.html 
Log Message:
WF2: <option> (whatwg r2298)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1470
retrieving revision 1.1471
diff -u -d -r1.1470 -r1.1471
--- Overview.html	7 Oct 2008 23:05:15 -0000	1.1470
+++ Overview.html	8 Oct 2008 00:08:16 -0000	1.1471
@@ -8,7 +8,7 @@
    <p><a href=http://www.w3.org/><img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72></a></p>
    <h1>HTML 5</h1>
    <h2 class="no-num no-toc" id=a-vocabulary-and-associated-apis-for-html-and-xhtml>A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->7 October 2008</h2>
+   <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->8 October 2008</h2>
    <dl><!-- ZZZ: update the month/day
     <dt>This Version:</dt>
     <dd><a href="http://www.w3.org/TR/2008/WD-html5-20080609/">http://www.w3.org/TR/2008/WD-html5-20080609/</a></dd>
@@ -100,7 +100,7 @@
   specification's progress along the W3C Recommendation
   track.
   <!--ZZZ:-->
-  This specification is the 7 October 2008 <!--ZZZ "Working Draft"-->Editor's Draft.
+  This specification is the 8 October 2008 <!--ZZZ "Working Draft"-->Editor's Draft.
   <!--:ZZZ-->
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href=http://www.whatwg.org/>WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -21227,12 +21227,25 @@
   any other mechanism), and before the relevant user interaction event
   is queued (e.g. before the <span title=event-click>click</span>
   event), the user agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the
-  picked <code><a href=#the-option-element>option</a></code> element to true, set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of all the
-  other <code><a href=#the-option-element>option</a></code> element in its <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> to false,
-  and then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
-  event</a> called <code title=event-change>change</code> at the
-  <code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task
-  source</a> as the task source.<p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
+  picked <code><a href=#the-option-element>option</a></code> element to true and then <a href=#queue-a-task>queue a
+  task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-change>change</code> at the <code><a href=#the-select-element>select</a></code>
+  element, using the <a href=#user-interaction-task-source>user interaction task source</a> as the
+  task source.<p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
+  attribute is absent, whenever an <code><a href=#the-option-element>option</a></code> element in the
+  <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> has its
+  <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to
+  true, and whenever an <code><a href=#the-option-element>option</a></code> element with its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true
+  is added to the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, the user
+  agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of all the
+  other <code><a href=#the-option-element>option</a></code> element in its <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> to
+  false.<p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
+  attribute is absent, whenever there are no <code><a href=#the-option-element>option</a></code>
+  elements in the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that have
+  their <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a>
+  set to true, the user agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the first
+  <code><a href=#the-option-element>option</a></code> element in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> in
+  <a href=#tree-order>tree order</a> that is not <a href=#concept-option-disabled title=concept-option-disabled>disabled</a>, if any, to
+  true.<p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
   attribute is present, and the element is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>, then the user agent
   should allow the user to toggle the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the
   <code><a href=#the-option-element>option</a></code> elements in its <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that are
@@ -21243,7 +21256,12 @@
   agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
   event</a> called <code title=event-change>change</code> at the
   <code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task
-  source</a> as the task source.<p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
+  source</a> as the task source.<p>The <a href=#concept-form-reset-control title=concept-form-reset-control>reset
+  algorithm</a> for <code><a href=#the-select-element>select</a></code> elements is to go through
+  all the <code><a href=#the-option-element>option</a></code> elements in the element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, and set
+  their <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a>
+  to true if the <code><a href=#the-option-element>option</a></code> element has a <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> attribute, and false
+  otherwise.<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-select-element>select</a></code> element with its
   <a href=#form-owner>form owner</a>. The <code title=attr-fe-name><a href=#attr-fe-name>name</a></code>
   attribute represents the element's name. The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make
@@ -21362,28 +21380,63 @@
    <dt>Content model:</dt>
    <dd>Text.</dd>
    <dt>Element-specific attributes:</dt>
-   <dd><code title=attr-option-disabled>disabled</code></dd>
-   <dd><code title=attr-option-label>label</code></dd>
-   <dd><code title=attr-option-selected>selected</code></dd>
-   <dd><code title=attr-option-value>value</code></dd>
+   <dd><code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code></dd>
+   <dd><code title=attr-option-label><a href=#attr-option-label>label</a></code></dd>
+   <dd><code title=attr-option-selected><a href=#attr-option-selected>selected</a></code></dd>
+   <dd><code title=attr-option-value><a href=#attr-option-value>value</a></code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class=idl>[<a href=#dom-option title=dom-option>Constructor</a>(),
  <a href=#dom-option-n title=dom-option-n>Constructor</a>(in DOMString name),
  <a href=#dom-option-nv title=dom-option-nv>Constructor</a>(in DOMString name, in DOMString value)]
 interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
-           attribute boolean <span title=dom-option-disabled>disabled</span>;
+           attribute boolean <a href=#dom-option-disabled title=dom-option-disabled>disabled</a>;
   readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <span title=dom-option-form>form</span>;
-           attribute DOMString <span title=dom-option-label>label</span>;
-           attribute boolean <span title=dom-option-defaultSelected>defaultSelected</span>;
-           attribute boolean <span title=dom-option-selected>selected</span>;
-           attribute DOMString <a href=#dom-input-value title=dom-input-value>value</a>;
+           attribute DOMString <a href=#dom-option-label title=dom-option-label>label</a>;
+           attribute boolean <a href=#dom-option-defaultselected title=dom-option-defaultSelected>defaultSelected</a>;
+           attribute boolean <a href=#dom-option-selected title=dom-option-selected>selected</a>;
+           attribute DOMString <a href=#dom-option-value title=dom-option-value>value</a>;
 
-  readonly attribute DOMString <span title=dom-option-text>text</span>;
-  readonly attribute long <span title=dom-option-index>index</span>;
+  readonly attribute DOMString <a href=#dom-option-text title=dom-option-text>text</a>;
+  readonly attribute long <a href=#dom-option-index title=dom-option-index>index</a>;
 };</pre>
    </dd> 
-  </dl><p class=XXX>...<p class=XXX>... <dfn id=concept-option-selectedness title=concept-option-selectedness>selectedness</dfn><p class=XXX>... <dfn id=concept-option-value title=concept-option-value>value</dfn><p class=XXX>... <dfn id=concept-option-label title=concept-option-label>label</dfn><p class=XXX>... <dfn id=concept-option-disabled title=concept-option-disabled>disabled</dfn><p class=XXX>... <dfn id=concept-option-index title=concept-option-index>index</dfn><p class=XXX>
+  </dl><p>The <code><a href=#the-option-element>option</a></code> element represents an option in a
+  <code><a href=#the-select-element>select</a></code> element or as part of a list of suggestions in a
+  <code><a href=#the-datalist-element>datalist</a></code> element.<p>The <dfn id=attr-option-disabled title=attr-option-disabled><code>disabled</code></dfn>
+  attribute is a <a href=#boolean-attribute>boolean attribute</a>.<p>An <code><a href=#the-option-element>option</a></code> element is <dfn id=concept-option-disabled title=concept-option-disabled>disabled</dfn> if its <code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code> is present or if it is
+  a child of an <code><a href=#the-optgroup-element>optgroup</a></code> element whose <code title=attr-optgroup-disabled><a href=#attr-optgroup-disabled>disabled</a></code> attribute is
+  present.<p>The <dfn id=attr-option-label title=attr-option-label><code>label</code></dfn>
+  attribute provides a label for element. The <dfn id=concept-option-label title=concept-option-label>label</dfn> of an <code><a href=#the-option-element>option</a></code>
+  element is the value of the <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute, if there is one,
+  or the <code><a href=#textcontent>textContent</a></code> of the element, if there isn't.<p>The <dfn id=attr-option-value title=attr-option-value><code>value</code></dfn>
+  attribute provides a value for element. The <dfn id=concept-option-value title=concept-option-value>value</dfn> of an <code><a href=#the-option-element>option</a></code>
+  element is the value of the <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute, if there is one,
+  or the <code><a href=#textcontent>textContent</a></code> of the element, if there isn't.<p>The <dfn id=attr-option-selected title=attr-option-selected><code>selected</code></dfn>
+  attribute represents the default <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the
+  element.<p>The <dfn id=concept-option-selectedness title=concept-option-selectedness>selectedness</dfn>
+  of an <code><a href=#the-option-element>option</a></code> element is a boolean state, initially
+  false. If the element is <a href=#concept-option-disabled title=concept-option-disabled>disabled</a>, then the element's
+  <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is
+  always false and cannot be set to true. When the element is created,
+  its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a>
+  must be set to true if the element has a <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> attribute. Whenever an
+  <code><a href=#the-option-element>option</a></code> element's <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> attribute is added, its
+  <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> must
+  be set to true.<p>An <code><a href=#the-option-element>option</a></code> element's <dfn id=concept-option-index title=concept-option-index>index</dfn> is the number of
+  <code><a href=#the-option-element>option</a></code> element that are in the same <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> but that
+  come before it in <a href=#tree-order>tree order</a>. If the
+  <code><a href=#the-option-element>option</a></code> element is not in a <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, then the
+  <code><a href=#the-option-element>option</a></code> element's <a href=#concept-option-index title=concept-option-index>index</a> is zero.<p>The <dfn id=dom-option-disabled title=dom-option-disabled><code>disabled</code></dfn>,
+  <dfn id=dom-option-label title=dom-option-label><code>label</code></dfn>, and <dfn id=dom-option-value title=dom-option-value><code>value</code></dfn> DOM attributes
+  must <a href=#reflect>reflect</a> the respective content attributes of the
+  same name. The <dfn id=dom-option-defaultselected title=dom-option-defaultSelected><code>defaultSelected</code></dfn>
+  DOM attribute must <a href=#reflect>reflect</a> the <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> content attribute.<p>The <dfn id=dom-option-selected title=dom-option-selected><code>selected</code></dfn>
+  DOM attribute must return true if the element's <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is true, and
+  false otherwise.<p>The <dfn id=dom-option-index title=dom-option-index><code>index</code></dfn> DOM
+  attribute must return the lement's <a href=#concept-option-index title=concept-option-index>index</a>.<p>The <dfn id=dom-option-text title=dom-option-text><code>text</code></dfn> DOM
+  attribute must return the same value as the <code><a href=#textcontent>textContent</a></code>
+  DOM attribute on the element.<p class=XXX>
    <dfn id=dom-option title=dom-option><code>Option()</code></dfn>
    <dfn id=dom-option-n title=dom-option-n><code>Option(<var title="">name</var>)</code></dfn>
    <dfn id=dom-option-nv title=dom-option-nv><code>Option(<var title="">name</var>, <var title="">value</var>)</code></dfn>
@@ -22809,7 +22862,7 @@
     </ul><p>The <code title=dom-provider-getCellData><a href=#dom-provider-getcelldata>getCellData(<var title="">row</var>, <var title="">cell</var>)</a></code> method must
     return the value of the <code title=attr-optgroup-label><a href=#attr-optgroup-label>label</a></code> attribute if the <var title="">row</var>'s corresponding element is an
     <code><a href=#the-optgroup-element>optgroup</a></code> element, otherwise, if the <var title="">row</var>'s corresponding element is an
-    <code><a href=#the-option-element>option</a></code>element, its <code title=attr-option-label>label</code> attribute if it has one,
+    <code><a href=#the-option-element>option</a></code>element, its <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute if it has one,
     otherwise the value of its <code><a href=#textcontent>textContent</a></code> DOM
     attribute.</p>
 
@@ -22985,7 +23038,7 @@
 
     <p>The <code title=dom-provider-getCellData><a href=#dom-provider-getcelldata>getCellData()</a></code>
     method must return the <code><a href=#textcontent>textContent</a></code> of the current
-    <code><a href=#the-option-element>option</a></code> element (the <code title=attr-option-label>label</code> attribute is <a href=#ignore title=ignore>ignored</a> in this context as the
+    <code><a href=#the-option-element>option</a></code> element (the <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute is <a href=#ignore title=ignore>ignored</a> in this context as the
     <code><a href=#the-optgroup-element>optgroup</a></code>s are not displayed).</p>
 
     <p>The <code title=dom-provider-getCellClasses><a href=#dom-provider-getcellclasses>getCellClasses()</a></code> method
@@ -24003,8 +24056,8 @@
 
 
    <dt>An <code><a href=#the-hr-element>hr</a></code> element</dt>
-   <dt>An <code><a href=#the-option-element>option</a></code> element that has a <code title=attr-option-value>value</code> attribute set to the empty
-   string, and has a <code title=attr-option-disabled>disabled</code> attribute, and whose
+   <dt>An <code><a href=#the-option-element>option</a></code> element that has a <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute set to the empty
+   string, and has a <code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code> attribute, and whose
    <code><a href=#textcontent>textContent</a></code> consists of a string of one or more
    hyphens (U+002D HYPHEN-MINUS)</dt>
 
@@ -24263,7 +24316,7 @@
   <span>UA-dependent value</span><!-- XXX xref--> that the UA uses to
   label the button itself if the attribute is absent.<p>Otherwise, the <a href=#command-facet-type title=command-facet-Type>Type</a> is
   "radio" or "checkbox". If the element is a <a href=#labeled-control>labeled
-  control</a>, the <code title="">textContent</code> of the first
+  control</a>, the <code><a href=#textcontent>textContent</a></code> of the first
   <code><a href=#the-label-element>label</a></code> element in <a href=#tree-order>tree order</a> whose
   <a href=#labeled-control>labeled control</a> is the element in question is the <a href=#command-facet-label title=command-facet-Label>Label</a> (in DOM terms, this the
   string given by <code><var title="">element</var>.labels[0].textContent</code>).  Otherwise,
@@ -24284,7 +24337,7 @@
   command is to <a href=#fire-a-click-event title="fire a click event">fire a <code title="">click</code> event</a> at the element.</p><!-- XXX this
   is probably wrong for radio and checkbox types, depending on how we
   define <input>. --><h5 id=using-the-option-element-to-define-a-command><span class=secno>4.11.6.4 </span><dfn title=option-command>Using the <code>option</code> element to define a command</dfn></h5><p>An <code><a href=#the-option-element>option</a></code> element with an ancestor
-  <code><a href=#the-select-element>select</a></code> element and either no <code title=attr-option-value>value</code> attribute or a <code title=attr-option-value>value</code> attribute that is not the
+  <code><a href=#the-select-element>select</a></code> element and either no <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute or a <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute that is not the
   empty string <a href=#concept-command title=concept-command>defines a
   command</a>.<p>The <a href=#command-facet-type title=command-facet-Type>Type</a> of the command
   is "radio" if the <code><a href=#the-option-element>option</a></code>'s nearest ancestor
@@ -24293,7 +24346,7 @@
   the value of the <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute of the
   element, if the attribute is present and not empty. Otherwise the
   command is an <a href=#anonymous-command>anonymous command</a>.<p>The <a href=#command-facet-label title=command-facet-Label>Label</a> of the command
-  is the value of the <code><a href=#the-option-element>option</a></code> element's <code title=attr-option-label>label</code> attribute, if there is one,
+  is the value of the <code><a href=#the-option-element>option</a></code> element's <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute, if there is one,
   or the value of the <code><a href=#the-option-element>option</a></code> element's
   <code><a href=#textcontent>textContent</a></code> DOM attribute if it doesn't.<p>The <a href=#command-facet-hint title=command-facet-Hint>Hint</a> of the command
   is the string given by the element's <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute, if any, and the empty
@@ -24302,14 +24355,14 @@
   of the command is true (hidden) if the element has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute, and false
   otherwise.<p>The <a href=#command-facet-disabledstate title=command-facet-DisabledState>Disabled
   State</a> of the command is true (disabled) if the element has a
-  <code title=attr-option-disabled>disabled</code> attribute, and
+  <code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code> attribute, and
   false otherwise.<p>The <a href=#command-facet-checkedstate title=command-facet-CheckedState>Checked State</a>
-  of the command is true (checked) if the element's <code title=dom-option-selected>selected</code> DOM attribute is true,
+  of the command is true (checked) if the element's <code title=dom-option-selected><a href=#dom-option-selected>selected</a></code> DOM attribute is true,
   and false otherwise.<p>The <a href=#command-facet-action title=command-facet-Action>Action</a> of the
   command depends on its <a href=#command-facet-type title=command-facet-Type>Type</a>. If the command is of <a href=#command-facet-type title=command-facet-Type>Type</a> "radio" then this must set
-  the <code title=dom-option-selected>selected</code> DOM attribute
+  the <code title=dom-option-selected><a href=#dom-option-selected>selected</a></code> DOM attribute
   of the <code><a href=#the-option-element>option</a></code> element to true, otherwise it must toggle
-  the state of the <code title=dom-option-selected>selected</code>
+  the state of the <code title=dom-option-selected><a href=#dom-option-selected>selected</a></code>
   DOM attribute (set it to true if it is false and vice versa). Then
   <a href=#fire-a-change-event title="fire a change event">a <code title="">change</code>
   event must be fired</a> on the <code><a href=#the-option-element>option</a></code> element's
@@ -31388,8 +31441,8 @@
    updating the <code title=dom-input-defaultValue><a href=#dom-input-defaultvalue>defaultValue</a></code> DOM attribute as
    well as the <code title=dom-input-value><a href=#dom-input-value>value</a></code> DOM
    attribute; for <code><a href=#the-select-element>select</a></code> elements it means updating the
-   <code><a href=#the-option-element>option</a></code> elements' <code title=dom-option-defaultSelected>defaultSelected</code> DOM
-   attribute as well as the <code title=dom-option-selected>selected</code> DOM attribute; for
+   <code><a href=#the-option-element>option</a></code> elements' <code title=dom-option-defaultSelected><a href=#dom-option-defaultselected>defaultSelected</a></code> DOM
+   attribute as well as the <code title=dom-option-selected><a href=#dom-option-selected>selected</a></code> DOM attribute; for
    <code><a href=#the-textarea-element>textarea</a></code> elements this means updating the <code title=dom-textarea-defaultValue>defaultValue</code> DOM attribute
    as well as the <code title=dom-textarea-value>value</code> DOM
    attribute. (Updating the <code title="">default*</code> DOM
Received on Wednesday, 8 October 2008 00:08:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 9 October 2008 20:33:00 GMT