- From: Ben Boyle <benjamins.boyle@gmail.com>
- Date: Sat, 23 Jun 2007 17:00:57 +1000
- To: "Robert Burns" <rob@robburns.com>
- Cc: "HTML WG" <public-html@w3.org>
> > [1] http://dev.w3.org/cvsweb/~checkout~/html5/spec/Overview.html? > > rev=1.78#figure > > I'm having trouble reading the draft in this way. I would agree with > you 100% that the aural browser should have access to the caption/ > legend and the alt. However, I can't tell where in the draft you see > the opposite. Well I could be wrong. Let's see if we can figure out this spec :) http://dev.w3.org/cvsweb/~checkout~/html5/spec/Overview.html#the-figure We've got a new element: <figure> It can contain: <legend> + "embedded content" (I'm not sure exactly which elements qualify as "embedded content" but for now let us say <img> definitely does). <figure> <legend>This is an image caption</legend> <img src="something.png" alt="alt text here"> </figure> Now go read the spec again, particularly what follows from "If the embedded content cannot be used, then, for the purposes of establishing what the figure element represents:" ... the points indicate what happens when the image (embedded content) cannot be used (which I believe applies for screen readers, amongst other cases). We need to know about "fallback content" at the moment. Specifically for images: "the value of the alt attribute is the img element's fallback content." http://dev.w3.org/cvsweb/~checkout~/html5/spec/Overview.html#img So, when an img can't be used, we use the alt attribute. All good. Now let's go back to the fallback rules for <figure>: 1. If the embedded content's fallback content is a single embedded content element ... This doesn't apply to <img>. The fallback for <img> is @alt which is not "a single embedded content element". (This rule useful for other embedded content elements). Moving on ... 2. If the embedded content's fallback is nothing ... OK, this can apply to images, specfically when alt="" or alt is omitted. ... The entire figure element (including the caption, if any) must be ignored. Therefore, ignore <figure> (including <legend>), because there is no alternative. 3. If the embedded content's fallback is inline-level content ... This applies when there is an alt attribute with a text value. ... The entire figure element (including the caption, if any) must be treated as being a single paragraph with that inline-level content as its content. Therefore consider <figure> ... </figure> replaced by a "paragraph" containing the alt text (and not the <legend> which is now suppressed). I guess this means <figure>alt text here</figure> although it might mean <p>alt text here</p> ... I find the spec ambiguous about "paragraph" here: http://dev.w3.org/cvsweb/~checkout~/html5/spec/Overview.html#paragraph 4. Otherwise ... This doesn't apply to <img> either. They either have alt text or they don't, so the previous two options cater to all possible scenarios (again, useful for elements other than <img>) I'm not sure if this will make things clearer... should I do up an example? It still seems clear to me that the legend will be suppressed when fallback is applied. cheers Ben
Received on Saturday, 23 June 2007 07:01:02 UTC