On Use of the lang
Attribute
Adrian has put together a great overview of why lang
is important and how many sites are using it. Here are a few takeaways:
- VoiceOver on iOS uses the attribute to auto-switch voices.
- VoiceOver can speak a particular language using a different accent when specified.
- Leaving out the `lang` attribute may require the user to manually switch to the correct language for proper pronunciation.
- JAWS uses it to load the correct phonetic engine/phonologic dictionary — Handy for sites with multiple languages.
- NVDA (Windows) uses it in the same way as VoiceOver and JAWS.
- When used in HTML that is used to form an ePub or Apple iBooks document, it affects how VoiceOver will read the book.
- Firefox, IE10, and Safari (as of a year ago) only support CSS `hyphens: auto` when the `lang` attribute is set.
Thanks for putting this together Adrian!