Re: [whatwg] @generator-unable-to-provide-required-alt, figure with figcaption

2013-09-04 0:09, Ian Hickson wrote:

>> To a user, even “(an image)” is better than lack of alt attribute
> I disagree. The lack of an alt attribute can be used by user agents to
> substitute the string "(an image)", in which case it is the same, or it
> can be used to do far more, e.g. image recognition, OCR, etc. This isn't
> academic, these technologies exist today.

There is nothing that makes that makes that impossible, or more 
difficult, if the element has an alt attribute. If you mean that 
programs would actually do such things if and only if the alt attribute 
is absent, then this is very speculative. Let’s worry about that when 
browsers are actually capable and willing to do such things at all.

There is an essential difference between lack of an alt attribute and a 
more or less generic value used for it, as in alt="(an image)" or in 
alt="(image: horse5)" (automatically generated e.g. from an image URL 
that ends with horse5.png) or in alt="(photo of Hixie)". Lack of the alt 
attribute says absolutely nothing about the image; it might represent a 
word as an image, or be pure decoration, or be so complicated that 
writing a textual alternative would be major challenge in content 

Someone who hears, says “image – horse five” at least gets some idea of 
what the image is about, and even “an image” as opposite to whatever a 
speech browsers says about <img ... alt=""> is an improvement: the user 
can know that the author tried to find a textual replacement for the 
image but couldn't.

> To the non-validator user agent, that attribute means nothing. It's a
> non-conforming attribute with no semantics to any software outside content
> generators and conformance checkers.

It is presented as a non-conforming attribute that can be used to get a 
clean validation report, i.e. to make a validator report a document as 
valid, as conforming. This is grossly illogical and misleading. Anyone 
who uses a validator has the right to know whether the document is valid 
or not, to the extent that this can be programmatically determined. And 
it is, if the attribute is not valid.

Here's a proposal:

The character U+FFFC OBJECT REPLACEMENT CHARACTER, which is “used as 
placeholder in text for an otherwise unspecified object” [the quote is 
from the code chart entry in the Unicode Standard] be used as the value 
of an alt attribute to indicate that it was not possible to write an 
adequate alternate text for the image. This typically means that the 
image comes from a source external to the system that generates the HTML 
document and the system cannot analyze it or otherwise find a suitable 
text replacement.

You could even add a statement like this:

User agents that present the value of an alt attribute to the user may 
express the value of U+FFFC using a generic expression like “some 
image”. They may also apply technologies that process the image trying 
to recognize its content and then express the result suitably, e.g. “an 
unrecognizable image” or “an image of a horse” or (in the case of having 
recognized that the content is scannable as text) “Hello”.

– It’s of course possible that people would then use alt="&#fffc;" to 
silence validators even when they could easily write real text there. 
But they can anyway use alt="" for such purposes if they want to.


Received on Wednesday, 4 September 2013 05:30:30 UTC