Re: CLASS and ROLE

On Tue, 17 Apr 2007 08:58:45 +0200, José Manuel Cantera Fonseca  
<jmcf@tid.es> wrote:

> The class attribute has
> presentational connotations but not semantic connotations.

Actually that is not the case. Although the major user of @class is CSS,  
the definition of class says:

"The class attribute has several roles in HTML:
* As a style sheet selector (when an author wishes to assign style  
information to a set of elements).
* For general purpose processing by user agents."
http://www.w3.org/TR/html401/struct/global.html#adef-class

So this use is "general purpose processing". Microformats use it in a  
similar way, and there are several other processing programs that I have  
come across that use class in a similar way, to convey extra meaning.

	<div class="note">

is about meaning, not about presentation (even if there is a stylesheet  
that uses that class).

> You are mixing things
> in a very dangerous and confusing manner.

I think the confusion is likely to arise because most people have  
forgotten about that line "For general purpose processing by user agents",  
and think it is something to do with CSS.

> Regarding the role attribute the same comment applies. Role attribute has
> connotations related to accessibility but not to semantics.

Again, this is not the case either. @role was *designed* to convey extra  
semantics about an element, that amongst other things would be very useful  
for accessibility.

But look at http://www.w3.org/WAI/PF/GUI/roleTaxonomy-20060221.html
The abstract *says* that it is about semantics, that is being used in this  
case for accessibility. In fact there is even a "note" value to role,  
especially to indicate that an element represents extra information on a  
page.

Received on Tuesday, 17 April 2007 17:11:32 UTC