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

Case-sensitivity of attribute values wrt Selectors

From: Simon Pieters <simonp@opera.com>
Date: Sat, 05 Jan 2008 02:04:56 +0100
To: public-html <public-html@w3.org>
Message-ID: <op.t4fmmirfidj3kv@hp-a0a83fcd39d2.belkin>

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:


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  

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 Saturday, 5 January 2008 01:05:03 UTC

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