problem with class=dlink

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.

Regards,
Nir Dagan.

http://www.econ.upf.es/%7Edagan/

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