Re: content-072.htm is invalid

On Mon, Oct 25, 2010 at 2:06 PM, Arron Eicholz
<Arron.Eicholz@microsoft.com> wrote:
> On  Monday, October 25, 2010 1:28 PM Ian Hickson wrote:
>  > On Mon, 25 Oct 2010, Arron Eicholz wrote:
>> >
>> > All browsers I have tested seem to do attribute expansion for attribute
>> > selectors or they at least handle the expanded defined value. There is
>> > only 1 case I have found (content-072) where there is inconsistency.
>> > Note that all the cases below explicitly define a value of the same name
>> > as the attribute. These tests are not assuming that the user agent
>> > create/generate a value based on the attribute name. Even in HTML5
>> > boolean attributes are allowed to be specified with a value that is an
>> > ASCII case-insensitive match for the attribute's canonical name, with no
>> > leading or trailing whitespace. This means that content-072 should be
>> > valid even for HTML5.
>> >
>> > http://test.csswg.org/suites/css2.1/20101001/html4/content-072.htm
>>
>> This test is invalid as the attribute's value is the empty string. Every
>> browser I was able to test (Gecko, WebKit, Opera, and IE8) agree.
>
> It's not invalid per the HTML5 spec either. HTML5 allows the defer attribute to be defined as 'defer="defer"'. If it is defined that way, and it is in the case, then CSS not HTML defines how the attribute should be returned. And in the attr() case in CSS 2.1 if there is a defined value it attr() should return it and will then return the attribute value 'defer'. If the case just defined only the attribute name with no value, then yes, I would agree that this case is ambiguous and would require potential removal without changes to the case.

Are you looking at a different test?  The test linked above uses defer
without an explicit value - "<script defer
type="text/javascript"></script>".

Yes, if the element had "defer='defer'", then attr(defer) should
certainly return "defer".  That's not the case here.

~TJ

Received on Monday, 25 October 2010 21:20:55 UTC