Wednesday, 19. November 2008, 01:05:03
html5, validation
People keep complaining about HTML5's error handling. It looks like a lot of people believe that
because the standard includes error handling, all content will be considered valid.
This statement is
wrong and repeating it doesn't make it true. Yet even Sir Tim Berners-Lee himself
seems to express a concern that HTML5 represents
changes of philosophy about improving the web as opposed to letting it fester while describing it.
This is probably the greatest misunderstanding about HTML5. Let's get this straight..
- Understanding error handling is an absolute requirement for improving HTML and the Web while being compatible with current content.
- Invalid documents are still invalid.
- HTML5 browsers will not "gloss over" invalidity any more than the current HTML4 browsers already do.
On the contrary, I believe that the level of detail in HTML5's error handling will make browsers and validators report
more useful error messages. This will
make it easier to write valid HTML.
Look at
the spec. Right now I find 178 instances of the expression "parse error" in the spec text. These parse errors are validity errors that
validators will and browsers may report to the user. (The spec can't dictate browsers to do so because it's a UI decision how to do it, but I'm fairly sure that Firefox, Safari and Opera will all use their existing error consoles / web developer tools to show HTML5 parse errors. After all, these errors should be so useful it would be a competitive drawback for a developer tool
not to show them).
Having web browsers and validators report the same errors will help authors understand HTML and well-formedness. Today, authors who try to use the validator are baffled when the validator says a document has lots of problems, yet it works fine in browsers and they don't complain about errors. This confuses authors and makes them distrust or ignore the validator warnings.
Tomorrow, HTML5-compliant validators and browsers will report the same errors, and HTML authors will be less confused and more enlightened as a result. Hence, specifying error handling with the detail the HTML5 spec is doing should in fact contribute to improving the quality of the markup out there on the web.
Sunday, 7. September 2008, 11:29:19
html5, ALT, standardisation, specs
Should the HTML5 specification require ALT attributes for all IMG tags? The raging debates on the public-html list seem endless. But let's see if we can get an overview..
- Requiring ALT attributes hurts accessibility when tools or people insert empty or silly ALT attributes for significant images to pass validation.
- Requiring ALT attributes helps accessibility when people educate themselves due to validation warnings and add useful ALT-contents, and when companies have to use ALT correctly due to legal threats.
Which effect is stronger and more valuable? This - in a nutshell - is what the ALT warriors should be discussing and researching. For example, there is
some research here that indicates even low quality ALT text can be more helpful than none.
There is an incredible amount of time being spent on largely irrelevant arguments - from both sides. For example
- Mass uploading images (e.g. Flickr) means people don't have time to write ALT texts, so Flickr can't require users to do so.
This is just a matter of how conscientious the user is. Flickr should have an optional "description for blind people" box, users who did not fill in details would cause Flickr to output invalid HTML without ALT. So non-conscientious users create invalid HTML - to me, that sounds like a fact of life, not a spec bug.
- Future software may be able to analyse images automatically and provide alternative text if ALT is omitted.
Yeah, I'll believe in this intelligent software when I see it - and in particular I find it hard to believe that such hyper-intelligent software can't be configured to generate ALT-text for ALL images regardless of supplied ALT.
- Requiring ALT means blind users can not upload images they don't know the contents of.
Um, and uploading images you don't know the contents of is a major use case? I sort of can't see the motivation of the user for doing that.
Then there is a lot of hot air and big egos or at least claims that other people have big egos, claims that whoever disagrees with you is arrogant and doesn't listen etc.. I admit that the quality of discussion on the public-html W3C list disappoints me.
The current spec text seems pretty good. I think that in the interest of getting rid of invisible meta data and user-targeted text in hidden attributes it might also say that ALT can be omitted if
aria-describedby points to some element in the page.
Now please move on to the next topic..