Re: Request for advice on <canvas> accessibility

On Fri, Jun 26, 2009 at 11:31 PM, Steven
Faulkner<faulkner.steve@gmail.com> wrote:
> sorry, point 3 was unfinished, should read
>
> 3. rephrase the question:  what  would need to be added to the canvas
> API so that the UI controls in the example could have
> programmtic focus (like an area on an image map) and
> name, role and state information exposed to accessibility APIs,
> without expecting the author to completely recreate the UI controls in
> HTML.

How does SVG solve this problem? Could we reuse that solution somehow?

Would allowing putting markup inside the canvas work? So in your
example something like

<canvas ...>
  <menu>
    <li><a href="1.html" onclick="doAction(1)">1</a>
    <li><a href="2.html" onclick="doAction(2)">2</a>
    <li><a href="3.html" onclick="doAction(3)">3</a>
    <li><a href="4.html" onclick="doAction(4)">4</a>
    ...
  </menu>
</canvas>

work? This is similar to how the alt attribute provides an alternative
representation when the image itself isn't used (non-sighted users,
user has disabled images, image failed to download, etc).

Alternatively, a set of dummy <div> elements with ARIA attributes
could describe the UI being rendered by the canvas.

The risk is of course that the author wouldn't set up the descriptive
markup and just leave the <canvas> empty. Similar to how authors all
too often neglect to add alt attributes to images or summary
attributes to tables. I don't know how to solve that and it's quite
possible that that makes the solution unacceptable.

/ Jonas

Received on Saturday, 27 June 2009 09:46:17 UTC