Bug 244221 - AX: SVG symbols in <img src> included in VoiceOver Images web rotor
Summary: AX: SVG symbols in <img src> included in VoiceOver Images web rotor
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari Technology Preview
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-08-22 14:32 PDT by Curtis Wilcox
Modified: 2022-08-22 14:32 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Wilcox 2022-08-22 14:32:35 PDT
If an <img> element has an SVG as its source (linked file or `data` encoded) and that SVG contains <use> elements that reference a <symbol> element, VoiceOver's Images web rotor includes each one as an unnamed image in addition to the <img> element with whatever name.

For example, if an <img> element with alt="Boxes" has an SVG that uses two <use> elements to make the same <symbol> appear twice, the web rotor's list of images would be:

* Boxes image
* image
* image

As each unnamed image is selected in the rotor, VoiceOver's cursor outline appears around the <use> element. It does not appear possible to navigate into the SVG from the page, they're only accessed through the rotor.

Adding role="img" to the <img> element has no effect.

Examples:
https://codepen.io/ccwilcox/full/VwXRBLN

This was tested using Safari 15.6.1 and Safari Technology Preview Release 151 on macOS 12.5.1. Inspecting the SVG, each <use> element contains Shadow Content which is an <svg> containing the referenced <symbol> element's contents. Adding role="none" to a <use> element prevents it from appearing in the rotor, adding  role='none' to either the <symbol> or the <path> within has no effect. Adding aria-label="one box" to a <use> element adds it to the web rotor list but the Shadow <svg> within is still also included as an unnamed image.

For comparison, only the <img> element appears in the web rotor when VoiceOver is used with Chrome (104) or Firefox (103.0.2).
Comment 1 Radar WebKit Bug Importer 2022-08-22 14:32:45 PDT
<rdar://problem/98999595>