W3C home > Mailing lists > Public > public-html@w3.org > June 2008

Empty attribute syntax and the DOM and CSS

From: Daniel Schattenkirchner <schattenkirchner.daniel@gmx.de>
Date: Sun, 22 Jun 2008 13:16:29 +0200
Message-ID: <485E348D.6090809@gmx.de>
To: public-html@w3.org

I wonder how empty attributes are represented in the DOM and how they 
should work with CSS. Take a look at the example code:

<!doctype html>
<p><input type="submit" disabled></p>

Here's what the DOM says:

Firefox 1.5-3, Safari 3.1
Internet Explorer 7, 8 Beta 1
     disabled="true" (same even if the source says disabled="disabled")
Opera 9.27
     DISABLED="DISABLED" (same for any disabled=value).
Opera 9.5

And that's what the CSS engine is thinking:

Firefox 1.5-3, Safari 3.1
     Only [disabled=""] works (same as the DOM).
Internet Explorer 7, 8 Beta 1
     Nothing but [disabled] works.
Opera 9.27
     Only [disabled=true] works.
Opera 9.5
     Only [disabled=""] works (same as the DOM).
     [disabled] works fine.

It's an unimportant edge case, but if I didn't miss the relevant parts 
in the draft, it is undefined how <element disabled /> should be 

Any enlightenment?
Received on Sunday, 22 June 2008 11:16:59 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:32 UTC