W3C home > Mailing lists > Public > public-html-diffs@w3.org > February 2009

spec/Overview.html 1.1975 2804 Handle elements losing focus when they a

From: poot <cvsmail@w3.org>
Date: Fri, 13 Feb 2009 10:15:13 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20090213011513.7B57C2BC00@toro.w3.mag.keio.ac.jp>

Handle elements losing focus when they are hidden, etc. (whatwg r2804)

:enabled
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1975.html#selector-enabled
:active
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1975.html#selector-active
specially focusable
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1975.html#specially-focusable
unfocusing steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1975.html#unfocusing-steps
tabIndex
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1975.html#dom-tabindex
focusable
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1975.html#focusable
If the value is a negative integer
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1975.html#negative-tabindex
6.5.3 Document-level focus APIs
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1975.html#document-level-focus-apis

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1974&r2=1.1975&f=h
http://html5.org/tools/web-apps-tracker?from=2803&to=2804

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1974
retrieving revision 1.1975
diff -u -d -r1.1974 -r1.1975
--- Overview.html	13 Feb 2009 01:06:20 -0000	1.1974
+++ Overview.html	13 Feb 2009 01:09:40 -0000	1.1975
@@ -35870,7 +35870,8 @@
 
      <li><code><a href=#the-command>command</a></code> elements that do not have a <code title=attr-command-disabled><a href=#attr-command-disabled>disabled</a></code> attribute</li>
 
-     <li>any other element, if it is <a href=#focusable>focusable</a></li>
+     <li>any other element, if it is <a href=#specially-focusable>specially
+     focusable</a></li>
 
     </ul>
 
@@ -35921,7 +35922,8 @@
      first such element's <a href=#command-facet-disabledstate title=command-facet-disabledstate>Disabled State</a> facet
      is false (not disabled)</li>
 
-     <li>any other element, if it is <a href=#focusable>focusable</a></li>
+     <li>any other element, if it is <a href=#specially-focusable>specially
+     focusable</a></li>
 
     </ul>
 
@@ -45439,13 +45441,11 @@
 
   </dl>
 
-  <p>An element is <dfn id=focusable>focusable</dfn> if the <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute's definition above
-  defines the element to be focusable <em>and</em> the element is
-  <span>being rendered</span><!-- XXX xref, define display:none as not
-  being rendered, off-screen as being rendered? -->.</p>
+  <p>An element is <dfn id=specially-focusable>specially focusable</dfn> if the <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute's definition above
+  defines the element to be focusable.</p>
 
-  <p>An element that is <a href=#focusable>focusable</a> but does not otherwise
-  have an <a href=#activation-behavior>activation behavior</a> defined has an
+  <p>An element that is <a href=#specially-focusable>specially focusable</a> but does not
+  otherwise have an <a href=#activation-behavior>activation behavior</a> defined has an
   <a href=#activation-behavior>activation behavior</a> that does nothing.</p>
 
   <p class=note>This means that an element that is only focusable
@@ -45454,6 +45454,44 @@
   to a non-mouse activation (e.g. hitting the "enter" key while the
   element is focused).</p>
 
+  <p>An element is <dfn id=focusable>focusable</dfn> if the user agent's default
+  behavior allows it to be focusable or if the element is
+  <a href=#specially-focusable>specially focusable</a>, but only if the element is
+  <span>being rendered</span><!-- XXX xref, define display:none,
+  orphan nodes as not being rendered, off-screen as being rendered?
+  -->.</p>
+
+  <p>User agents should make the following elements
+  <a href=#focusable>focusable</a>, unless platform conventions dictate
+  otherwise:</p>
+
+  <ul>
+
+   <li><code><a href=#the-a-element>a</a></code> elements that have an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</li>
+
+   <li class=XXX><code><a href=#the-area-element>area</a></code> elements that have an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</li> <!-- should
+   define the behavior in the face of multiple images and in the face
+   of no images -->
+
+   <li><code><a href=#the-link-element>link</a></code> elements that have an <code title=attr-link-href><a href=#attr-link-href>href</a></code> attribute</li>
+
+   <li><code><a href=#the-bb-element>bb</a></code> elements whose <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute is in a state whose
+   <i>relevance</i> is true</li>
+
+   <li><code><a href=#the-button-element>button</a></code> elements that are not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a></li>
+
+   <li><code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute are not in the
+   <a href=#hidden-state title=attr-input-type-hidden>Hidden</a> state and that
+   are not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a></li>
+
+   <li><code><a href=#the-select-element>select</a></code> elements that are not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a></li>
+
+   <li><code><a href=#the-textarea-element>textarea</a></code> elements that are not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a></li>
+
+   <li><code><a href=#the-command>command</a></code> elements that do not have a <code title=attr-command-disabled><a href=#attr-command-disabled>disabled</a></code> attribute</li>
+
+  </ul>
+
   <p>The <dfn id=dom-tabindex title=dom-tabIndex><code>tabIndex</code></dfn> DOM
   attribute must <a href=#reflect>reflect</a> the value of the <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> content attribute. If the
   attribute is not present, or parsing its value returns an error,
@@ -45513,9 +45551,17 @@
 
   </ol>
 
-  <p>User agents should run the <a href=#unfocusing-steps>unfocusing steps</a> for an
-  element whenever the user moves the focus away from any
-  <a href=#focusable>focusable</a> element.</p>
+  <p>When the user moves the focus away from a <a href=#focusable>focusable</a>
+  element, the user agent should run the <a href=#unfocusing-steps>unfocusing steps</a>
+  that element.</p>
+
+  <p>When an element that is focused stops being a
+  <a href=#focusable>focusable</a> element, the user agent should run the
+  <a href=#unfocusing-steps>unfocusing steps</a> that element.</p>
+
+  <p class=example>For example, this might happen because the
+  element is removed from its <code>Document</code>, or has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute added. It would also
+  happen to an <code><a href=#the-input-element>input</a></code> element when the element gets <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>.</p>
 
 
   <h4 id=document-level-focus-apis><span class=secno>6.5.3 </span>Document-level focus APIs</h4>
Received on Friday, 13 February 2009 01:15:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:13:58 GMT