- From: Ben Winslow <rain@bluecherry.net>
- Date: Fri, 11 Jun 2004 16:02:51 -0400
- To: public-css-testsuite@w3.org
- Message-Id: <1086984171.21478.27.camel@portal.home>
On Wed, 2004-06-09 at 15:20, Tantek Çelik wrote:
> On 6/9/04 8:24 AM, "Ben Winslow" <rain@bluecherry.net> wrote:
> I disagree. The tests do not rely on the document language. The tests make
> sure that the document language isn't incorrectly inferred/assumed.
> > I'm using a Gecko-based UA, and it appears that Gecko will match the
> > :lang pseudo-class using the languages configured for Accept-Languages
> > (pref intl.accept_languages) in the absence of a document-specified
> > language. This seems like an acceptable behavior,
>
> That is not acceptable behavior and is a bug.
>
> Accept-Language is purely a client preference and has nothing to do with the
> document.
>
> There are only two ways I know of offhand that the document language can be
> inferred.
>
> 1. HTTP Header *response* Content-Language field
> (or the <meta> http-equiv equivalent)
> 2. 'lang' attribute on an element, or if absent, the nearest ancestor with a
> 'lang' attribute, and if none, then inferred from 1.
While preparing a bug report for Mozilla, I noticed the last bullet in
the HTML 4.0 spec (§8.1.2 [1]) which I had previously overlooked. The
section defines the inheritance hierarchy for language information as
follows:
An element inherits language code information according to the following
order of precedence (highest to lowest):
* The lang attribute set for the element itself.
* The closest parent element that has the lang attribute set
(i.e., the lang attribute is inherited).
* The HTTP "Content-Language" header (which may be configured in a
server). For example:
Content-Language: en-cockney
* User agent default values and user preferences.
Based on this, I am reverting to my original standpoint that Gecko's
behavior is correct and the test suite is in error.
Opinions?
[1] http://www.w3.org/TR/REC-html40/struct/dirlang.html#h-8.1.2
--
Ben Winslow <rain@bluecherry.net>
Received on Friday, 11 June 2004 16:02:56 UTC