<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>7255</bug_id>
          
          <creation_ts>2006-02-14 12:14:14 -0800</creation_ts>
          <short_desc>label attribute in option elements is ignored</short_desc>
          <delta_ts>2006-02-14 14:38:38 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>412</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John Sullivan">sullivan</reporter>
          <assigned_to name="John Sullivan">sullivan</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32497</commentid>
    <comment_count>0</comment_count>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-14 12:14:14 -0800</bug_when>
    <thetext>The OPTION element has a &quot;label&quot; attribute which, when present, is supposed to be used in the user interface rather than the text contents of the element. This is described on &lt;http://www.w3.org/TR/REC-html40/interact/forms.html&gt;:

This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label.

WebKit ignores this attribute, though a getter and setter are supplied in the Objective-C DOM API at least.

IE supports this attribute, though Firefox ignores it.

Here&apos;s an example. This should show a pop-up menu with menu items titled &quot;1&quot; and &quot;2&quot;, but instead it shows a pop-up menu with long menu item titles:

&lt;select&gt;
&lt;option value=&quot;1&quot; label=&quot;1&quot;&gt;the label for this element is &quot;1&quot;&lt;/option&gt;
&lt;option value=&quot;2&quot; label=&quot;2&quot;&gt;the label for this element is &quot;2&quot;&lt;/option&gt;
&lt;/select&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32500</commentid>
    <comment_count>1</comment_count>
      <attachid>6487</attachid>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-14 12:28:37 -0800</bug_when>
    <thetext>Created attachment 6487
test cases that include empty label</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32502</commentid>
    <comment_count>2</comment_count>
      <attachid>6488</attachid>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-14 12:31:11 -0800</bug_when>
    <thetext>Created attachment 6488
patch to support label attribute for OPTION elements</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32504</commentid>
    <comment_count>3</comment_count>
      <attachid>6488</attachid>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-14 12:37:50 -0800</bug_when>
    <thetext>Comment on attachment 6488
patch to support label attribute for OPTION elements

Oops, I didn&apos;t mean to mark it review-+. Also, I haven&apos;t attached the layout tests yet, so I&apos;ll set this to review- until I have the tests ready.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32512</commentid>
    <comment_count>4</comment_count>
      <attachid>6489</attachid>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-14 13:26:54 -0800</bug_when>
    <thetext>Created attachment 6489
layout tests for patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32513</commentid>
    <comment_count>5</comment_count>
      <attachid>6488</attachid>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-14 13:27:29 -0800</bug_when>
    <thetext>Comment on attachment 6488
patch to support label attribute for OPTION elements

Now that I&apos;ve attached the new layout tests, this is ready for review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32524</commentid>
    <comment_count>6</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-02-14 14:07:08 -0800</bug_when>
    <thetext>HTML also will let you write:

&lt;option label&gt;Foo&lt;/option&gt;

Should make sure we match WinIE in that situation too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32525</commentid>
    <comment_count>7</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-02-14 14:07:33 -0800</bug_when>
    <thetext>Also, what about list boxes?  Need to see if label is used for &lt;select size=&quot;10&quot;&gt; for example.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32526</commentid>
    <comment_count>8</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-02-14 14:07:47 -0800</bug_when>
    <thetext>Also need to test optgroups.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32528</commentid>
    <comment_count>9</comment_count>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-14 14:18:19 -0800</bug_when>
    <thetext>In response to comment 6: the behavior for this case is the same on MacIE as in WebKit; I&apos;ll add a layout test.

In response to comment 7:  list boxes don&apos;t use the label but should; I&apos;ll write a bug

In response to comment 8: optgroups already deal with the label (used as hierarchical menu item title)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32531</commentid>
    <comment_count>10</comment_count>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2006-02-14 14:38:38 -0800</bug_when>
    <thetext>I was wrong about list boxes in my previous comment; they do work correctly now with label attributes. (I was using the wrong Safari when I tested that case.) I&apos;m adding another layout test for this.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>6487</attachid>
            <date>2006-02-14 12:28:37 -0800</date>
            <delta_ts>2006-02-14 13:26:54 -0800</delta_ts>
            <desc>test cases that include empty label</desc>
            <filename>option_label_test.html</filename>
            <type>text/html</type>
            <size>282</size>
            <attacher name="John Sullivan">sullivan</attacher>
            
              <data encoding="base64">PHNlbGVjdD4NPG9wdGlvbiBsYWJlbD0iMSI+dGhlIGxhYmVsIGZvciB0aGlzIGVsZW1lbnQgaXMg
IjEiPC9vcHRpb24+DTxvcHRpb24+dGhpcyBpdGVtIGhhcyBubyBsYWJlbDwvb3B0aW9uPg08b3B0
aW9uIGxhYmVsPSIiPmVtcHR5IGxhYmVsIHNob3VsZCBkaXNwbGF5IGVtcHR5IHN0cmluZyB0byBt
YXRjaCBJRTwvb3B0aW9uPg08b3B0aW9uIGxhYmVsPSIgIj53aGl0ZSBzcGFjZSBsYWJlbCBzaG91
bGQgZGlzcGxheSBlbXB0eSBzdHJpbmcgdG8gbWF0Y2ggSUU8L29wdGlvbj4NPC9zZWxlY3Q+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>6488</attachid>
            <date>2006-02-14 12:31:11 -0800</date>
            <delta_ts>2006-02-14 13:33:25 -0800</delta_ts>
            <desc>patch to support label attribute for OPTION elements</desc>
            <filename>7255-patch.txt</filename>
            <type>text/plain</type>
            <size>953</size>
            <attacher name="John Sullivan">sullivan</attacher>
            
              <data encoding="base64">SW5kZXg6IHJlbmRlcmluZy9yZW5kZXJfZm9ybS5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gcmVuZGVyaW5n
L3JlbmRlcl9mb3JtLmNwcAkocmV2aXNpb24gMTI3OTEpCisrKyByZW5kZXJpbmcvcmVuZGVyX2Zv
cm0uY3BwCSh3b3JraW5nIGNvcHkpCkBAIC03MTYsNyArNzE2LDEyIEBACiAgICAgICAgICAgICB9
CiAgICAgICAgICAgICBlbHNlIGlmIChsaXN0SXRlbXNbbGlzdEluZGV4XS0+aGFzVGFnTmFtZShv
cHRpb25UYWcpKSB7CiAgICAgICAgICAgICAgICAgSFRNTE9wdGlvbkVsZW1lbnRJbXBsICpvcHRp
b25FbGVtZW50ID0gc3RhdGljX2Nhc3Q8SFRNTE9wdGlvbkVsZW1lbnRJbXBsKj4obGlzdEl0ZW1z
W2xpc3RJbmRleF0pOwotICAgICAgICAgICAgICAgIFFTdHJpbmcgaXRlbVRleHQgPSBvcHRpb25F
bGVtZW50LT50ZXh0KCkucXN0cmluZygpOworICAgICAgICAgICAgICAgIFFTdHJpbmcgaXRlbVRl
eHQ7CisgICAgICAgICAgICAgICAgaWYgKG9wdGlvbkVsZW1lbnQtPmhhc0F0dHJpYnV0ZShsYWJl
bEF0dHIpKQorICAgICAgICAgICAgICAgICAgICBpdGVtVGV4dCA9IG9wdGlvbkVsZW1lbnQtPmdl
dEF0dHJpYnV0ZShsYWJlbEF0dHIpLnFzdHJpbmcoKTsKKyAgICAgICAgICAgICAgICBlbHNlCisg
ICAgICAgICAgICAgICAgICAgIGl0ZW1UZXh0ID0gb3B0aW9uRWxlbWVudC0+dGV4dCgpLnFzdHJp
bmcoKTsKKyAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICBpdGVtVGV4dC5yZXBsYWNl
KFFDaGFyKCdcXCcpLCBiYWNrc2xhc2hBc0N1cnJlbmN5U3ltYm9sKCkpOwogCiAgICAgICAgICAg
ICAgICAgLy8gSW4gV2luSUUsIGxlYWRpbmcgYW5kIHRyYWlsaW5nIHdoaXRlc3BhY2UgaXMgaWdu
b3JlZCBpbiBvcHRpb25zLiBXZSBtYXRjaCB0aGlzIGJlaGF2aW9yLgo=
</data>
<flag name="review"
          id="1611"
          type_id="1"
          status="+"
          setter="adele"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>6489</attachid>
            <date>2006-02-14 13:26:54 -0800</date>
            <delta_ts>2006-02-14 13:26:54 -0800</delta_ts>
            <desc>layout tests for patch</desc>
            <filename>7255-layout-tests.txt</filename>
            <type>text/plain</type>
            <size>1121</size>
            <attacher name="John Sullivan">sullivan</attacher>
            
              <data encoding="base64">SW5kZXg6IGRvbS9odG1sL2xldmVsMi9odG1sL0hUTUxPcHRpb25FbGVtZW50X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bS9odG1sL2xldmVsMi9odG1sL0hUTUxPcHRpb25FbGVtZW50X2xhYmVs
MDMuaHRtbAkocmV2aXNpb24gMCkKKysrIGRvbS9odG1sL2xldmVsMi9odG1sL0hUTUxPcHRpb25F
bGVtZW50X2xhYmVsMDMuaHRtbAkocmV2aXNpb24gMCkKQEAgLTAsMCArMSBAQAorPHNlbGVjdD4N
PG9wdGlvbiBsYWJlbD0iICI+d2hpdGUgc3BhY2UgbGFiZWwgc2hvdWxkIGRpc3BsYXkgZW1wdHkg
c3RyaW5nIHRvIG1hdGNoIElFPC9vcHRpb24+DTwvc2VsZWN0Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>