spec/Overview.html 1.1445 2272 WF2: Revamp of activation behavior defin

WF2: Revamp of activation behavior definitions and related details.
(whatwg r2272)

The rules for handling alternative style sheets are defined in the CSS object model specification. [CSSOM]
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#alternate-style-sheets
labels
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#dom-lfe-labels
for
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#attr-label-for
rectangle state
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#attr-area-shape-rect
4.10.4 The input element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#the-input-element
run canceled activation steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#run-canceled-activation-steps
HTMLAnchorElement
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#htmlanchorelement
control
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#dom-label-control
nearest activatable element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#nearest-activatable-element
relList
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#dom-a-rellist
htmlFor
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#dom-label-htmlfor
pre-click activation steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#pre-click-activation-steps
hyperlink suffix
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#hyperlink-suffix
href
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#dom-a-href
3.4.1.7 Interactive content
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#interactive-content
canceled activation steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#canceled-activation-steps
Interactive content
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#interactive-content-0
2.2.3 Common conformance requirements for APIs exposed to JavaScript
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#common-conformance-requirements-for-apis-exposed-to-javascript
shape
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#dom-area-shape
run final activation steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#run-final-activation-steps
6.3 Activation
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#activation
textContent
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#textcontent
3.4.2 Transparent content models
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#transparent-content-models
alt
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#dom-area-alt
activation behavior
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#activation-behavior
6.4 Scrolling elements into view
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#scrolling-elements-into-view
run pre-click activation steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#run-pre-click-activation-steps
semi-transparent
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#semi-transparent
Status of this document
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#status-of-this-document
A vocabulary and associated APIs for HTML and XHTML
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#a-vocabulary-and-associated-apis-for-html-and-xhtml
fallback content
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#fallback-content
run synthetic click activation steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#run-synthetic-click-activation-steps
run post-click activation steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#run-post-click-activation-steps
DOMTimeStamp
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#domtimestamp
Editor's Draft 3 October 2008
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#editor-s-draft-date-zzz-9-june-2008
hidden
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1445.html#dom-hidden

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1444&r2=1.1445&f=h
http://html5.org/tools/web-apps-tracker?from=2271&to=2272

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1444
retrieving revision 1.1445
diff -u -d -r1.1444 -r1.1445
--- Overview.html 2 Oct 2008 22:37:30 -0000 1.1444
+++ Overview.html 3 Oct 2008 01:08:40 -0000 1.1445
@@ -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-->2 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-->3 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 2 October 2008 <!--ZZZ "Working Draft"-->Editor's Draft.
+  This specification is the 3 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)
@@ -1540,10 +1540,7 @@
   event-DOMActivate, etc, here, once DOM3 Events is ready for that,
   and just have the section be a general "defined in other
   specifications" section --><p>The interface <dfn id=domtimestamp><code>DOMTimeStamp</code></dfn> is defined in
-  DOM3 Core. <a href=#references>[DOM3CORE]</a><p>The term <dfn id=activation-behavior>activation behavior</dfn> is used as defined in the
-  DOM3 Events specification. <a href=#references>[DOM3EVENTS]</a> <span class=XXX>At
-  the time of writing, DOM3 Events hadn't yet been updated to define
-  that phrase.</span><p id=alternate-style-sheets>The rules for handling alternative
+  DOM3 Core. <a href=#references>[DOM3CORE]</a><p id=alternate-style-sheets>The rules for handling alternative
   style sheets are defined in the CSS object model specification. <a href=#references>[CSSOM]</a><p class=XXX>See <a href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?content-type=text/html;%20charset=utf-8">http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?content-type=text/html;%20charset=utf-8</a></p><!--XXX empty title attribute is equivalent to missing attribute for
   purposes of alternate style sheet processing --><h4 id=common-conformance-requirements-for-apis-exposed-to-javascript><span class=secno>2.2.3 </span>Common conformance requirements for APIs exposed to
   JavaScript</h4><p class=XXX>This section will eventually be removed in favour of WebIDL.<p class=XXX>A lot of arrays/lists/<a href=#collections-0 title=collections>collection</a>s
@@ -5415,39 +5412,81 @@
   defined in this specification. (For example, MathML, or SVG.)<p>Some embedded content elements can have <dfn id=fallback-content>fallback
   content</dfn>: content that is to be used when the external resource
   cannot be used (e.g. because it is of an unsupported format). The
-  element definitions state what the fallback is, if any.<h5 id=interactive-content><span class=secno>3.4.1.7 </span>Interactive content</h5><!-- Don't change the above <dfn> or the text below without checking
-  all cross-references. Some of them refer specifically to the
-  activation behavior stuff. --><p class=XXX>Parts of this section should eventually be
-  moved to DOM3 Events.</p><!-- but see comment above --><!--
+  element definitions state what the fallback is, if any.<h5 id=interactive-content><span class=secno>3.4.1.7 </span>Interactive content</h5><!--
 TESTS:
 http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A%3Cp%20tabindex%3D1%3Etest%20%3Ca%20href%3D%22%22%3E%20%3Cem%3Etest%3C/em%3E%20%3C/a%3E%0A%3Cscript%3E%0A%20function%20test%20%28e%29%20%7B%20w%28e.type%20+%20%27%20on%20%27%20+%20e.target.tagName%20+%20%27%20through%20%27%20+%20e.currentTarget.tagName%29%3B%20%7D%0A%20document.getElementsByTagName%28%27a%27%29%5B0%5D.addEventListener%28%27click%27%2C%20test%2C%20false%29%3B%0A%20document.getElementsByTagName%28%27a%27%29%5B0%5D.addEventListener%28%27DOMActivate%27%2C%20test%2C%20false%29%3B%0A%20document.getElementsByTagName%28%27p%27%29%5B0%5D.addEventListener%28%27click%27%2C%20test%2C%20false%29%3B%0A%20document.getElementsByTagName%28%27p%27%29%5B0%5D.addEventListener%28%27DOMActivate%27%2C%20test%2C%20false%29%3B%0A%3C/script%3E%0A
 http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0A%3Ca%20href%3Dhttp%3A//google.com/%20target%3Da%3EA%3C/a%3E%3Ca%20href%3Dhttp%3A//yahoo.com/%20target%3Db%3EB%3C/a%3E%3Cbr%3E%0A%3Ciframe%20name%3Da%3E%3C/iframe%3E%3Ciframe%20name%3Db%3E%3C/iframe%3E%0A%3Cscript%3E%0A%20var%20a%20%3D%20document.getElementsByTagName%28%27a%27%29%5B0%5D%3B%0A%20var%20b%20%3D%20document.getElementsByTagName%28%27a%27%29%5B1%5D%3B%0A%20a.appendChild%28b%29%3B%0A%3C/script%3E
 http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0A%3Cform%20action%3D%22http%3A//google.com/%22%20onsubmit%3D%22w%28%27onsubmit%27%29%22%3E%3Cem%3EA%3C/em%3E%3C/form%3E%0A%3Cscript%3E%0Adocument.getElementsByTagName%28%27form%27%29%5B0%5D.attachEvent%28%27onsubmit%27%2C%20function%20%28%29%20%7B%20w%28%27submit%20fired%27%29%20%7D%29%3B%0Adocument.getElementsByTagName%28%27form%27%29%5B0%5D.fireEvent%28%27onsubmit%27%29%3B%0A%3C/script%3E
 http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0A%3Cform%20action%3D%22http%3A//google.com/%22%3EX%3C/form%3E%0A%3Cscript%3E%0Avar%20evt%20%3D%20document.createEvent%28%22Events%22%29%3B%0Aevt.initEvent%28%22submit%22%2C%20true%2C%20true%29%3B%0Adocument.getElementsByTagName%28%27form%27%29%5B0%5D.dispatchEvent%28evt%29%3B%0A%3C/script%3E
 --><p><dfn id=interactive-content-0>Interactive content</dfn> is content that is specifically
-  intended for user interaction.<p>Certain elements in HTML can be activated, for instance
-  <code><a href=#the-a-element>a</a></code> elements, <code><a href=#the-button-element>button</a></code> elements, or
-  <code><a href=#the-input-element>input</a></code> elements when their <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state. Activation
-  of those elements can happen in various (UA-defined) ways, for
-  instance via the mouse or keyboard.<p>When activation is performed via some method other than clicking
-  the pointing device, the default action of the event that triggers
-  the activation must, instead of being activating the element
-  directly, be to <a href=#fire-a-click-event>fire a <code title="">click</code>
-  event</a> on the same element.<p>The default action of this <code title=event-click>click</code>
-  event, or of the real <code title=event-click>click</code> event
-  if the element was activated by clicking a pointing device, must be
-  to <span title="fire a DOMActivate event">fire a further <code title=event-DOMActivate>DOMActivate</code> event</span> at the
-  same element, whose own default action is to go through all the
-  elements the <code title=event-DOMActivate>DOMActivate</code>
-  event bubbled through (starting at the target node and going towards
-  the <code>Document</code> node), looking for an element with an
-  <a href=#activation-behavior>activation behavior</a>; the first element, in reverse tree
-  order, to have one, must have its activation behavior executed.<p class=note>The above doesn't happen for arbitrary synthetic
+  intended for user interaction.<p>Certain elements in HTML have an <a href=#activation-behavior>activation
+  behavior</a>, which means the user agent should allow the user to
+  manually trigger them in some way, for instance using keyboard or
+  voice input (though not mouse clicks, which are handled above). When
+  the user triggers an element with a defined <a href=#activation-behavior>activation
+  behavior</a>, the default action of the interaction event<!-- XXX
+  --> must be to <a href=#run-synthetic-click-activation-steps>run synthetic click activation steps</a> on
+  the element.<p>When a user agent is to <dfn id=run-synthetic-click-activation-steps>run synthetic click activation
+  steps</dfn> on an element, the user agent must <a href=#run-pre-click-activation-steps>run pre-click
+  activation steps</a> on the element, then <a href=#fire-a-click-event>fire a <code title=event-click>click</code> event</a> at the element. The
+  default action of this <span title=event-click>click</span> event
+  must be to <a href=#run-post-click-activation-steps>run post-click activation steps</a> on the
+  element. If the event is canceled, the user agent must <a href=#run-canceled-activation-steps>run
+  canceled activation steps</a> on the element instead.<p>Given an element <var title="">target</var>, the <dfn id=nearest-activatable-element>nearest
+  activatable element</dfn> is the element returned by the following
+  algorithm:<ol><li><p>If <var title="">target</var> has a defined <a href=#activation-behavior>activation
+   behavior</a>, then return <var title="">target</var> and abort
+   these steps.</li>
+
+   <li><p>If <var title="">target</var> has a parent element, then set
+   <var title="">target</var> to that parent element and return to the
+   first step.</li>
+
+   <li><p>Otherwise, there is no <a href=#nearest-activatable-element>nearest activatable
+   element</a>.</li>
+
+  </ol><p>When a pointing device is clicked, the user agent must run these
+  steps:<ol><li><p>Let <var title="">e</var> be the <span title="">nearest
+   activatable element</span> of the element designated by the user,
+   if any.</li>
+
+   <li><p>If there is an element <var title="">e</var>, <a href=#run-pre-click-activation-steps>run
+   pre-click activation steps</a> on it.</li>
+
+   <li>
+
+    <p>Dispatching the required <code title=event-click>click</code>
+    event.</p>
+
+    <p class=XXX>Another specification presumably requires the
+    firing of the <span title=event-click>click</span> event?</p>
+
+    <p>If there is an element <var title="">e</var>, then the default
+    action of the <span title=event-click>click</span> event must be
+    to <a href=#run-post-click-activation-steps>run post-click activation steps</a> on element <var title="">e</var>.</p>
+
+    <p>If there is an element <var title="">e</var> but the event is
+    canceled, the user agent must <a href=#run-canceled-activation-steps>run canceled activation
+    steps</a> on element <var title="">e</var>.</p>
+
+   </li>
+
+  </ol><p class=note>The above doesn't happen for arbitrary synthetic
   events dispatched by author script. However, the <code title=dom-click><a href=#dom-click>click()</a></code> method can be used to make it
-  happen programmatically.<p>For certain form controls, this process is complicated further by
-  <a href=http://www.whatwg.org/specs/web-forms/current-work/#the-click>changes
-  that must happen around the click event</a>. <a href=#references>[WF2]</a></p><!-- XXX WF2: when this is merged into
-  this spec, update xrefs --><h4 id=transparent-content-models><span class=secno>3.4.2 </span>Transparent content models</h4><p>Some elements are described as <dfn id=transparent>transparent</dfn>; they have
+  happen programmatically.<p>When a user agent is to <dfn id=run-post-click-activation-steps>run post-click activation
+  steps</dfn> on an element, the user agent must <a href=#fire-a-simple-event>fire a simple
+  event</a> called <code title=event-DOMActivate>DOMActivate</code> at that element. The
+  default action of this event must be to <a href=#run-final-activation-steps>run final activation
+  steps</a> on that element. If the event is canceled, the user
+  agent must <a href=#run-canceled-activation-steps>run canceled activation steps</a> on the element
+  instead.<p>When a user agent is to <dfn id=run-pre-click-activation-steps>run pre-click activation steps</dfn>
+  on an element, it must run the <dfn id=pre-click-activation-steps>pre-click activation steps</dfn>
+  defined for that element, if any.<p>When a user agent is to <dfn id=run-canceled-activation-steps>run canceled activation steps</dfn>
+  on an element, it must run the <dfn id=canceled-activation-steps>canceled activation steps</dfn>
+  defined for that element, if any.<p>When a user agent is to <dfn id=run-final-activation-steps>run final activation steps</dfn> on
+  an element, it must run the <dfn id=activation-behavior>activation behavior</dfn> defined
+  for that element. Activation behaviors can refer to the <code title=event-click>click</code> and <code title=event-DOMActivate>DOMActivate</code> events that were fired
+  by the steps above leading up to this point.<h4 id=transparent-content-models><span class=secno>3.4.2 </span>Transparent content models</h4><p>Some elements are described as <dfn id=transparent>transparent</dfn>; they have
   "transparent" as their content model. Some elements are described as
   <dfn id=semi-transparent>semi-transparent</dfn>; this means that part of their content
   model is "transparent" but that is not the only part of the content
@@ -9296,8 +9335,8 @@
    <code>INVALID_ACCESS_ERR</code> exception and abort these
    steps.</li>
 
-   <li><p>If the target of the <code title=event-DOMActivate>DOMActivate</code> event is an
-   <code><a href=#the-img-element>img</a></code> element with an <code title=attr-img-ismap><a href=#attr-img-ismap>ismap</a></code> attribute specified, then
+   <li><p>If the target of the <code title=event-click>click</code>
+   event is an <code><a href=#the-img-element>img</a></code> element with an <code title=attr-img-ismap><a href=#attr-img-ismap>ismap</a></code> attribute specified, then
    server-side image map processing must be performed, as follows:</p>
 
     <ol><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A...%3Ca%20href%3D%22%23%22%3E%3Cimg%20ismap%20usemap%3D%22%23a%22%20src%3D/resources/images/smallcats%3E%3C/a%3E%0A%3Cmap%20name%3Da%3E%3Carea%20shape%3Drect%20coords%3D0%2C0%2C50%2C50%20href%3Db%3E%3C/map%3E --><li>If the <code title=event-DOMActivate>DOMActivate</code>
@@ -9322,10 +9361,7 @@
    suffix</a></var>, then take that into account when following the
    hyperlink.</li>
 
-  </ol><p class=note>One way that a user agent can enable users to follow
-  hyperlinks is by allowing <code><a href=#the-a-element>a</a></code> elements to be clicked, or
-  focussed and activated by the keyboard. This <a href=#interactive-content-0 title="interactive content">will cause</a> the aforementioned
-  <a href=#activation-behavior>activation behavior</a> to be invoked.<p>The DOM attributes <dfn id=dom-a-href title=dom-a-href><code>href</code></dfn>, <dfn id=dom-a-ping title=dom-a-ping><code>ping</code></dfn>, <dfn id=dom-a-target title=dom-a-target><code>target</code></dfn>, <dfn id=dom-a-rel title=dom-a-rel><code>rel</code></dfn>, <dfn id=dom-a-media title=dom-a-media><code>media</code></dfn>, <dfn id=dom-a-hreflang title=dom-a-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-a-type title=dom-a-type><code>type</code></dfn>, must each
+  </ol><p>The DOM attributes <dfn id=dom-a-href title=dom-a-href><code>href</code></dfn>, <dfn id=dom-a-ping title=dom-a-ping><code>ping</code></dfn>, <dfn id=dom-a-target title=dom-a-target><code>target</code></dfn>, <dfn id=dom-a-rel title=dom-a-rel><code>rel</code></dfn>, <dfn id=dom-a-media title=dom-a-media><code>media</code></dfn>, <dfn id=dom-a-hreflang title=dom-a-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-a-type title=dom-a-type><code>type</code></dfn>, must each
   <a href=#reflect>reflect</a> the respective content attributes of the same
   name.<p>The DOM attribute <dfn id=dom-a-rellist title=dom-a-rellist><code>relList</code></dfn> must
   <a href=#reflect>reflect</a> the <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>
@@ -16632,10 +16668,7 @@
    hyperlinks">follow the hyperlink</a> defined by the
    <code><a href=#the-area-element>area</a></code> element, if any.</li>
 
-  </ol><p class=note>One way that a user agent can enable users to follow
-  hyperlinks is by allowing <code><a href=#the-area-element>area</a></code> elements to be clicked,
-  or focussed and activated by the keyboard. This <a href=#interactive-content-0 title="interactive content">will cause</a> the aforementioned
-  <a href=#activation-behavior>activation behavior</a> to be invoked.<p>The DOM attributes <dfn id=dom-area-alt title=dom-area-alt><code>alt</code></dfn>, <dfn id=dom-area-coords title=dom-area-coords><code>coords</code></dfn>, <dfn id=dom-area-href title=dom-area-href><code>href</code></dfn>, <dfn id=dom-area-target title=dom-area-target><code>target</code></dfn>, <dfn id=dom-area-ping title=dom-area-ping><code>ping</code></dfn>, <dfn id=dom-area-rel title=dom-area-rel><code>rel</code></dfn>, <dfn id=dom-area-media title=dom-area-media><code>media</code></dfn>, <dfn id=dom-area-hreflang title=dom-area-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-area-type title=dom-area-type><code>type</code></dfn>, each must
+  </ol><p>The DOM attributes <dfn id=dom-area-alt title=dom-area-alt><code>alt</code></dfn>, <dfn id=dom-area-coords title=dom-area-coords><code>coords</code></dfn>, <dfn id=dom-area-href title=dom-area-href><code>href</code></dfn>, <dfn id=dom-area-target title=dom-area-target><code>target</code></dfn>, <dfn id=dom-area-ping title=dom-area-ping><code>ping</code></dfn>, <dfn id=dom-area-rel title=dom-area-rel><code>rel</code></dfn>, <dfn id=dom-area-media title=dom-area-media><code>media</code></dfn>, <dfn id=dom-area-hreflang title=dom-area-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-area-type title=dom-area-type><code>type</code></dfn>, each must
   <a href=#reflect>reflect</a> the respective content attributes of the same
   name.<p>The DOM attribute <dfn id=dom-area-shape title=dom-area-shape><code>shape</code></dfn> must
   <a href=#reflect>reflect</a> the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code>
@@ -18498,7 +18531,23 @@
   specified, but the <code><a href=#the-label-element>label</a></code> element has a <span>labelable
   form-associated element</span> descendant, then the first such
   descendant in <a href=#tree-order>tree order</a> is the <code><a href=#the-label-element>label</a></code>
-  element's <a href=#labeled-control>labeled control</a>.<p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
+  element's <a href=#labeled-control>labeled control</a>.<p>The <code><a href=#the-label-element>label</a></code> element's exact default presentation and
+  behavior, in particular what its <a href=#activation-behavior>activation behavior</a>
+  might be, if anything, should match the platform's label
+  behavior.<div class=example>
+
+   <p>For example, on platforms where clicking a checkbox label checks
+   the checkbox, clicking the <code><a href=#the-label-element>label</a></code> in the following
+   snippet could trigger the user agent to <span>run synthetic click
+   activation steps on the <code><a href=#the-input-element>input</a></code> element, as if
+   the element itself had been triggered by the user:</span></p>
+
+   <pre>&lt;label&gt;&lt;input type=checkbox name=lost&gt; Lost&lt;/label&gt;</pre>
+
+   <p>On other platforms, the behavior might be just to focus the
+   control, or do nothing.</p>
+
+  </div><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>The <dfn id=dom-label-htmlfor title=dom-label-htmlFor><code>htmlFor</code></dfn> DOM
   attribute must <a href=#reflect>reflect</a> the <code title=attr-label-for><a href=#attr-label-for>for</a></code> content attribute.<p>The <dfn id=dom-label-control title=dom-label-control><code>control</code></dfn> DOM
@@ -18510,13 +18559,7 @@
   control</a> is the element in question. The <dfn id=dom-lfe-labels title=dom-lfe-labels><code>labels</code></dfn> DOM attribute of
   <span title="labelable form-associated element">labelable
   form-associated elements</span>, on getting, must return that
-  <code>NodeList</code> object.</p><!-- The label element's exact default presentation and behaviour
-  should match the platform's label behaviour. For example, on
-  platforms where clicking a checkbox label checks the checkbox,
-  clicking a label element should cause a click event to be
-  synthesised and fired at the checkbox. XXX should define activation
-  behaviour here; clicking on nested link? nested label? label when it
-  has a checkbox? etc --><h4 id=the-input-element><span class=secno>4.10.4 </span>The <dfn><code>input</code></dfn> element</h4><dl class=element><dt>Categories</dt>
+  <code>NodeList</code> object.<h4 id=the-input-element><span class=secno>4.10.4 </span>The <dfn><code>input</code></dfn> element</h4><dl class=element><dt>Categories</dt>
    <dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
    <dd><a href=#interactive-content-0>Interactive content</a>.</dd>
    <dd><a href=#category-listed title=category-listed>Listed</a>, <a href=#category-label title=category-label>labelable</a>, <a href=#category-submit title=category-submit>submittable</a>, and <a href=#category-reset title=category-reset>resettable</a> <a href=#form-associated-element>form-associated element</a>.</dd>
@@ -30225,16 +30268,11 @@
   in hidden areas? e.g. make onmousemove and onclick and form controls
   not respond to input? --><p>The <dfn id=dom-hidden title=dom-hidden><code>hidden</code></dfn> DOM
   attribute must <a href=#reflect>reflect</a> the content attribute of the
-  same name.<h3 id=activation><span class=secno>6.3 </span>Activation</h3><p>The <dfn id=dom-click title=dom-click>click()</dfn> method must <a href=#fire-a-click-event>fire a
-  <code>click</code> event</a> at the element, whose default action
-  is the <span title="fire a DOMActivate event">firing of a further
-  <code title=event-DOMActivate>DOMActivate</code> event</span> at
-  the same element, whose own default action is to go through all the
-  elements the <code title=event-DOMActivate>DOMActivate</code>
-  event bubbled through (starting at the target node and going towards
-  the <code>Document</code> node), looking for an element with an
-  <a href=#activation-behavior>activation behavior</a>; the first element, in reverse tree
-  order, to have one, must have its activation behavior executed.<h3 id=scrolling-elements-into-view><span class=secno>6.4 </span>Scrolling elements into view</h3><p>The <dfn id=dom-scrollintoview title=dom-scrollIntoView><code>scrollIntoView([<var title="">top</var>])</code></dfn> method, when called, must cause
+  same name.<h3 id=activation><span class=secno>6.3 </span>Activation</h3><p>The <dfn id=dom-click title=dom-click>click()</dfn> method must, if the
+  element has a defined <a href=#activation-behavior>activation behavior</a>, <a href=#run-synthetic-click-activation-steps>run
+  synthetic click activation steps</a> on the element. Otherwise,
+  the user agent must <a href=#fire-a-click-event>fire a <code>click</code> event</a> at
+  the element.<h3 id=scrolling-elements-into-view><span class=secno>6.4 </span>Scrolling elements into view</h3><p>The <dfn id=dom-scrollintoview title=dom-scrollIntoView><code>scrollIntoView([<var title="">top</var>])</code></dfn> method, when called, must cause
   the element on which the method was called to have the attention of
   the user called to it.<p class=note>In a speech browser, this could happen by having the
   current playback position move to the start of the given

Received on Friday, 3 October 2008 01:13:05 UTC