[whatwg] 2.20.2 The command element - icon attribute
Ian Hickson
ian at hixie.ch
Mon Aug 6 16:18:40 PDT 2007
On Wed, 1 Mar 2006, ROBO Design wrote:
>
> "2.20.2 The command element" section [1] defines the icon attribute.
> Also, by looking into the source code of the WA 1.0 specification, I saw
> there's an interest in having the icon attribute for menu items and
> inputs alike.
>
> I'd highly recommend not to define the icon attribute, or any other
> attribute with possible relation to presentation. This fuels accusations
> that what this specification defines is not "as semantical as" the XHTML
> 2 specification (I've read some "WHATWG bashing" in some blog posts).
>
> Defining icons and other presentational endeavours must definitely be
> left to CSS WG.
Certainly we have to let CSS override any icons we allow in the HTML
markup (e.g. using the 'icon' property).
> Lets take the icon. Designers would immediately want to define the
> positioning of the icon: top, right, bottom, left - in pixels, percents,
> etc - similar to background position. Then they'll "hack" into the DOM
> to change the icon on hover, and do some more.
>
> All this stuff must be defined by the CSS WG.
I agree that that stuff belongs in CSS.
> The WA 1.0 "loosely" defines the icon attribute. That's not an attribute
> of a semantical value, it's for a pure presentational purpose.
Well, sort of. It's part of the content, in the same way that the favicon
is part of the content, or the same way that a company's logo is part of
the content, or the menu label is part of the content -- it's a way for
the user to recognise what they are interacting with.
> If Ian Hickson really wants to define the icon attribute in the spec,
> then he should go further and offer complete customization over the way
> the icon is rendered.
>
> Or should the icon render as normal icons render in the default chrome
> of the user agent (most likely of the OS)?
>
> If that's the case, designers won't be happy either (neither myself,
> being a designer too). We always like to do different designs.
The icon provided in the markup is the default icon, for integration with
the OS-default rendering. The CSS layer can then be used to change the
presentation of this icon, or to replace it wholesale.
> That being said: remove the icon attribute, or please go further and
> explain to me (and all this mailing list readers) why it's a *must* for
> this spec. Also, please provide some use cases, for semantical purpose
> (not just presentational).
If you look at almost any user interface today you'll see that regardless
of the look and feel of the menus, many menu items have icons representing
their behaviour. I think that even when you haven't specified the
presentation (i.e. even without CSS) you'll still want to specify some
icons for some of the actions, just like you'd want to include images in
a report, for instance.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list