W3C home > Mailing lists > Public > public-html@w3.org > January 2008

Re: Case-sensitivity of attribute values wrt Selectors

From: Simon Pieters <simonp@opera.com>
Date: Tue, 08 Jan 2008 21:05:06 +0100
To: "Niels Leenheer" <niels.leenheer@gmail.com>
Cc: public-html <public-html@w3.org>
Message-ID: <op.t4mnesisidj3kv@hp-a0a83fcd39d2.belkin>

On Mon, 07 Jan 2008 10:13:16 +0100, Niels Leenheer  
<niels.leenheer@gmail.com> wrote:

> Just a couple of additions:
> - The behavior of Konqueror is similar to Gecko and Opera
> - Webkit behavior was changed to match the others yesterday:
>   http://bugs.webkit.org/show_bug.cgi?id=15470
> Cheers,
> Niels Leenheer


It seems that WebKit now has the same set of attributes as Mozilla, treats  
them ASCII case-insensitively for HTML elements and only in text/html. Now  
add ismap='' to that list and make it behave the same in  
application/xhtml+xml... :-)

> On Jan 5, 2008 2:04 AM, Simon Pieters <simonp@opera.com> wrote:
>> HTML 5 should define which attribute values should be treated
>> case-insensitively with regards to Selectors, and whether that's ASCII
>> case-insensitively or Unicode case-insensitively.
>> I tested what browsers do:
>>    http://simon.html5.org/test/selectors/case-sensitivity/
>> IE7 treats all attribute values case-sensitively.
>> When the document is served as XML, all attribute values are
>> case-sensitive in Opera, Firefox and Safari.
>> When the document is served as text/html:
>> In Opera, for any HTML element, a given set of attributes (see below)  
>> are
>> treated Unicode case-insensitively.
>> In Firefox, for any element (including non-HTML elements), a given set  
>> of
>> attributes (see below) are treated Unicode case-insensitively.
>> In Safari, for any element (including non-HTML elements), all attributes
>> are treated ASCII case-insensitively.
>> The set of attributes is (assuming I haven't missed some attribute to
>> test):
>> accept, charset, disabled, align, alink, axis, bgcolor, charset, clear,
>> codetype, color, compact, declare, defer, dir, disabled, enctype, face,
>> frame, hreflang, http-equiv, ismap (missing in Firefox), language, link,
>> media, method, multiple, noresize, noshade, nowrap, readonly, rel, rev,
>> rules, scope, scrolling, selected, shape, target, text, type, valign
>> (missing in Opera), valuetype, vlink.
>> Also see: http://rakaz.nl/item/css_selector_bugs_case_sensitivity
>> Personally, I think that whether the document was served as XML or
>> text/html shouldn't matter here, and that the same set of attributes
>> should be treated case-insensitively for both HTML and XHTML. Moreover,  
>> I
>> think the set of attributes should only apply for elements in the HTML
>> namespace (like in Opera). I don't mind that the set of attributes  
>> applies
>> to all elements in the HTML namespace.

Simon Pieters
Opera Software
Received on Tuesday, 8 January 2008 20:05:20 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:25 UTC