W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2005

[whatwg] WA1: <li> processing

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 23 Aug 2005 18:56:09 -0400
Message-ID: <430BA989.3020500@inkedblade.net>
# If the attribute's value cannot be converted to a number, it is treated
# as if the attribute was absent. The attribute has no default value.

"The attribute's value is treated as if the attribute was absent" doesn't
make a whole lot of sense to me. Did you mean a different 'it'?

# The value attribute is processed by the parent ol element, if there is one.
# If there is not, the attribute has no effect.

The first sentence makes no sense. What does it mean for an element to
"process" another element's attribute? I thought the UA processed the
attributes.

Is the second sentence meant to imply that when the parent is not <ol>
the value DOM attribute reflects a missing 'value' attribute rather than
whatever value the 'value' attribute actually has? If so, you should make
it more explicit. If not, you should make /that/ explicit.

# Each subsequent item in the list has the ordinal value given by its value
# attribute, if it has one, or, if it doesn't, the ordinal value of the
# previous item, plus one.

The instructions in the <ol> section seem to omit any reference to the
number conversion step described in the <li> section.

Here's a suggestion:

   Replace

    # If the value attribute is present, user agents must convert the
    # value to a numeric type, truncating any fractional part, in order
    # to determine the attribute's value. If the attribute's value cannot
    # be converted to a number, it is treated as if the attribute was
    # absent. The attribute has no default value.
    #
    # The value attribute is processed by the parent ol element, if
    # there is one. If there is not, the attribute has no effect.

   with

    | If the value attribute is present, user agents must convert the
    | value to a numeric type, truncating any fractional part, in order
    | to determine the attribute's numerical value. If the attribute's
    | value cannot be converted to a number or the attribute is missing
    | (or the parent element is not an ol element)?, then the attribute
    | has no numerical value.

   and

    # Each subsequent item in the list has the ordinal value given by
    # its value attribute, if it has one, or, if it doesn't, the ordinal
    # value of the previous item, plus one.

   with

    | Each subsequent item in the list has the ordinal value given by
    | its value attribute's numerical value, if it has one, or, if it
    | doesn't, the ordinal value of the previous item plus one.

(Either way, you should remove the comma before "plus one".)

~fantasai
Received on Tuesday, 23 August 2005 15:56:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:42 UTC