- From: Henri Sivonen <hsivonen@iki.fi>
- Date: Sun, 5 Aug 2012 15:52:02 +0300
- To: WHATWG <whatwg@whatwg.org>
On Wed, Aug 1, 2012 at 10:56 AM, Ian Hickson <ian@hixie.ch> wrote: >> After all, what's the point of using validation if you use a generator? People who are not the developer of the generator use validators to assess the quality of the markup generated by the 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. Alice writes a generator that's logically cannot know the text alternative for an image file and, therefore, makes the generator output <img> without alt. Bob is shopping around for generators of the type Alice's generator happens to be or engaging in an Internet argument about which generator sucks and which generator rocks. So Bob feeds the output of Alice's generator to validator, sees an error message and proceeds to proclaim to the world that Alice's generator is bad, because it's output doesn't validate. Alice doesn't want Bob to proclaim to the world that her generator is bad. Educating Bob and everyone who listens to Bob about why the generator produces output that causes the validation error is too hard. The path of least resistance for Alice to make the problem go away is to change the output of the generator such that it doesn't result in an error message from a validator, so Alice makes the image have the attribute alt="" which happens to result in the existence of the image being concealed from users of screen readers. Or, alternatively, Alice anticipates Bob's reaction and preemptively makes her generator output alt="" before Bob ever gets to badmouth about the invalidity of the generator's output. Even if we wanted to position validators as tools for the people who write markup, we can't prevent other people from using validators to judge markup output by generator written by others. The crux of this problem is the tension between a validator as a tool for the person writing the markup and a validator being used to judge someone else's markup and what people can most easily do to evade such judgment. > We briefly brainstormed some ideas on #whatwg earlier tonight, and one > name in particular that I think could work is the absurdly long > > <img src="..." generator-unable-to-provide-required-alt=""> > > This has several key characteristics that I think are good: > > - it's long, so people aren't going to want to type it out > - it's long, so it will stick out in copy-and-paste scenarios > - it's emminently searchable (long unique term) and so will likely lead > to good documentation if it's adopted > - the "generator" part implies that it's for use by generators, and may > discourage authors from using it > - the "unable" and "required" parts make it obvious that using this > attribute is an act of last resort While I agree with the sentiment the name of the attribute communicates, its length is enough of a problem to probably make it fail: 1) Like a namespace URL, it's too long to memorize correctly, so it's easier for the generator developer to type 'alt' than to copy and past the long attribute name from somewhere. 2) It takes so many more bytes than alt="", so it's easy to shy away from using it on imagined efficiency grounds. -- Henri Sivonen hsivonen@iki.fi http://hsivonen.iki.fi/
Received on Sunday, 5 August 2012 12:52:33 UTC