W3C home > Mailing lists > Public > public-html@w3.org > May 2007

Re: Applicable elements for predefined classnames

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Wed, 09 May 2007 07:31:47 -0400
Message-ID: <4641B123.4020303@earthlink.net>
To: Dão Gottwald <dao@design-noir.de>
CC: Rene Saarsoo <nene@triin.net>, "public-html@w3.org" <public-html@w3.org>

Dão Gottwald wrote:
> Rene Saarsoo schrieb:
>> Anyway, this list of applicable elements seems kind of
>> limiting. For example it seems natural, that I would like
>> to write an example of computer code, like this:
>>
>> <pre class="example">Some code...</pre>
>> or
>> <code class="example">Some code...</code>
>>
>> But predefined class "example" is only allowed for aside,
>> figure, p, section, span :(
> 
> For any other element, it would be equal to a freely chosen, unspec'd 
> class, no?

   Exactly. By specifying the particular situation where a class is most
likely to have a given semantic, we can associate semantics with that
class without causing problems in other circumstances where the class
may have a different meaning.

   Note that |role| is not immune to the problem of naming conflicts.

   Because new "roles" may be added in future HTML specifications,
earlier user agents will have to ignore unidentified roles so that they
can preserve graceful degradation for future HTML specs. Thus, people
may start using roles that are undefined for a given namespace (or use
undefined roles without namespaces). This is especially true of clueless
web authors who don't necessarily understand what |role| is:

| <p role="to tell a story">

   As a result, when HTML 6 comes along, we may run into the same
problems with |role| that we currently have with trying to create
predefined classes. Authors will have been using role names for purposes
slightly or even significantly different from what HTML6 would define
them for.

   Thus, |role| doesn't solve the problem of naming conflicts with
legacy content. It just delays dealing with the problem until the next
specification. At the same time, it prevents us from adding content to
existing class names in situations where it does no harm to do so.
(That's not to say that I'm convinced that classes or roles should have
predefined semantics in the HTML specification to begin with, but that's
a separate issue.)
Received on Wednesday, 9 May 2007 11:28:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:58 GMT