Empty attribute syntax and the DOM and CSS

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>
<html>
<body>
<p><input type="submit" disabled></p>
</body>
</html>

Here's what the DOM says:

Firefox 1.5-3, Safari 3.1
     disabled=""
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
     disabled=""

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).
Everywhere
     [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 
represented.

Any enlightenment?

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