W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > April to June 1998

problem with class=dlink

From: nir dagan <dagan@upf.es>
Date: Wed Jun 3 11:29:02 1998
Message-Id: <199806031521.RAA08862@sahara.upf.es>
To: w3c-wai-gl@w3.org
There is a major problem with identifying dlinks via the class
attribute, for use by UAs.

The classification of elements by classes has a meaning only 
for author defined stylesheets or scripts. There are no 
reserved names for classes. UAs should apply style to classes
(e.g., display:none) only if the author specified it explicitely.

(technically users can do it too, but how should they 
know what a certain author defined class means. Thus a sensible 
user will never write a stylesheet with classes as selectors)

Assume I write a website about international affairs 
and have two classes of links "dlink" for domestic links, and 
"flink" for a foreign link. (I want them to have different colors)
Then comes some UA and doesn't show my domestic links because it came
up with its own meaning of "dlink".

In my view there is no general solution that will show the D-link
in old browsers and a longdesc in new ones.

Authors who write both D-link and longdesc run the risk that 
both are displayed. One way to reduce the risk (but not eliminate it)
is to use DOM to dynamically write a stylesheet with 
display:none to D-links, if the browser is identified as 
a longdesc-aware. Here an author may use the class attribute, 
as the _author_ specifies its style properties as well.

Nir Dagan.

Received on Wednesday, 3 June 1998 11:29:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 16 January 2018 15:33:27 UTC