W3C home > Mailing lists > Public > public-css-testsuite@w3.org > June 2004

Re: Error in CSS1 test §7.1 (CSS2 language selector)

From: Tantek Çelik <tantek@cs.stanford.edu>
Date: Fri, 11 Jun 2004 13:18:16 -0700
To: Ben Winslow <rain@bluecherry.net>, <public-css-testsuite@w3.org>
Message-ID: <BCEF615D.47C53%tantek@cs.stanford.edu>

On 6/11/04 1:02 PM, "Ben Winslow" <rain@bluecherry.net> wrote:

> 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

That part makes sense so far.


>     * User agent default values and user preferences.

But what does that mean?  It could mean anything.

Thus it is ambiguous, difficult (impossible?) to test, and has nothing to do
with the language of the document.


> Based on this, I am reverting to my original standpoint that Gecko's
> behavior is correct

Arguably compliant *maybe*, but certainly not "correct" by any reasonable
interpretation of what the :lang selector is supposed to select.


> and the test suite is in error.
> 
> Opinions?

Since logically that last bullet point doesn't make any sense (since it has
nothing to do with the document), the better course of action is to still
file the bug, but also point out the problem with the spec, and file an
errata against HTML4 (stating that last bullet point doesn't make sense and
should be stricken), or actually...


> [1] http://www.w3.org/TR/REC-html40/struct/dirlang.html#h-8.1.2

[2] http://www.w3.org/TR/html401/struct/dirlang.html#h-8.1.2
has the same problem.

Please refer to HTML4.01 instead of HTML4.0 because 4.01 contains many fixes
and errata.

In addition, it is good to check the HTML4.01 errata as well:

 http://www.w3.org/MarkUp/html4-updates/errata

New errata against HTML4.01 can be filed by sending an email to:

www-html-editor@w3.org

Thanks,

Tantek
Received on Friday, 11 June 2004 16:18:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:54 GMT