Re: Proposal for <canvas src> to allow images with structured fallback by Tab Atkins Jr.

Joshue O Connor, Tue, 08 Mar 2011 09:14:49 +0000:
> Steve Faulkner, Mon, 7 Mar 2011 13:40:15 +0000:

>>> <canvas src="complex-chart.png">
>>>   <table>
>>>     -data that the chart represents-
>>>   </table>
>>> </canvas>
>> Versus this:  <img longdesc=URL src=img >  ?
> 
> I like the above idea. I even think its better than the @long desc
> example Leif then cites.

Better in what sense? My question was what survives best in feeds. But 
ignoring the problem of survival: the feed becomes "heavier" if it 
contains hidden markup. And Laura's use case about e-mail banner 
description, demonstrates how a @longdesc URL is reusable a simple way.

> This is because:
> 
> 1) When a some legacy UA cannot parse the <canvas> element directly it
> will (I guess) access the next node which is the table element. If this
> table is accessible, with a suitable caption/@summary when necessary,
> and correctly marked up content, the screen reader will be able to give
> this is data to the user.  So everyones happy.

This seems very good. But shouldn't the user of the legacy UA be told 
that it is an image? And how would you tell it so? The legacy UA might, 
btw, support ARIA! So which role should the <canvas@src then be given?

> 2) I would prefer to see the former example rather than the latter. A
> @longdesc may be suitable in some situations, in particular providing a
> verbose description for some image  but accessible table markup would
> trump it in the this case IMO. Of course
> 
> <canvas src="complex-charr.png" aria-describedby="somefragid">
> <table>
> -data that the chart represents-
> </table>
> </canvas>
> 
> would be even better.

Why/How would @aria-describedby=somefragid help here? Again, which role 
would you give to the <canvas@src ? If you give it role=img, then this 
would negate the "table role" (there is no such formal role, but you 
get my point) of the <table. Thus if the @aria-describedby=somefragid 
points to <table@id=somefragid, then the table would be presented to 
the user as a string of text and not as a table.

> As a UA that can support the canvas could render
> it, the aria-describedby attribute can reference some in page
> description and the fallback content can be parse by legacy UAs.

See above. Please explain better how you would use @aria-describedby. 
Thanks!

Leif Halvard Silli

Received on Tuesday, 8 March 2011 15:13:16 UTC