Re: Use the role-attribute instead of predefined class names

Laurens Holst wrote:
>>    Secondly, using attributes for "subclassing" can be a descent into
>> madness:
>> | <div role="section article">...</div>
>> | <role="div section article">...</>
> That’s taking it too far obviously. The section types have in common 
> that they’re all sections. Div doesn’t really mean anything. A role 
> element means even less than div. I think you can hardly call it 
> ‘subclassing’ at that point.

It wasn't a role element, but an empty-named element (wtf?) with a role 
attribute. Frankly, I don't get what Matthew was trying to say there.

> Role just needs to be defined so that it’s very clear that it’s not an 
> equivalent of the class attribute.

If the current definition of the class attribute isn't clear in terms of 
that classes should be semantic, that can and should be fixed. 
Pre-defined classes can help there as good examples, btw. I also think 
risk of really breaking existing sites is low.


Received on Saturday, 7 April 2007 15:50:24 UTC