WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: This week's article: Content Language

for

Number of posts in this thread: 14 (In chronological order)

From: Karl Dawson
Date: Mon, Jan 23 2006 6:00AM
Subject: This week's article: Content Language
No previous message | Next message →

Hi All,

Week 3 and I've finally arrived at the <html> tag in my "From the Top"
series of articles.

From the Top: Content
Language<http://www.thatstandardsguy.co.uk/2006/01/23/content-language/>;

The article concisely explains what, why and how to write an
accessibility-enhancing <html> tag.

Feel free to comment :-)

Regards,

--
Karl Dawson
Crusader for Web Standards and Accessibility
http://www.thatstandardsguy.co.uk
--------------------------------------------------
Accessites Team Member - http://www.accessites.org/
--------------------------------------------------

"The power of the Web is in its universality. Access by everyone regardless
of disability is an essential aspect."
Tim Berners-Lee - W3C Director and inventor of the World Wide Web



From: Dejan Kozina
Date: Mon, Jan 23 2006 7:00AM
Subject: Re: This week's article: Content Language
← Previous message | Next message →

I'm replying off the top of my mind, so expect me to blunder regarding
the correct terminology...

The lang attribute of the html element can have one language only
declared. If the document is a multilanguage one (say a splash page on a
multilingual website where you ask the visitor to choose his/her
language) and you can't or won't select one language as primary (think
countries with more that one official language, say Canada or Belgium)
you can left this one out and mark directly the relevant sections of the
page with their own lang attributes.

There is also a 'Content-Language' HTTP header (with optionally the
relative 'meta http-equiv' element)describing the languages in which the
document is revevant: this one accepts a comma separated list of languages.

djn

Karl Dawson wrote:
> From the Top: Content Language
> <http://www.thatstandardsguy.co.uk/2006/01/23/content-language/>;
>
--
Dejan Kozina
Dolina 346 (TS) - I-34018 Italy
tel./fax: +39 040 228 436 - cell.: +39 348 7355 225
http://www.kozina.com/ - e-mail: = EMAIL ADDRESS REMOVED =




From: Karl Dawson
Date: Mon, Jan 23 2006 7:15AM
Subject: Re: This week's article: Content Language
← Previous message | Next message →

On 23/01/06, Dejan Kozina < = EMAIL ADDRESS REMOVED = > wrote:
>
> I'm replying off the top of my mind, so expect me to blunder regarding
> the correct terminology...
>
> The lang attribute of the html element can have one language only
> declared. If the document is a multilanguage one (say a splash page on a
> multilingual website where you ask the visitor to choose his/her
> language) and you can't or won't select one language as primary (think
> countries with more that one official language, say Canada or Belgium)
> you can left this one out and mark directly the relevant sections of the
> page with their own lang attributes.


Yes, that's a good example for exemption. In the case of an unbiased
multi-lingual page - like the splash page you describe then it would be
beneficial to specify the lang attribute further down the document
heirarchy. The higher the better to save writing it out too many times.

The W3C provide this
advice<http://www.w3.org/TR/i18n-html-tech-lang/#ri20040728.121403792>;
.



There is also a 'Content-Language' HTTP header (with optionally the
> relative 'meta http-equiv' element)describing the languages in which the
> document is revevant: this one accepts a comma separated list of
> languages.
>
> djn
>
> Karl Dawson wrote:
> > From the Top: Content Language
> > <http://www.thatstandardsguy.co.uk/2006/01/23/content-language/>;
> >
> --
> Dejan Kozina
> Dolina 346 (TS) - I-34018 Italy
> tel./fax: +39 040 228 436 - cell.: +39 348 7355 225
> http://www.kozina.com/ - e-mail: = EMAIL ADDRESS REMOVED =
>
>
>
>

Regards,
--
Karl Dawson
Crusader for Web Standards and Accessibility
http://www.thatstandardsguy.co.uk
--------------------------------------------------
Accessites Team Member - http://www.accessites.org/
--------------------------------------------------

"The power of the Web is in its universality. Access by everyone regardless
of disability is an essential aspect."
Tim Berners-Lee - W3C Director and inventor of the World Wide Web



From: Jukka K. Korpela
Date: Mon, Jan 23 2006 8:30AM
Subject: Re: This week's article: Content Language
← Previous message | Next message →

On Mon, 23 Jan 2006, Karl Dawson wrote:

> The article concisely explains what, why and how to write an
> accessibility-enhancing <html> tag.

First, when posting to the list, please use plain text in US-ASCII.
Using UTF-8 (for English text) and inaccessible pseudo-HTML helps nobody
and harms some people and E-mail software.

Second, don't overestimate the practical impact of language markup (it is
very small), don't confuse it with the XHTML issue (there is no tangible
benefit from using XHTML as distribution format on the WWW), and don't
confuse language issues with the xmlns attribute, which is XHTML issue
and thus irrelevant. Oh, and don't bother mentioning dir="ltr", which is
the declared default in HTML.

This leaves rather little. It's a good idea to declare the language
in the <html> tag, and in any major portion of text in another language in
the content, but this very little practical impact at present.

I wouldn't refer to W3C recommendations on this issue, since the WAI
guidelines require that you indicate _all_ language changes in document
content - yet the W3C itself fails to do this but visibly claims
conformance to WAI guidelines. (Language changes include all occurrence of
proper names in foreign languages. Nobody uses markup for them, so why
do they set up guidelines that require so and violate this in the
guidelines themselves?)

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/





From: Rimantas Liubertas
Date: Mon, Jan 23 2006 8:45AM
Subject: Re: This week's article: Content Language
← Previous message | Next message →

<...>
> There should be no splash pages.
<...>
> Say no to bilingual pages.
<...>
http://www.cs.tut.fi/~jkorpela/

Whatever.
(But you might want to fix this: <td lang="en" style="padding-left:1em">
<h1>Datatekniikka ja viestint

From: Jukka K. Korpela
Date: Mon, Jan 23 2006 9:00AM
Subject: Re: This week's article: Content Language
← Previous message | Next message →

On Mon, 23 Jan 2006, Dejan Kozina wrote:

> The lang attribute of the html element can have one language only
> declared.

By definition, yes.

> If the document is a multilanguage one (say a splash page on a
> multilingual website where you ask the visitor to choose his/her
> language)

There should be no splash pages.

> and you can't or won't select one language as primary (think
> countries with more that one official language, say Canada or Belgium)

Any choice for primary is better than a splash page. Besides, you can use
language negotiation at the HTTP level to decide on the primary language
according to user preferences as expressed by the browser. See
http://www.cs.tut.fi/~jkorpela/multi/

> you can left this one out and mark directly the relevant sections of the
> page with their own lang attributes.

No, the lang attribute should not be omitted from <html>. Instead, a
bilingual document should have one language there and the other language
in lang attributes for the elements in that other language.

There should normally be no _sections_ in another language. Links to
versions in other languages can hardly be classified as sections.

Say no to bilingual pages. They confuse people and alienate them. Even in
a "bilingual" country, most people find text in the other language at
least mildly disturbing when it appears along with a text in their native
language. Sometimes brochures and booklets are bilingual to reduce costs,
but there's no reason to repeat the idea on the WWW. Just write two
monolingual pages and link them to each other. (Rare exceptions include
dictionaries and scholarly works containing quotations in other than the
main language.)

> There is also a 'Content-Language' HTTP header (with optionally the relative
> 'meta http-equiv' element)describing the languages in which the document is
> revevant: this one accepts a comma separated list of languages.

I have yet to see any evidence of actual use of that header by browsers.
I haven't seen it much in actual HTTP headers either. I know that web page
creation software spits out meta tags containing imitations of such
headers, but it seems to be pointless technobabble.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/





From: Karl Dawson
Date: Mon, Jan 23 2006 9:15AM
Subject: Re: This week's article: Content Language
← Previous message | Next message →

On 23/01/06, Jukka K. Korpela < = EMAIL ADDRESS REMOVED = > wrote:
> On Mon, 23 Jan 2006, Karl Dawson wrote:
>
> > The article concisely explains what, why and how to write an
> > accessibility-enhancing <html> tag.
>
> First, when posting to the list, please use plain text in US-ASCII.
> Using UTF-8 (for English text) and inaccessible pseudo-HTML helps nobody
> and harms some people and E-mail software.

I tried this at WSG and it borked the summary page on the website with
a long URL *shrug*


> Second, don't overestimate the practical impact of language markup (it is
> very small), don't confuse it with the XHTML issue (there is no tangible
> benefit from using XHTML as distribution format on the WWW), and don't
> confuse language issues with the xmlns attribute, which is XHTML issue
> and thus irrelevant.

No it isn't, read comment 3:
"The article is about writing a complete tag. If you are writing a
document in XHTML then you need to include the xml namespace too. I
added it for completeness." I am rapidly finding that these articles
are more trouble than they are worth - at least advertising them on
lists where people form an opinion then read in that context. If I
hadn't mentioned the namespace someone would have opined that omission
too :(

Oh, and don't bother mentioning dir="ltr", which is
> the declared default in HTML.

International audience. Leave nothing to assumption?

> This leaves rather little.

Cheers.

It's a good idea to declare the language
> in the <html> tag, and in any major portion of text in another language in
> the content, but this very little practical impact at present.
>
> I wouldn't refer to W3C recommendations on this issue, since the WAI
> guidelines require that you indicate _all_ language changes in document
> content - yet the W3C itself fails to do this but visibly claims
> conformance to WAI guidelines. (Language changes include all occurrence of
> proper names in foreign languages. Nobody uses markup for them, so why
> do they set up guidelines that require so and violate this in the
> guidelines themselves?)

This is as daft as ignoring speed limits because the cops do. I try my
best and that's the whole point of aiming for best practice?

>
> --
> Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
>
>
>
>
>

--
Karl Dawson
Crusader for Web Standards and Accessibility
http://www.thatstandardsguy.co.uk
--------------------------------------------------
Accessites Team Member - http://www.accessites.org/
--------------------------------------------------

"The power of the Web is in its universality. Access by everyone
regardless of disability is an essential aspect."
Tim Berners-Lee - W3C Director and inventor of the World Wide Web



From: Jukka K. Korpela
Date: Mon, Jan 23 2006 9:30AM
Subject: Re: This week's article: Content Language
← Previous message | Next message →

On Mon, 23 Jan 2006, Rimantas Liubertas wrote:

>> Say no to bilingual pages.
> <...>
> http://www.cs.tut.fi/~jkorpela/

Exactly. Once you have set up a bilingual page, it will become difficult
to get rid of it, so just don't get started.

> As for "should be no splash pages" - IIRC in Canada they are required
> in some cases.

There might be such requirements; there are many "accessibility
requirements" that considerably reduce accessibility (such as
requirements on accesskey assignments). You will then need to decide
whether you can break them or not. As long as nobody tells you about them
and actually threatens you with something to enforce them, you can ignore
them.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/





From: John Foliot - WATS.ca
Date: Mon, Jan 23 2006 9:45AM
Subject: RE: This week's article: Content Language
← Previous message | Next message →

Jukka K. Korpela wrote:
> There should be no splash pages.
> Any choice for primary is better than a splash page. Besides, you can
> use
> language negotiation at the HTTP level to decide on the primary
> language
> according to user preferences as expressed by the browser. See
> http://www.cs.tut.fi/~jkorpela/multi/

Jukka, sorry but that is not always practical or feasible. By law in
Canada, each citizen must have the choice of either English or French
content when dealing with the Federal Government (and further, from
every page). While HTTP header and browser preference selection is the
optimal solution, how do you propose addressing public access terminals
which may be "locked down" in terms of these types of preference
settings?

Canadian government standards mandate that a direct link to the
equivalent alternate language page is directly available on every page -
The English document is linked to the French and vice-versa. The
initial "splash page" primarily allows users to choose the language
stream of their choice, and under certain circumstances may be the only
way of doing so. Beyond that, each page is to be in the primary
"language of choice" (unilingual), again this is mandated by our
language laws as much as any "web standard". I have seen some GoC
(Government of Canada) sites that set a language preference cookie for
repeat visits (and I will not comment directly on that - YMMV).

> Say no to bilingual pages. They confuse people and alienate them.
> Even in
> a "bilingual" country, most people find text in the other language at
> least mildly disturbing when it appears along with a text in their
> native
> language.

*HOWEVER*, if you have no choice, then please by all means ensure that
the appropriate lang attribute be used. This is of particular
importance for users of screen reading technology - the latest and
greatest can now "switch" language files on-the-fly, improving
pronunciation drastically: For example, in Canada, that persistent link
to the French content would (should) be marked as:

<a.href="*_fr.html" lang="fr">Fran

From: Jukka K. Korpela
Date: Mon, Jan 23 2006 10:15AM
Subject: Re: This week's article: Content Language
← Previous message | Next message →

On Mon, 23 Jan 2006, Karl Dawson wrote:

"The article is about writing a complete tag.

Well, if you wish to say _everything_ about the <html> tag, you should
also consider its omissibility (in pre-XHTML HTML) and the attributes
id (in XHTML) and version (up to and including HTML 4.01). That would not
be relevant to accessibility, but neither is the xmlns attribute.

> I am rapidly finding that these articles
> are more trouble than they are worth

I won't argue with you on that.

> at least advertising them on
> lists where people form an opinion then read in that context.

When you advertize something on a list about accessibility, don't be
surprised at being evaluated from the accessibility point of view.

>> Oh, and don't bother mentioning dir="ltr", which is
>> the declared default in HTML.
>
> International audience. Leave nothing to assumption?

It's not an assumption, it's the defined default. Although there is no
specific principle "don't explicitly specify the default" in HTML
(as there is in some Internet contexts), it's not useful either, and
it may confuse authors. People may start thinking they _must_ include the
dir attribute, and then they mistype it.

(For right to left scripts, dir="rtl" _is_ generally useful. But that's a
different issue.)

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/





From: Jukka K. Korpela
Date: Mon, Jan 23 2006 10:30AM
Subject: RE: This week's article: Content Language
← Previous message | Next message →

On Mon, 23 Jan 2006, John Foliot - WATS.ca wrote:

> Jukka K. Korpela wrote:
>> There should be no splash pages.
>> Any choice for primary is better than a splash page. Besides, you can
>> use
>> language negotiation at the HTTP level to decide on the primary
>> language
>> according to user preferences as expressed by the browser. See
>> http://www.cs.tut.fi/~jkorpela/multi/
>
> Jukka, sorry but that is not always practical or feasible.

I know that, and it's actually explained on those pages, though naturally
I have covered just part of the topic.

> By law in
> Canada, each citizen must have the choice of either English or French
> content when dealing with the Federal Government

That's fine. We have a similar law in Finland, though not explicitly for
web pages (and excluding

From: John Foliot - WATS.ca
Date: Mon, Jan 23 2006 11:15AM
Subject: RE: This week's article: Content Language
← Previous message | Next message →

Jukka K. Korpela wrote:
> That's fine. We have a similar law in Finland, though not explicitly
> for
> web pages (and excluding

From: Jukka K. Korpela
Date: Mon, Jan 23 2006 1:15PM
Subject: RE: This week's article: Content Language
← Previous message | Next message →

On Mon, 23 Jan 2006, John Foliot - WATS.ca wrote:

> Standard 7.5 (http://www.tbs-sct.gc.ca/clf-nsi/inter/inter-07-05_e.asp)

I have difficulties in finding out what the "standard" is. Is it something
defined by the national standards body, or a rule issued by some
government body, or part of the law? But probably government officials are
more or less forced to comply with it.

> All Web pages on all GoC Web sites must incorporate navigational buttons

Good grief - they really require buttons that contain the names of the
languages, rather than semantics links. It seems to be a rather direct
consequence of the ideological principle about equal emphasis on the
languages. I wonder why they still allow the English button to appear
_first_ (i.e., on the left), instead of requiring a randomized order. :-)

> (a) Language buttons on Welcome pages must be displayed in the manner
> indicated to ensure visual equality and continuity.

So they _require_ splash pages, i.e. intentional obstacles.

> (b) Language navigation buttons on all Content Pages of bilingual Web
> sites must be incorporated in the common menu bar. The language button
> must hyperlink directly to the identical content in the alternate
> official language.

This sounds reasonable, except for the buttonism. If I stumble across a
page in English e.g. by following a link somewhere, perhaps after a
Google search, then I have _no_ idea of where I am except through my
understanding of English. (Well, the government logo is bilingual, so I
know I'm on Canada pages.) My point is that this is poor bilingualism,
since there is no hint in the other language about the content of the
page.

On the positive side, the policy seems to be against bilingual pages, in
favor of bilingual sites consisting of interlinked monolingual pages.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/




From: Dejan Kozina
Date: Mon, Jan 23 2006 4:45PM
Subject: Re: This week's article: Content Language
← Previous message | No next message



Jukka K. Korpela wrote:
> There should be no splash pages.
Well, I admit 'splash' was an unfortunate shorthand for a starting page
allowing the visitor to get a summary of the website in more than one
language and proceed further by choosing his preferite language (rest
assured I wasn't suggesting an overweight Flash animation dancing all
around the screen estate :-).
By the way, when you use a multilingual CMS to serve content it just
makes sense to have visitors choose a language as soon as they come along...

> Any choice for primary is better than a splash page. Besides, you can
> use language negotiation at the HTTP level to decide on the primary
> language according to user preferences as expressed by the browser.
Letting the user choose for himself is still the most foolproof way. The
percent of people that know that their browser is configurable at all is
getting smaller by the day.

> No, the lang attribute should not be omitted from <html>. Instead, a
> bilingual document should have one language there and the other
> language
> in lang attributes for the elements in that other language.
I'll defer to the W3C here:
http://www.w3.org/TR/i18n-html-tech-lang/#ri20040728.121403792

> Say no to bilingual pages. They confuse people and alienate them. Even
> in a "bilingual" country, most people find text in the other language
> at
> least mildly disturbing when it appears along with a text in their
> native language.
Well, there are places where the visitor will be strongly alienated if
you choose the wrong language to welcome him, and I happen to live in one...
Letting them choose is a way to play it safe. As for those disturbed by
a language not their own, well, as I belong to an ethnic minority I'm
daily made aware of people going nuts if they only happen to hear my
language spoken on the street (to which they sometimes react with racist
agressions), so I don't particularly care if they're disturbed...


All said, the real world has a way all of its own of getting in the way...

djn


--
Dejan Kozina
Dolina 346 (TS) - I-34018 Italy
tel./fax: +39 040 228 436 - cell.: +39 348 7355 225
http://www.kozina.com/ - e-mail: = EMAIL ADDRESS REMOVED =