W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2003

Re: Upper case selectors

From: Matthew Smith <matt@kbc.net.au>
Date: Fri, 24 Oct 2003 20:32:42 +0930
Message-ID: <3F9906D2.3050004@kbc.net.au>
To: w3c-wai-ig@w3.org

R.S.V. wrote:
> A user, who visited a web that I designed, had sent an email to
> me, he says that my CSS code have an accessibility problem.
> My code is XTML 1.0 valid, and CSS valid. In the CSS, I have
> selectors like “DIV.uno”. He sent the follow paragraph of XHTML
> specification:

Whether or not this is accessible depends on how strict the user agent 
is at enforcing rules.  If you are using XHTML which is being validated 
against the DTD, all elements (tags) must be in lower case.  In an XML 
environment, the CSS should match what is in the XML, therfore your DIV 
(upper case) should be div (lower case).

If the user agent uses a validating XML parser, you may find that the 
stylesheet throws an error.  As Bill Mason points out, for 
accessibility, the page should work without stylesheets anyway.

I think that the sensible thing to do is simply to write everything in 
lower case.  You can use the Perl function lc() in combination with an 
XML or HTML parser to convert your files if there is too much to do 



Matthew Smith
Kadina Business Consultancy
South Australia
Received on Friday, 24 October 2003 07:02:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:26 UTC