Re: Upper case selectors

R.S.V. wrote:

> “C.13. Cascading Style Sheets (CSS) and XHTML
> The Cascading Style Sheets level 2 Recommendation [CSS2] defines
> style
> properties which are applied to the parse tree of the HTML or
> XML documents.
> Differences in parsing will produce different visual or aural
> results,
> depending on the selectors used. The following hints will reduce
> this effect
> for documents which are served without modification as both
> media types:
> 
> 1. CSS style sheets for XHTML should use lower case element and
> attribute
> names.
> 2. ..."
> 
> The link to style sheet on my page haven’t media declaration:
> <link rel="stylesheet" href="xxx.css" title="estilobase"
> type="text/css" />
> 
> Is it an accessibility problem for anyone, now?
> What about the future?
> If it’s an accessibility problem, which priority is it?

I doubt very much there is any problem right now unless you are serving 
XHTML pages as application/xhtml+xml to those user agents that support 
it.  (The MIME types of text/html vs. application/xhtml+xml are the 
"media types" at issue here I believe, not any media type on the CSS.)

If one is serving XHTML as application/xhtml+html, then a CSS selector 
that specifies an XHTML tag must be in the same case as the XHTML tag in 
the XHTML source code.  For example, given that XHTML tags are lower 
case, something like this:

P {
   background : #FFFFCC;
}

would not show any style in a user agent supporting 
application/xhtml+html, because of the case sensitivity.  A <p> tag in 
the XHTML and a P selector in the CSS are not the same.  Currently 
Mozilla and Opera 7.2 follow that rule when rendering 
application/xhtml+xml pages.

Whether or not "lost" styling due to such an error in coding constitutes 
an accessibility issue is debatable, since in theory the content of your 
pages should already be usable even in the absence of all styling.
-- 
Bill Mason
Accessible Internet
w3c@accessibleinter.net
http://www.accessibleinter.net/

Received on Friday, 24 October 2003 03:24:46 UTC