<?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>223157</bug_id>
          
          <creation_ts>2021-03-13 22:59:54 -0800</creation_ts>
          <short_desc>AX: VoiceOver announces &lt;details&gt; with visually-hidden text as two separate &lt;details&gt;</short_desc>
          <delta_ts>2023-02-13 18:51:59 -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>Safari 14</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 14</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>
          
          <blocked>252223</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Carly Gerard">carlygerard</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>carlygerard</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1739205</commentid>
    <comment_count>0</comment_count>
    <who name="Carly Gerard">carlygerard</who>
    <bug_when>2021-03-13 22:59:54 -0800</bug_when>
    <thetext>In Safari on iOS 14.4 in VoiceOver, a &lt;details&gt; element with a nested visually-hidden &lt;span&gt; will announce as two separate &lt;details&gt; elements. The same pattern happens in iOS Firefox and Chrome as well.

To test: Use a test page with the following HTML: 

&lt;details&gt;
  &lt;summary&gt;Visible text 
    &lt;span class=&quot;visually-hidden&quot; role=&quot;presentation&quot;&gt;with supplemental but visually-hidden text&lt;/span&gt;
  &lt;/summary&gt;
   // details content
&lt;/details&gt;

Visually-hidden CSS if needed:

 position:absolute;
 overflow:hidden;
 clip:rect(1px,1px,1px,1px); // support for IE
 -webkit-clip-path:inset(50%);
 clip-path:inset(50%);
 width:1px;
 height:1px;
 word-wrap:normal;
 white-space:nowrap;

Expected announcement by iOS VoiceOver: &quot;Visible text with supplemental but visually-hidden text, collapsed&quot; 

How it actually announces: &quot;Visible text, collapsed. [swipe right] With supplemental but visually-hidden text, collapsed.&quot; 

Scott O&apos;Hara mentions that with interactive elements, adding role=&quot;presentation&quot; to an inner &lt;span class=&quot;visually-hidden&quot;&gt; should prevent the multiple cursor/tab stops, under the &quot;Note about using .sr-only within interactive elements&quot; disclosure: https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html. 

Marking up the inner &lt;span&gt; this way announces the &lt;summary&gt; as expected with macOS VoiceOver on Safari/Chrome, but not yet in iOS VoiceOver. Adding role=&quot;presentation&quot; to the inner .visually-hidden &lt;span&gt; also announces &lt;summary&gt; as expected in NVDA with Firefox and Chrome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739206</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-03-13 23:00:03 -0800</bug_when>
    <thetext>&lt;rdar://problem/75402384&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>