Updated proposal round two (based on feedback from Monday's meeting)

Comments welcome:

When possible a facility must me provided to make <canvas> directly
accessible to assistive technologies in such a way that an accessibility
validator may detect the accessible binding in markup. The accessibility
binding should be such that keyboard navigation of <canvas> be consistent
with standard HTML navigation in the DOM and as such the author should be
able to use the area between the <canvas> </canvas> tags to implement this
accessible rendering. The challenge being that the author also uses the
same <canvas> subtree to represent fallback content. The fallback subtree
differs from the accessible <canvas> subtree in that the accessible
<canvas> subtree is designed to have its rendering directly drawn to the
<canvas> whereas the fallback subtree is not.

The determination of the disposition of the <canvas> subtree can be
determined at load time. Therefore, to indicate to assistive technologies
and test tools that the <canvas> subtree is a directly accessible binding
of <canvas> we would like to introduce a new canvas attribute called
adom/(or whatever the group likes). When set to true it indicates that the
canvas subtree is to be use as a direct accessible subtree of canvas.
Another important reason for it being an attribute (as opposed to a
separate element) is because there is likely no need for the DOM to contain
both 'fallback content' and 'shadow DOM content' at the same time. The
fallback content can come over the wire in the HTML source, and a script
can determine whether canvas is renderable, then replace that fallback
content with the shadow DOM content (and update the new attribute) when it
initializes the canvas.

We propose adding this text to canvas:

The canvas element has a third boolean attribute called adom to indicate if
the canvas subtree is an accessible DOM subtree binding of canvas. If it is
true, standard HTML elements may be used in the <canvas> subtree, however
the
rendering of the subtree is controlled by script through the canvas API.
When adom is set to "true" the elements within the <canvas> MUST be
rendered transparently
to ensure inclusion in the HTML keyboard navigation order without effecting
the visible rendering
of the web page. The default value for adom is false to indicate that the
canvas subtree
is fallback content. Authors supporting an accessible adom subtree:

      - MUST render visible focus of the canvas subtree element on the
rendered <canvas>
      - MUST render the keyboard caret insertion cursor of the canvas
subtree element on the rendered <canvas>
      - SHOULD ensure that the <canvas> rendering reflects the user
settings for font, color, and zoom

User settings are defined as text and zoom properties, rendered by a user
agent, as affected by user and/or system settings. (e.g. If a user's
settings affect standard DOM text rendered in the browser, authors should
detect that difference and update the canvas to reflect the user's
preference.)

Change:


      interface HTMLCanvasElement : HTMLElement {
                 attribute unsigned long width;
                 attribute unsigned long height;

        DOMString toDataURL(in optional DOMString type, in any... args);

        object getContext(in DOMString contextId);
      };

      to:

      interface HTMLCanvasElement : HTMLElement {
                 attribute unsigned long width;
                 attribute unsigned long height;
      attribute boolean adom;

        DOMString toDataURL(in optional DOMString type, in any... args);

        object getContext(in DOMString contextId);
      };

Add the following definition to the HTML 5 glossary:




Rich Schwerdtfeger
Distinguished Engineer, SWG Accessibility Architect/Strategist

Received on Tuesday, 16 February 2010 23:20:40 UTC