- From: poot <cvsmail@w3.org>
- Date: Mon, 21 Sep 2009 19:34:29 +0900 (JST)
- To: public-html-diffs@w3.org
hixie: Make <canvas> descendants focusable to enable keyboard accessibility. (whatwg r3928) http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.3089&r2=1.3090&f=h http://html5.org/tools/web-apps-tracker?from=3927&to=3928 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.3089 retrieving revision 1.3090 diff -u -d -r1.3089 -r1.3090 --- Overview.html 21 Sep 2009 10:15:19 -0000 1.3089 +++ Overview.html 21 Sep 2009 10:33:59 -0000 1.3090 @@ -21147,7 +21147,7 @@ Object <a href="#dom-canvas-getcontext" title="dom-canvas-getContext">getContext</a>(in DOMString contextId); };</pre> </dd> - </dl><p>The <code><a href="#the-canvas-element">canvas</a></code> element <a href="#represents">represents</a> a + </dl><p>The <code><a href="#the-canvas-element">canvas</a></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>Authors should not use the <code><a href="#the-canvas-element">canvas</a></code> element in a document when a more suitable element is available. For example, it @@ -21162,16 +21162,24 @@ element. The contents of the <code><a href="#the-canvas-element">canvas</a></code> element, if any, are the element's <a href="#fallback-content">fallback content</a>.<p>In interactive visual media, if <a href="#concept-n-script" title="concept-n-script">scripting is enabled</a> for the <code><a href="#the-canvas-element">canvas</a></code> element, the <code><a href="#the-canvas-element">canvas</a></code> element - represents an embedded element with a dynamically created image.<p>In non-interactive, static, visual media, if the + <a href="#represents">represents</a> <a href="#embedded-content">embedded content</a> consisting of + a dynamically created image.<p>In non-interactive, static, visual media, if the <code><a href="#the-canvas-element">canvas</a></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><a href="#the-canvas-element">canvas</a></code> element - represents <a href="#embedded-content">embedded content</a> with the current image and - size. Otherwise, the element represents its <a href="#fallback-content">fallback - content</a> instead.<p>In non-visual media, and in visual media if <a href="#concept-n-noscript" title="concept-n-noscript">scripting is disabled</a> for the + <a href="#represents">represents</a> <a href="#embedded-content">embedded content</a> with the + current image and size. Otherwise, the element represents its + <a href="#fallback-content">fallback content</a> instead.<p>In non-visual media, and in visual media if <a href="#concept-n-noscript" title="concept-n-noscript">scripting is disabled</a> for the <code><a href="#the-canvas-element">canvas</a></code> element, the <code><a href="#the-canvas-element">canvas</a></code> element - represents its <a href="#fallback-content">fallback content</a> instead.<p>The <code><a href="#the-canvas-element">canvas</a></code> element has two attributes to control the + <a href="#represents">represents</a> its <a href="#fallback-content">fallback content</a> + instead.</p><!-- CANVAS-FOCUS-FALLBACK --><p>When a <code><a href="#the-canvas-element">canvas</a></code> element <a href="#represents">represents</a> + <a href="#embedded-content">embedded content</a>, the user can still focus descendants + of the <code><a href="#the-canvas-element">canvas</a></code> element (in the <a href="#fallback-content">fallback + content</a>). 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 <a href="#fallback-content">fallback + content</a>.<p>The <code><a href="#the-canvas-element">canvas</a></code> element has two attributes to control the size of the coordinate space: <dfn id="attr-canvas-width" title="attr-canvas-width"><code>width</code></dfn> and <dfn id="attr-canvas-height" title="attr-canvas-height"><code>height</code></dfn>. These attributes, when specified, must have values that are <a href="#valid-non-negative-integer" title="valid non-negative integer">valid non-negative integers</a>. <span class="impl">The <a href="#rules-for-parsing-non-negative-integers">rules for parsing @@ -50937,10 +50945,22 @@ to a non-mouse activation (e.g. hitting the "enter" key while the element is focused).</p> + <p>The <dfn id="dom-tabindex" title="dom-tabIndex"><code>tabIndex</code></dfn> IDL + 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, + then the IDL attribute must return 0 for elements that are focusable + and −1 for elements that are not focusable.</p> + + </div><div class="impl"> + + <h4 id="focus-management"><span class="secno">7.4.2 </span>Focus management</h4> + <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 - <a href="#being-rendered">being rendered</a>.</p> + <a href="#specially-focusable">specially focusable</a>, but only if the element is either + <a href="#being-rendered">being rendered</a> or <!-- CANVAS-FOCUS-FALLBACK --> is a + descendant of a <code><a href="#the-canvas-element">canvas</a></code> element that + <a href="#represents">represents</a> <a href="#embedded-content">embedded content</a>.</p> <p>User agents should make the following elements <a href="#focusable">focusable</a>, unless platform conventions dictate @@ -50973,17 +50993,7 @@ element can correspond to multiple shapes, since image maps can be reused with multiple images on a page.)</p> - <p>The <dfn id="dom-tabindex" title="dom-tabIndex"><code>tabIndex</code></dfn> IDL - 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, - then the IDL attribute must return 0 for elements that are focusable - and −1 for elements that are not focusable.</p> - - </div><div class="impl"> - - <h4 id="focus-management"><span class="secno">7.4.2 </span>Focus management</h4> - - <p>The <dfn id="focusing-steps">focusing steps</dfn> are as follows:</p> + <hr><p>The <dfn id="focusing-steps">focusing steps</dfn> are as follows:</p> <ol><li><p>If focusing the element will remove the focus from another element, then run the <a href="#unfocusing-steps">unfocusing steps</a> for that
Received on Monday, 21 September 2009 10:35:05 UTC