- From: Martin Janecke <whatwg.org@prlbr.com>
- Date: Sun, 16 Jun 2013 15:57:03 +0200
- To: Ian Hickson <ian@hixie.ch>
- Cc: whatwg <whatwg@lists.whatwg.org>
Am 07.06.2013 um 23:13 schrieb Ian Hickson: >> <img src="..." title="image"> > > If you have a caption from the user (as opposed to replacement text), then > this is a perfectly valid option. It's as valid as the <figure> case, and > means the same thing. > > [...] > >> I don't know whether someones writes something like "which the >> following figure illustrates" instead of "which is illustrated by fig. >> 3" somewhere in the text above a figure. But this difference decides >> whether using the figure element conforms with the spec. So a code >> generator can only use something which is structurally and optically >> identical to the figure element but does not have the theoretical >> requirement to be movable to a different place in the document, e.g.: >> >> <div class="figure"> >> <img src="..."> >> <div class="caption">...</div> >> </div> >> >> And here conformance checkers will complain about the missing >> alt-attribute again ... > > If you use <img src="..." title="..."> it'll work (and be correct, > insofar as anything missing alt text can be correct). While the title attribute might be as good as the figcaption or a div-caption element in meaning, it differs in practice, as the element can include further markup, the attribute cannot. The title attribute is displayed as mouse-over text in most browsers whereas the figcaption is usually immediately readable to anyone, just as a caption for a picture in a book. I am aware that one could use JavaScript to make the text from the title attribute immediately visible as well. But this would require further technology on the reader’s side (JS) and complicate things more than justified for the cause, in my opinion. What my markup generator actually does with captioned images is this: <meta name="generator" content="generator-name"> … <div class="figure"> <img src="..." aria-labelledby="caption-x"> <div id="caption-x" class="caption">...</div> </div> (see also http://www.w3.org/WAI/GL/wiki/Using_aria-labelledby_to_provide_a_text_alternative_that_serves_the_equivalent_purpose) Is there a chance that use of aria-labelledby is added to the spec (4.8.1.1.13 Guidance for markup generators, 4.8.1.1.14 Guidance for conformance checkers) as alternative to figure with figcaption or the title attribute? I'd like to suggest this. It does make equally sense in my opinion and I think I've described the use case in this thread: -- markup generator has no alt-text for an image -- image has a caption that should be immediately visible and possibly contain markup => no title attribute -- it is not known whether the image can be moved somewhere else in the document => no figure with figcaption -- markup generator should not be pressured to use bogus alt-text to calm easily scared customers using validators E.g. OCR book digitizers or markup editors strictly following the WYSIWYG paradigm. Regards Martin (PS: Also, thank you and Jukka for your comments that I've not replied to.)
Received on Sunday, 16 June 2013 13:57:31 UTC