<?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>172464</bug_id>
          
          <creation_ts>2017-05-22 12:50:06 -0700</creation_ts>
          <short_desc>AX: aria-label and aria-labelledby ignored when for-id association present on form input</short_desc>
          <delta_ts>2020-12-17 16:41:31 -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>Accessibility</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 10</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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 name="Ken Petri">kenneth.petri</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>govett</cc>
    
    <cc>nurthen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1311505</commentid>
    <comment_count>0</comment_count>
    <who name="Ken Petri">kenneth.petri</who>
    <bug_when>2017-05-22 12:50:06 -0700</bug_when>
    <thetext>Overview: 

If an input field has a label and the label is associated with the field using for-id association, the for-id association overrides any other labels, whether those are associated using aria-labelledby or aria-label.



Example code 1 (only labels are associated via aria-labelledby):

&lt;label id=&quot;labelID-one&quot;&gt;Label One&lt;/label&gt;
&lt;input type=&quot;text&quot; aria-labelledby=&quot;labelID-one labelID-two&quot;&gt; 
&lt;span id=&quot;labelID-two&quot;&gt;Label Two&lt;/span&gt;

Expected Result for Example code 1:
When field is focused, VoiceOver reads: &quot;Label One, Label Two, text field&quot;

Actual Result for Example code 1:
(same as expected result)




Example code 2 (for-id association present along with labelledby)

&lt;label id=&quot;labelID-one&quot; for=&quot;field-one&quot;&gt;Label One&lt;/label&gt;
&lt;input id=&quot;field-one&quot; type=&quot;text&quot; aria-labelledby=&quot;labelID-one labelID-two&quot;&gt; 
&lt;span id=&quot;labelID-two&quot;&gt;Label Two&lt;/span&gt;

Expected Result for Example code 2:
When field is focused, VoiceOver overrides for-id association and reads labelledby IDREF values: &quot;Label One, Label Two, text field&quot;

Actual Result for Example code 2:
When field is focused, VoiceOver reads only the for-id associated label: &quot;Label One, text field&quot;




Example code 3 (for-id association present and aria-label used):

&lt;label for=&quot;field-one&quot;&gt;Label One&lt;/label&gt;
&lt;input id=&quot;field-one&quot; type=&quot;text&quot; aria-label=&quot;an aria label&quot;&gt; 

Expected Result for Example code 3:
When field is focused, VoiceOver overrides for-id association and reads aria-label value: &quot;an aria label, text field&quot;

Actual Result for Example code 3:
When field is focused, VoiceOver reads only the for-id associated label: &quot;Label One, text field&quot;


These results were verified using iOS 10.3.1 on both iPad and iPhone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1311506</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-05-22 12:50:31 -0700</bug_when>
    <thetext>&lt;rdar://problem/32332497&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1715593</commentid>
    <comment_count>2</comment_count>
    <who name="Devon Govett">govett</who>
    <bug_when>2020-12-17 15:43:13 -0800</bug_when>
    <thetext>This bug is still present in iOS 14. Here&apos;s another reproduction: https://codepen.io/devongovett/pen/PoGjwdG. The first slider is announced only as &quot;Range&quot; where the second slider is announced as &quot;Range Maximum&quot;. VoiceOver on macOS announces the first slider correctly as &quot;Range Minimum&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1715616</commentid>
    <comment_count>3</comment_count>
    <who name="James Nurthen">nurthen</who>
    <bug_when>2020-12-17 16:41:31 -0800</bug_when>
    <thetext>From inspecting Safari on iPadOS this doesn&apos;t seem to be a safari bug rather a Voiceover one. The (Inspected) Accessible name looks to be correct.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>