Accessibility tip 02: Language
“You know what language you’re writing in,” says Mark Pilgrim, “so tell your readers… and their software.”
Since I’m using XHTML 1.0 Transitional, my <html> tag should read:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
It turns out I was already ahead of the game—I asked about this in my DOCTYPE post. And, as Dorothea Salo explains in the comments on that post, it’s another Belt & Suspenders solution:
HTML added the
langattribute to the tag long before XML came around… So doing both is another case of belt and suspenders. Non-XML-grokking HTML engines will grab thelangattribute; XML-grokking engines can grab either.
