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

Jukka K. Korpela jkorpela at cs.tut.fi
Wed Jul 25 09:52:12 PDT 2012


2012-07-25 15:05, Henri Sivonen wrote:

>> I think it would be better to keep the alt attribute always required but
>> recommend that conformance checkers have an option of switching off errors
>> related to this
>
> The big question is whether that would be enough to solve the problem
> of generators generating bogus alts in order to pass validation.

No, and it would not solve most of the other problems in the World Wide 
Web either. But it would solve the problem of confused authors as well 
as the practical problem that authors may wish to check their markup 
even when using software that generates img tags without alt attribute.

> I predict generator writers would want the generator output to pass
> validation with the default settings

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. After all, what's the point of using validation if you use a 
generator? You would in effect be testing the generator, something that 
its vendor should have done. We should not be concerned about helping 
generator vendors to advertize their products as producing valid code 
(code that passes validation) when they in fact produce code that 
violates established good practices of HTML.

The situation where a generator has to emit img tags without being able 
to insert any meaningful alt attributes is a real one, though rather 
special. 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". Even 
alt="unknown image" or alt="unknown image named foobar.jpg" is better 
than lack of alt attribute (or alt="").

Yucca





More information about the whatwg mailing list