Bug 187695 - AX: <img> element with an SVG source have no role instead of role image
Summary: AX: <img> element with an SVG source have no role instead of role image
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Safari Technology Preview
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-16 05:59 PDT by Eric Eggert
Modified: 2019-05-23 14:12 PDT (History)
8 users (show)

See Also:


Attachments
PNG image shows the role="img" (246.42 KB, image/png)
2018-07-16 05:59 PDT, Eric Eggert
no flags Details
SVG image without a matching ARIA role (257.03 KB, image/png)
2018-07-16 06:00 PDT, Eric Eggert
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Eggert 2018-07-16 05:59:43 PDT
Created attachment 345091 [details]
PNG image shows the role="img"

Related to #145263?

When using an image element with an SVG source, the ARIA role img for the <img> element is not set. This leads to VoiceOver announcing the SVG image as a “group” instead of an “image”. It also means that on iOS the image can’t be discovered by touching the screen.

An interactive example can be found here: https://codepen.io/yatil/pen/BPKBEw

I have attached images demonstrating the problem, too.
Comment 1 Eric Eggert 2018-07-16 06:00:28 PDT
Created attachment 345092 [details]
SVG image without a matching ARIA role
Comment 2 Scott 2019-03-20 07:03:47 PDT
Adding onto this report:
Testing with iOS VoiceOver and Safari (re-verified today with 12.1.4) an <img> that points to a .svg will be completely ignored, even if it is given alt text.
Comment 3 Dennis 2019-03-20 11:20:53 PDT
Please assign this bug. As reported, the role outputs as "group" instead of "image" in Voiceover. Tested on Safari (Mac 12.0.2) and Voiceover (Mac 10.14.2).
Comment 4 Sarah Higley 2019-03-20 11:43:36 PDT
I've run into this problem often enough that it came up in an accessibility training session. I also verified in iOS Safari + VO 12.1.4
Comment 5 Michael Spellacy 2019-05-22 06:39:30 PDT
It would be great if this was fixed.