Absent lang on Root Element (4th August 2007)

(Commenting on Hidden barriers - bad language from RNIB’s Web Access Centre Blog. My comment was causing a Connection was reset error.)

But where no natural language is defined, when the content on the page goes back to the natural language, the screen reader has no natural language to revert to, and so it may carry on using the current rules for pronunciation.

That’s a bug in the device. The device is supposed to change back to the lang it used for the parent element after the element with a different lang has ended. Even if it guessed what the value should be.

Supplying a lang on the root element of the page is a good idea, though. It makes the initial language selection easier for devices accessing the page.

Jack, in that particular example “vista” will only be pronounced correctly if you set lang and the UA understands it. It will sound like a recently released operating system unless both those things happen! Also, the “h” in “hasta” is somewhat silent in the correct pronunciation but would probably be spoken in English.

Correct pronunciation is reason enough to mark up such changes, imho.

I think <i lang> is sane for words in foreign languages and HTML5 might make this official. But <span lang> does the job, too.