[whatwg] @generator-unable-to-provide-required-alt, figure with figcaption
whatwg.org at prlbr.com
Sun Jun 2 10:21:46 PDT 2013
I just noticed a change to “22.214.171.124.14 Guidance for conformance checkers” from a few months ago that I want to give feedback about.
The section describes when conformance checkers should not report a missing alt-attribute on img-tags, partially to prevent code generators that cannot provide an appropriate alt-text from using an inappropriate one just to silence conformance checkers. The new option code generators have is to use the non-conforming attribute generator-unable-to-provide-required-alt like this:
<img src="…" generator-unable-to-provide-required-alt="">
I'm in charge of a code generator and while it is not widespread at all, my opinion might be shared by others who make code generators: This new option is too verbose – especially for something that has no meaning for the document it is contained in. And it kind of sounds as if the particular generator using this attribute is more inapt than other generators who output
<img src="…" alt="image">
As developer of a code generator I don't feel inclined to use this new non-conforming attribute instead of an inappropriate
<img src="…" alt=""> or
<img src="…" alt="image"> or
<img src="…" title="image">
While I can imagine why an accessibility evangelist would want a conformance-checker-silencer to be as unattractive to use as possible, that really defeats its purpose, if it also deters code generator programmers. Previously, conformance checkers had been silenced by a single
<meta name="generator" content="…">
in cases of missing alt-attributes. This solution effectively removed any urge to use an inappropriate alt-text for me as a code generator developer.
There is another case where conformance checkers don't report missing alt-attributes: When img is used in figure and accompanied by a non-empty figcaption:
This could have been a nice option because in case of the code generator I maintain there are often captions for images. However, the figure element is restrained by the requirement that it could in theory be moved somewhere else in the document without any problems (4.5.11). It seems to me that this condition makes the figure element unusable for many code generators and WYSIWYG editing in particular.
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.:
And here conformance checkers will complain about the missing alt-attribute again …
More information about the whatwg