[whatwg] alt="" and the <meta name=generator> exception

Jukka K. Korpela jkorpela at cs.tut.fi
Wed Aug 1 01:53:41 PDT 2012


2012-08-01 10:56, Ian Hickson wrote:

> Only generators are in a position where they might have to
> include images for which they lack the ability to provide alt texts.

A simple counter-example to that: A human employee who has been told to 
add some images to a web page, without having been told why and with no 
instructions on alt texts.

> On Wed, 25 Jul 2012, Jukka K. Korpela wrote:
>>
>> Quite possibly. We cannot prevent people from writing and selling buggy
>> software. A generator may produce valid code, or invalid code. We should
>> not change the definition of valid just to match some generator
>> behavior.
>
> The problem is that some generators -- e.g. software that converts word
> processor documents to HTML -- are in a position where they sometimes
> cannot possibly comply to the requirement. Image recognition and context
> analysis simply isn't good enough yet to handle this case.

So what about the poor human then?

And when there’s an argument of impossibility, in some sense, something 
judged to be an error, on good grounds, it’s still an error. A markup 
error is not a mortal sin, and there is no real punishment for it, 
though it may have some negative effects.

> It's unfortunate to force such vendors into a position of
> having to defend their one validation error when there's nothing they can
> do about it,

Silencing the error does not make the markup any better. This is an 
example of the "validation as quality assurance" fallacy that we should 
fight against, not support. When a document has been converted to HTML 
format without due attention to alt texts for images, it has not been 
converted properly. There is no reason to try please vendors of 
converters by tweaking the rules and the checkers/validators to accept 
automatic conversion results that just aren't good.

And they *can* do a lot about it. They can initiate a user dialog, 
prompting for a person to provide alt text. Whether it is economically 
feasible is a different issue. If you don't require generators to do 
that, why would you require the poor human employee to write just 
something into the alt attribute? (Making him type nonsense, mostly, of 
course.)

>> According to normal accessibility principles, a generically informative
>> alt attribute is better than no alt attribute, which just says "here's
>> an image and we're not telling you anything about it, probably because a
>> lazy author didn't give the issue any thought".
>
> That's what the absence of an alt="" attribute means.

That's the problem indeed. A generically informative alt attribute means 
something else. (What it means depends on its formulation.)

>> Even alt="unknown image" or alt="unknown image named foobar.jpg" is
>> better than lack of alt attribute (or alt="").
>
> On the contrary; alt="unknown image" is equivalent to <span>unknown
> image</span>

Or rather just the text "unknown image". Whether it makes sense depends 
on the context, as usual with alt attributes. In an image gallery (a 
typical case), it makes perfect sense.

> and would be fine alt="" text for an image of text that says
> "unknown image"

That's a bit too theoretical, isn't it? On similar grounds, you might 
argue that _any_ alt text is a fine text for an image containing that 
text, and nothing else.

Yucca




More information about the whatwg mailing list