W3C home > Mailing lists > Public > public-html@w3.org > July 2011

Re: correct and incorrect uses of canvas

From: Andrew Fedoniouk <andrew.fedoniouk@live.com>
Date: Sun, 17 Jul 2011 12:10:55 -0700
Message-ID: <BLU165-ds7AEA5BE58673AD0DE8701F84B0@phx.gbl>
To: "Andrew Fedoniouk" <news@terrainformatica.com>, Kornel LesiƄski <kornel@geekhood.net>
Cc: <public-html@w3.org>
>-----Original Message----- 
>From: Kornel Lesinski Sent: Sunday, July 17, 2011 11:07 AM To: Andrew 
>Fedoniouk Cc: public-html@w3.org Subject: Re: correct and incorrect uses of 
>canvas
>On Sun, 17 Jul 2011 17:29:39 +0100, Andrew Fedoniouk 
><andrew.fedoniouk@live.com> wrote:
>
>> Consider this SVG:
>> http://terrainformatica.com/w3/flower.svg
>>
>> In HTML you can use that SVG for example as this:
>> <img src="http://terrainformatica.com/w3/flower.svg" alt="flower" >
>>
>> We can  add to each <cicrcle> in that SVG attributes
>> @alt="leaf" or @alt="petal" but will it help to anyone?
>
>In case of a simple non-interactive images alt may suffice. However, SVG 
>can be used for much more than that, e.g. infographics and charts, which 
>contain text and data and may have buttons and other interactive elements.

As for charts the markup should look like this:
<div #chart>
   <ul .series>
       <li>10%</li>
       <li>40%</li>
       ...
  </ul>
  <legend>
      <label onclick=...>IE</label>
      <label onclick=...>FF</label>
  </legend>
</div>

Or something like that. That would be at least enumerable/readable.

>
>Saying that <circle> is clickable would help, and would be improvement 
>over just a circle drawn on canvas and hit-tested against mouse click with 
>custom JS.
>

Again, the idea is to motivate developers to use meaningful markup -
only HTML DOM elements should be clickable. Particular drawing
and visual structure of the scene does not really matter for A11y.


-- 
Andrew Fedoniouk

http://terrainformatica.com 
Received on Sunday, 17 July 2011 19:11:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:36 GMT