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

On 6/11/04 1:02 PM, "Ben Winslow" <> wrote:

> On Wed, 2004-06-09 at 15:20, Tantek Çelik wrote:
>> On 6/9/04 8:24 AM, "Ben Winslow" <> 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]

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:

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



Received on Friday, 11 June 2004 16:18:26 UTC