HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/3928

File a bug

SVNBugCommentTime (UTC)
39287404[Gecko] [Opera] [Webkit] Make <canvas> descendants focusable to enable keyboard accessibility.2009-09-21 10:40
Index: source
===================================================================
--- source	(revision 3927)
+++ source	(revision 3928)
@@ -26067,7 +26067,7 @@
    </dd>
   </dl>
 
-  <p>The <code>canvas</code> element <span>represents</span> a
+  <p>The <code>canvas</code> element provides scripts with a
   resolution-dependent bitmap canvas, which can be used for rendering
   graphs, game graphics, or other visual images on the fly.</p>
 
@@ -26089,22 +26089,33 @@
   <p>In interactive visual media, if <span
   title="concept-n-script">scripting is enabled</span> for the
   <code>canvas</code> element, the <code>canvas</code> element
-  represents an embedded element with a dynamically created image.</p>
+  <span>represents</span> <span>embedded content</span> consisting of
+  a dynamically created image.</p>
 
   <p>In non-interactive, static, visual media, if the
   <code>canvas</code> element has been previously painted on (e.g. if
   the page was viewed in an interactive visual medium and is now being
   printed, or if some script that ran during the page layout process
   painted on the element), then the <code>canvas</code> element
-  represents <span>embedded content</span> with the current image and
-  size. Otherwise, the element represents its <span>fallback
-  content</span> instead.</p>
+  <span>represents</span> <span>embedded content</span> with the
+  current image and size. Otherwise, the element represents its
+  <span>fallback content</span> instead.</p>
 
   <p>In non-visual media, and in visual media if <span
   title="concept-n-noscript">scripting is disabled</span> for the
   <code>canvas</code> element, the <code>canvas</code> element
-  represents its <span>fallback content</span> instead.</p>
+  <span>represents</span> its <span>fallback content</span>
+  instead.</p>
 
+  <!-- CANVAS-FOCUS-FALLBACK -->
+  <p>When a <code>canvas</code> element <span>represents</span>
+  <span>embedded content</span>, the user can still focus descendants
+  of the <code>canvas</code> element (in the <span>fallback
+  content</span>). This allows authors to make an interactive canvas
+  keyboard-focusable: authors should have a one-to-one mapping of
+  interactive regions to focusable elements in the <span>fallback
+  content</span>.</p>
+
   <p>The <code>canvas</code> element has two attributes to control the
   size of the coordinate space: <dfn
   title="attr-canvas-width"><code>width</code></dfn> and <dfn
@@ -66013,10 +66024,25 @@
   to a non-mouse activation (e.g. hitting the "enter" key while the
   element is focused).</p>
 
+  <p>The <dfn title="dom-tabIndex"><code>tabIndex</code></dfn> IDL
+  attribute must <span>reflect</span> the value of the <code
+  title="attr-tabindex">tabindex</code> content attribute. If the
+  attribute is not present, or parsing its value returns an error,
+  then the IDL attribute must return 0 for elements that are focusable
+  and &#x2212;1 for elements that are not focusable.</p>
+
+  </div>
+
+  <div class="impl">
+
+  <h4 id="focus-management">Focus management</h4>
+
   <p>An element is <dfn>focusable</dfn> if the user agent's default
   behavior allows it to be focusable or if the element is
-  <span>specially focusable</span>, but only if the element is
-  <span>being rendered</span>.</p>
+  <span>specially focusable</span>, but only if the element is either
+  <span>being rendered</span> or <!-- CANVAS-FOCUS-FALLBACK --> is a
+  descendant of a <code>canvas</code> element that
+  <span>represents</span> <span>embedded content</span>.</p>
 
   <p>User agents should make the following elements
   <span>focusable</span>, unless platform conventions dictate
@@ -66060,20 +66086,8 @@
   element can correspond to multiple shapes, since image maps can be
   reused with multiple images on a page.)</p>
 
-  <p>The <dfn title="dom-tabIndex"><code>tabIndex</code></dfn> IDL
-  attribute must <span>reflect</span> the value of the <code
-  title="attr-tabindex">tabindex</code> content attribute. If the
-  attribute is not present, or parsing its value returns an error,
-  then the IDL attribute must return 0 for elements that are focusable
-  and &#x2212;1 for elements that are not focusable.</p>
+  <hr>
 
-  </div>
-
-
-  <div class="impl">
-
-  <h4 id="focus-management">Focus management</h4>
-
   <p>The <dfn>focusing steps</dfn> are as follows:</p>
 
   <ol>

|