[whatwg] Semantic styling languages in the guise of HTML attributes.

Matthew Raymond mattraymond at earthlink.net
Fri Dec 22 04:36:36 PST 2006


Benjamin Hawkes-Lewis wrote:
> Leons Petrazickis wrote:
>> I think what's wanted is a Cascading Semantics Language.
> 
> I'm baffled. Why do we want this? What would it allow us to do?

   There are people who posted ideas about semantic properties for CSS
on the www-style mailing list. They would likely be ecstatic about
turning CSS into a cascading semantics language. Personally, this would
be a greater nightmare than the |role| attribute.

   However, global attributes like |role| aren't much better. Attributes
should specify the details of semantics that elements already possess.
For example, |type| on an <input> element specifies the type of input.
One of the example of the |role| attribute shows how you can provide
values like "checkbox" to elements like <span>. I can understand
assigning values such as these to DHTML container elements for
accessibility purposes (and that might be a legitimate reason to create
something like a global "accessrole" attribute or something similar),
but |role| does not define any such limitations.

   Generally, though, this is just math. For every attribute or role you
have that can apply to ALL elements, you have the semantics of all those
 elements to interact with, plus you have interactions between an
indefinite number of global attributes that may be defined on that
element. Without some sort of scope limitation, you can't possible
define how the semantics of everything interacts. Think about the
conversation regarding how simple nested elements in HTML interact with
their parents and increase the complexity by several orders of magnitude.



More information about the whatwg mailing list