<?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>226551</bug_id>
          
          <creation_ts>2021-06-02 13:33:21 -0700</creation_ts>
          <short_desc>AX: inconsistent announcement for SVGs used in &lt;img&gt; element (macOS/VO and iOS/VO)</short_desc>
          <delta_ts>2024-01-17 09:00:42 -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>All</rep_platform>
          <op_sys>All</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="Patrick H. Lauke">redux</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barry</cc>
    
    <cc>emily.mann</cc>
    
    <cc>jcraig</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1766129</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick H. Lauke">redux</who>
    <bug_when>2021-06-02 13:33:21 -0700</bug_when>
    <thetext>There are currently inconsistencies with how &lt;img&gt; elements with an SVG are announced by VoiceOver - depending on whether the SVG has a &lt;title&gt; or not, whether the &lt;img&gt; has an explicit additional role=&quot;img&quot; or not, and whether or not alt=&quot;...&quot; attribute is present. Further, there are inconsistencies between macOS/Safari/VoiceOver and iOS/Safari/VoiceOver.

See this small set of tests https://codepen.io/patrickhlauke/full/XbjYGZ/ (this includes current results of how these different scenarios are announced, but copying them here for clarity as well):

&lt;img src=&quot;[svg without title]&quot; alt=&quot;Box&quot;&gt;
macOS/Safari/VoiceOver: Box, empty group / iOS/Safari/VoiceOver: Box, image

&lt;img src=&quot;[svg without title]&quot; alt=&quot;Box&quot; role=&quot;img&quot;&gt;
macOS/Safari/VoiceOver: Box, image / iOS/Safari/VoiceOver: Box, image

&lt;img src=&quot;[svg with title]&quot; alt=&quot;Box&quot;&gt;
macOS/Safari/VoiceOver: Box, group &gt; Test, empty group &gt; end of, Box, group / iOS/Safari/VoiceOver: (completely skipped)

&lt;img src=&quot;[svg with title]&quot; alt=&quot;Box&quot; role=&quot;img&quot;&gt;
macOS/Safari/VoiceOver: Box, image / iOS/Safari/VoiceOver: Box, image

&lt;img src=&quot;[svg with title]&quot;&gt;
macOS/Safari/VoiceOver: Test, empty group / iOS/Safari/VoiceOver: (completely skipped)

&lt;img src=&quot;[svg with title]&quot; role=&quot;img&quot;&gt;
macOS/Safari/VoiceOver: image / iOS/Safari/VoiceOver: image

There are further oddities depending on whether the SVG is an external URL, or a data URL, reported by Barry Pollard here https://www.tunetheweb.com/experiments/svg-images/ (see https://bugs.webkit.org/show_bug.cgi?id=145263#c13)

Successor to https://bugs.webkit.org/show_bug.cgi?id=145263</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1766131</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-02 13:33:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/78780518&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1766135</commentid>
    <comment_count>2</comment_count>
    <who name="Barry Pollard">barry</who>
    <bug_when>2021-06-02 13:44:00 -0700</bug_when>
    <thetext>FYI, I did NOT actually see any noticeable difference for External SVGs nor inlined data SVGs (so probably can remove those test cases from my sample page - was trying out lots of things!).

However I did note that an SVG with a &lt;title&gt; element without an explicit role, didn’t show in the MacOS Voiceover Image Rotor - it was completely ignored from that (like it is on iOS) even though it was keyboard accessible from Voiceover and read out. I guess because the role is Group rather than Img, so not eligible for Image Rotor?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005604</commentid>
    <comment_count>3</comment_count>
    <who name="emily">emily.mann</who>
    <bug_when>2024-01-17 09:00:42 -0800</bug_when>
    <thetext>I have experienced similar behaviour when an &lt;svg&gt; is used directly. 

&lt;button&gt;&lt;svg role=&quot;img&quot;&gt;&lt;title&gt;Close&lt;/title&gt;&lt;/svg&gt;&lt;/button&gt; 

VoiceOver only announces &apos;button&apos; and not the title text.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>