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

Re: 'role' should be property

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Wed, 23 May 2007 02:09:27 +0100
Message-ID: <640dd5060705221809o42128c98icad254daa30d239a@mail.gmail.com>
To: public-html@w3.org

Hi Patrick,

> I'd posit that it's more likely that an author might want to specify the
> role of any particular piece of content while they're actually authoring
> the content itself, i.e. the HTML. They write the content, then say
> "this is the footer".

In the same way that authors indicate on each level 1 header that they
would like it to have a green background? Of course not!

It's pretty standard stuff to use rules to create collections and then
set some properties on members of the collection. Most people are used
to doing that with properties like font size and background colour,
but there is no reason the same technique couldn't be used for other
things.

Also, note that one of the key ideas of CSS is the idea of
'cascading'--i.e., that you can override someone else's rules, or set
rules on a document that you don't have control over. So whilst an
author _might_ add this:

  <div role="note">
    ...
  </div>

  <div role="note">
    ...
  </div>

to set each note independently, it's also possible that the author wrote this:

  <div class="n1">
    ...
  </div>

  <div class="n2">
    ...
  </div>

With Dmitri's suggestion we could easily add a stylesheet that uses
the 'dynamic infoset' technique, and set each of these div's to be a
'note':

  div.n1, div.n2
  {
    role: note;
  }


> > The properties set by CSS rules are available via the DOM anyway, so
> > there is nothing to say that CSS must be about styling.
>
> Apart from the fact that CSS stands for Cascading *Style Sheets*
>
> "Cascading Style Sheets (CSS) is a simple mechanism for adding style
> (e.g. fonts, colors, spacing) to Web documents"
> http://www.w3.org/Style/CSS/
>
> Style...not content characteristics (such as role)...

No kidding, Sherlock. :) But I'm afraid you've missed the whole point.

First, anyone can add properties to CSS, and whilst the spec define
the syntax of these extra properties, it doesn't mandate how those
properties should be behave, so they need not be presentational at
all.

But the main point is that the discussion is about leveraging
_existing_ mechanisms to do new, useful things. The blog post and
paper I linked to explained how the underlying processing model that
is defined in the CSS specifications has broader significance for lots
of different things. Dmitri seemed to be coming to the same
conclusion, so I thought the links might be useful.

But I wasn't imagining that this would be the place for a broader
discussion on the issues.

Regards,

Mark

-- 
  Mark Birbeck, formsPlayer

  mark.birbeck@x-port.net | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.
Received on Wednesday, 23 May 2007 01:09:30 GMT

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