Minz. Out of the box

The xml lang attribute


There have been a lot of discussions out there of making the switch to XHTML 1.1 as well as pros and cons of doing so (mostly regarding the fact, that an XHTML 1.1 document should be served with the correct MIME-type.)

I already know a lot of people that made the switch and I know most of them are paying attention to accessiblity. Now there is something that makes me say "huh?". The Web Content Accessibilty Guidelines (WCAG) tell us to identify changes in language [WCAG 4.1]. Well, this can be done using the xml:lang attribute in XHTML 1.1. Unfortunately this attribute isn't very much supported in todays browsers. Correct me if I am wrong, even Mozilla doesn't offer property information about a <span xml:lang="de"> element.

The identification of language should be important for screenreaders and voicebrowsers. Has anyone encountered a tool out there that is already supporting the xml:lang attribute?

Now, about accessibility. This brings me to my next point. abbr and acronym. Consider the following term: XHTML. This is of course an english term. But in german, it would make no sense being spelled like [ex-age-tea-em-el], it should rather be [ix-hah-te-em-el]. Now what to do? Mark it up with lang="en" (as the expansion would be an english term) or lang="de" to ensure proper german spelling?


Anne van Kesteren:

You are right, I noticed this too with Mozilla. I hope screen readers are better in it, although I think not since they are all on top of IE, which is not quite good at web standards (was that an understatement?).

Maybe we should suggest te following for XHTML2.0 to the W3C:

Return hreflang and introduce titlelang _or_ give us a way to set the language in an aural style sheet.

Posted: 08/27/2003