[html4all] Figure ideas (was: Article by Catherine: Feedback on accessibility concerns in HTML5)

Leif Halvard Silli lhs at malform.no
Thu Sep 20 21:09:51 PDT 2007


Catherine,

On 2007-09-21 04:49:11 +0200 zara <ecrire at catherine-roy.net> wrote:

> We were originally talking about the longdesc attribute [...]

> http://www.3sip.fr/main.php?page=.%2Fstat
> And the discussion then turned to how the "figure" element might support 
> this, where someone provided this type of rough example of how the "figure" 
> element could transmit the relevant information :

According to the HTML5 draft, the FIGURE is only permitted to contain _one_ LEGEND element and _one_ embedded content element - nothing more. The LEGEND element, when inside a FIGURE, might contain [Structured inline-level elements].  Which means that it for instance it is permitted to contain TABLE. Thus, in the code example you provide, the TABLE should be inside the LEGEND element, and not after it. I.e. something like this:

> <figure>
> 	<img src="camembert.jpg" alt="Répartition des fournisseurs de tartes 
> Tatins">
> 	<legend>La tarte Tatin, principaux fournisseurs <!-- legend -- >
> 	<table>
> 		<tr>
> 		<th scope="col">Compagnie</th>
> 		<th scope="col">Part de marché</th>
> 		</tr>
> 		<tr>
> 		<td>Boudreau</td>
> 		<td>40%</td>
> (etc)
> 		</tr>
> 	</table>
       </legend> <!-- moved close tag of legend here -->
> </figure>

My suggestion was to use [phrase elements] such as SPAN instead of LEGEND. Such elements are not permitted to contain [structured inline-level content]. The solution to that could simply be to permit such content, in this context. Another solution could be to use the DIV-element instead.

> While I find this idea very intriguing, I still wonder about some things, 
> notably, about the fact that a lot of Web content is not necessarily built by 
> professionals or by people using sophisticated authoring tools or who know 
> everything an authoring tool could (eventually) do for them but who would be 
> providing this type of information (and whether we like it or not, that is a 
> given in a lot of cases). So, basically, how do we reconcile with the fact 
> that it is hard enough getting people to do longdesc properly and expect them 
> to do something like this. How do we make it easy for them ?

I am not certain why you discussed FIGURE in connection with attribute LONGDESC.

The content of the longdesc attribute is hidden unless you specificly follow the LONGDESC link. I was not certain from your message if it was proposed the TABLE in your example should be hidden in graphical UAs? But at least the LEGEND visible to all.

I think, however, that if the TABLE in your example is intented to replace the camembert image, then it would need to be inside the ALT text - or, rather, the IMG would need to be an OBJECT element - and the TABLE would be inside the OBJECT element - as fallback content/alternative content.

It is not strange that you discuss the graphs of the «Statistiques des risques» page in connection with FIGURE - because the name of the element sounds - to me - as if is intended for embedded content of more technical or scientific nature.  Maciej, however, seems to think that FIGURE is a nice thing to use on such sites as Flickr.

The thoughts I presented was not directly linked to @LONGDESC as such. Basically, I was a little bit into Maciej's thinking - allthough I more had in mind normal text with regular paragraphs, and some FIGURE paragrahps here and there.  I imagined, in general, a short caption/legend text and a fitting alternative text (for the image/embedded content). I also had in mind the use case where an image _has no alt_ becasue the content of the image is discussed in the text of the document. And then - I pointed out that the caption text could be used to create [automatic cross-references], as proposed in HTML 5 - these crossreferenes, in effect, leads to longer descriptions - though not necessarily @LONGDESC texts. 

So - I think that the purpose of FIGURE is to provide a way to directly link a _title_ or _description_ to one particualr piece of embedded content - not via the TITLE attribute, but directly in the text. However, for the embedded content itself - that is, the IMG, or OBJECT, or VIDEO or whatever, the FIGURE has nothing special to offer. Those things must be handeled either via the ALT attribute (IMG) or via fallback content (OBJECT) - and perhaps even via the LONGDESC attribute.

[phrase elements]: <http://www.w3.org/html/wg/html5/#phrase>
[structured inline-level content]: <http://www.w3.org/html/wg/html5/#structured>
[automatic cross-references]: <http://www.w3.org/html/wg/html5/#the-dfn>
-- 
leif halvard silli





More information about the List_HTML4all.org mailing list