WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Html Lang code for page

for

From: Birkir R. Gunnarsson
Date: Dec 22, 2015 5:21PM


Screen reader users can configure their screen reader to detect
webpage lang attributes and load the appropriate language or
synthesizer (if one is installed), this is the default setting for
most screen readers.
Users can also configure the screen reader to read all content with a
default language unless the user manually switches the screen reader
language.

I gave up on my screen reader language detection setting some time ago.
I subscribe to a number of European mailing lists, and I discovered
that many email programs apply the national language of the sender to
the email content, whilst most email communications on European
mailing lists takes place in English.
After trying to comprehend English emails using French, Spanish,
German, Swedish and Italian speech synthesizers I eventually gave up
on the auto detect language setting.

I am not encouraging people to leave out the language tag (this is the
easiest WCAG success criterion in my opinion), rather stressing the
importance of making sure the right language tag is used, and
reminding people that automated software can only detect the presence
of a language tag, but cannot determine if that tag is correct for the
content.
With all the language translation and analysis services out there this
is probably possible by now.
Cheers

-B


On 12/22/15, Patrick H. Lauke < <EMAIL REMOVED> > wrote:
> On 22/12/2015 17:01, Joseph Sherman 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 let me get this right: the developers are finding it too annoying to
> add a single lang attribute on the html element for 3.1.1
>
> <html lang="en">
>
> but they tend to follow 3.1.2, meaning that for each passage or phrase,
> they're explicitly specifying the language, so presumably doing
> something like
>
> <div lang="en">...</div>
> <p lang="en">...</div>
>
> etc? If they AREN'T doing the latter, then no they're not following
> 3.1.2 in that case (as in the absence of a default language set for the
> whole page, you must add it explicitly to every container/bit of content
> in order to still fulfill 3.1.2)...
>
> P
> --
> Patrick H. Lauke
>
> www.splintered.co.uk | https://github.com/patrickhlauke
> http://flickr.com/photos/redux/ | http://redux.deviantart.com
> twitter: @patrick_h_lauke | skype: patrick_h_lauke
> > > > >


--
Work hard. Have fun. Make history.