WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Html Lang code for page

for

From: Adrian Roselli
Date: Dec 22, 2015 10:14AM


Joseph,

I tracked a bunch of ways that lang is used on a page [1]:

' VoiceOver on iOS uses the attribute to auto-switche 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.

Frankly, I believe it should be on every page. Since it can be set in a
global template, it should be a matter of setting it once and not worrying
until you find a rare case where you have to override it (which is good).

1: http://adrianroselli.com/2015/01/on-use-of-lang-attribute.html


On Tue, Dec 22, 2015 at 12:01 PM, Joseph Sherman < <EMAIL REMOVED> >
wrote:

> I know 3.1.1 The default human language of each Web page can be
> programmatically determined, but my web folk find this annoying on every
> page and web app, since it is all primary language English, and they tend
> to follow 3.1.2 for language of parts.
>
> So question: Is 3.1.1 really critical in most cases? Is there a good
> reason I can offer for using it on every page? What happens when a Spanish
> screen reader user comes to an English page without a lang attribute? Does
> the software know to read in English?
>
>
> Joseph
>
> > > > >