<?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>305598</bug_id>
          
          <creation_ts>2026-01-15 13:53:13 -0800</creation_ts>
          <short_desc>&lt;datalist&gt; suggestions ignore &lt;option&gt; label when matching input</short_desc>
          <delta_ts>2026-01-22 13:54:12 -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>Safari 26</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 26</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=305091</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>nicolas.delafuente01</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>cdumez</cc>
    
    <cc>lily_spiniolas</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2172326</commentid>
    <comment_count>0</comment_count>
      <attachid>478038</attachid>
    <who name="">nicolas.delafuente01</who>
    <bug_when>2026-01-15 13:53:13 -0800</bug_when>
    <thetext>Created attachment 478038
test case

When entering text in an &lt;input&gt; with an associated &lt;datalist&gt;, the predictive text bar and the suggestions dropdown do not consider the &lt;option&gt; label/textContent when matching the input (only the value)

According to the HTML specification section 4.10.5.3.9:

“If appropriate, the user agent should use the suggestion’s label and value to identify the suggestion to the user.”

WebKit already uses both label and value on macOS Safari, but iOS Safari ignores the label when determining which options to suggest. This creates a cross-platform inconsistency and reduces clarity for users.

Example:
&lt;input list=&quot;numbers&quot; placeholder=&quot;Number&quot; autocomplete=&quot;off&quot;&gt;

&lt;datalist id=&quot;numbers&quot;&gt;
    &lt;option value=&quot;1&quot;&gt;One&lt;/option&gt;
    &lt;option value=&quot;2&quot;&gt;Two&lt;/option&gt;
    &lt;option value=&quot;3&quot;&gt;Three&lt;/option&gt;
    &lt;option value=&quot;4&quot;&gt;Four&lt;/option&gt;
&lt;/datalist&gt;

Observed behavior:
- Only the value (e.g., 1, 2, 3) is used to determine the suggestions in the dropdown and predictive text bar.
- Only the value is not shown in the predictive text bar

Expected behavior:
- Autofill searches both value and label
- If possible, both value and label are shown in the predictive text bar</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172599</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2026-01-16 13:06:26 -0800</bug_when>
    <thetext>Thank you for the report! I&apos;m not sure if &quot;ignores the label when determining which options to suggest&quot; precisely matches what I observed when trying this out, but what happened seemed difficult to explain, so there is likely a bug here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2173106</commentid>
    <comment_count>2</comment_count>
    <who name="">nicolas.delafuente01</who>
    <bug_when>2026-01-19 14:11:04 -0800</bug_when>
    <thetext>For the attached test case, if you type &apos;o&apos;, it causes the dropdown to not open (no options), and the predictive text bar shows |   1   |   2   |   3   |
but I would expect the dropdown to show 1 (One), 2 (Two), 4 (Four), and the predictive text bar would update to |   1   |   2   |   4   |</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2174223</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-01-22 13:54:12 -0800</bug_when>
    <thetext>&lt;rdar://problem/168703889&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>478038</attachid>
            <date>2026-01-15 13:53:13 -0800</date>
            <delta_ts>2026-01-15 13:53:33 -0800</delta_ts>
            <desc>test case</desc>
            <filename>file_305598.txt</filename>
            <type>text/html</type>
            <size>450</size>
            <attacher>nicolas.delafuente01</attacher>
            
              <data encoding="base64">PGlucHV0IGxpc3Q9Im51bWJlcnMiIHBsYWNlaG9sZGVyPSJOdW1iZXIiIGF1dG9jb21wbGV0ZT0i
b2ZmIj4NCg0KPGRhdGFsaXN0IGlkPSJudW1iZXJzIj4NCiAgPG9wdGlvbiB2YWx1ZT0iMSI+T25l
PC9vcHRpb24+DQogIDxvcHRpb24gdmFsdWU9IjIiPlR3bzwvb3B0aW9uPg0KICA8b3B0aW9uIHZh
bHVlPSIzIj5UaHJlZTwvb3B0aW9uPg0KICA8b3B0aW9uIHZhbHVlPSI0Ij5Gb3VyPC9vcHRpb24+
DQogIDxvcHRpb24gdmFsdWU9IjUiPkZpdmU8L29wdGlvbj4NCiAgPG9wdGlvbiB2YWx1ZT0iNiI+
U2l4PC9vcHRpb24+DQogIDxvcHRpb24gdmFsdWU9IjciPlNpeDwvb3B0aW9uPg0KICA8b3B0aW9u
IHZhbHVlPSI4Ij5FaWdodDwvb3B0aW9uPg0KICA8b3B0aW9uIHZhbHVlPSI5Ij5OaW5lPC9vcHRp
b24+DQogIDxvcHRpb24gdmFsdWU9IjEwIj5UZW48L29wdGlvbj4NCjwvZGF0YWxpc3Q+
</data>

          </attachment>
      

    </bug>

</bugzilla>