Closed Bug 1673857 Opened 6 months ago Closed 5 months ago

Change the exposure of SVG to be an image for VoiceOver

Categories

(Core :: Disability Access APIs, task, P1)

Desktop
macOS
task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: MarcoZ, Assigned: MarcoZ)

Details

(Whiteboard: [Mac2020_2])

Attachments

(1 file)

I found this while checking out why VoiceOver on Mac says "unknown" when encountering an SVG element, for example the thing that is used as a user avatar on Twitter. We use roles::DIAGRAM in nsIAccessible, which maps to:

  • ATK_ROLE_IMAGE in GTK
  • ROLE_SYSTEM_DIAGRAM in IAccessible
  • NSAccessibilityUnknownRole on Mac

However, according to the WAI-ARIA graphics accessibility API mappings spec, which gets referenced by the Core-AAM spec for the SVG element, we should map the SVG element to a readonly document instead.

This is a significant change from what we have now, so want to get your opinions on that. It definitely needs to be fixed for Mac in one way or another so that SVG elements don't announce as unknown, as common as they are nowadays.

Suggestions?

VoiceOver will not read anything inside a container that does not have a known role. Can you please include a simple test case? Is this a regression?

ni'ing marco re: eitan's comment above

Flags: needinfo?(mzehe)

I don't believe this is a regression. It was introduced when we updated/changed the role map and gave every role an NSAccessibilityRole. I found this on Twitter when walking into a single tweet and hit the avatar SVG.

I wanted to check what the proper NSAccessibilityRole should be. While investigating this, I found that the whole way SVGs should be exposed in accordance with WAI-ARIA core-aam and HTML-aam, has changed for all platforms. That's why this more general bug.

Flags: needinfo?(mzehe)

As much as I want to just say "we should follow the spec", this feels pretty strange to me. svg is usually graphical content. Furthermore, I see Chrome maps svg to role graphic in Windows and my guess is it does similarly on Mac. It'd be interesting to know what both Chrome and Safari expose for svg role on Mac. If no one else is following the spec, that brings the spec into question. :)

Safari takes a very pragmatic approach and exposes the "Verified account" SVG on Twitter as a graphic. Patch coming up that we do the same. Also, repurposing this bug to be Mac specific. We just shouldn't expose an unknown role for this.

OS: All → macOS
Priority: P3 → P1
Hardware: All → Desktop
Summary: Change the exposure of SVG to comply with ARIA 1.1 graphics-document spec → Change the exposure of SVG to be an image for VoiceOver
Whiteboard: [Mac2020_2]
Assignee: nobody → mzehe
Status: NEW → ASSIGNED
Pushed by mzehe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/008b4af2b1da
Expose SVGs as images rather than unknown accessibles, r=morgan
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.