[Bug 12255] New: option.label and option.value could be consistent

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12255

           Summary: option.label and option.value could be consistent
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: mounir.lamouri@gmail.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


For the moment, the 'label' of an option element is its label attribute if
present, otherwise its textContent. The 'value' of an option element is its
value attribute if present, otherwise its textContent.
The label IDL attribute reflects the label attribute and the value IDL
attribute (getter) returns the value attribute if present, otherwise the
textContent.

I deplore the lack of consistency here: I would have understand that
option.value and option.label reflects the content attribute but I don't
understand why the former doesn't while the later does.

I think the API would be easier to use if option.label was working like
option.value and I wonder if there would be real compat issues if this change
was made. (I would say it doesn't)

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Sunday, 6 March 2011 14:18:15 UTC