- From: Keith Cirkel via GitHub <noreply@w3.org>
- Date: Fri, 03 Apr 2026 11:41:28 +0000
- To: public-svg-issues@w3.org
I double checked against Firefox. Most entries are accurate, but "`<g>` (included)" might be wrong? All SVG accessible creation is in [`MaybeCreateSVGAccessible`](https://searchfox.org/mozilla-central/source/accessible/base/nsAccessibilityService.cpp#311-337), that's gated by [`MustSVGElementBeAccessible`](https://searchfox.org/mozilla-central/source/accessible/base/nsAccessibilityService.cpp#295-305). The table says Firefox maps this to `role=image`, but the code explicitly maps it to `role=group` (matching the spec). In [`MaybeCreateSVGAccessible`](https://searchfox.org/mozilla-central/source/accessible/base/nsAccessibilityService.cpp#328-332), `<g>` that passes inclusion gets `EnumRoleHyperTextAccessible<roles::GROUPING>`, and [`GROUPING` maps to `nsGkAtoms::group`](https://searchfox.org/mozilla-central/source/accessible/base/RoleMap.inc#176-187). So the FF column for `g (included)` should be "As spec". Maybe worth re-testing to confirm? What criteria did you use to generate the table? The others, AIUI, are largely correct. Here's the outliers for firefox: - `<a>` (with or without href) gets `role=link`: SVG `<a>` unconditionally gets [`HTMLLinkAccessible`](https://searchfox.org/mozilla-central/source/accessible/base/nsAccessibilityService.cpp#333-334), whose [`NativeRole()` always returns `roles::LINK`](https://searchfox.org/mozilla-central/source/accessible/html/HTMLLinkAccessible.cpp#33). No check for the presence of `href`. The spec says `<a>` without href should be `role=group`. Could be straightforward change. - Graphics elements (circle, ellipse, line, rect etc.) are all `role=image`: These get [`EnumRoleAccessible<roles::GRAPHIC>`](https://searchfox.org/mozilla-central/source/accessible/base/nsAccessibilityService.cpp#318), and [`GRAPHIC` maps to `nsGkAtoms::image`](https://searchfox.org/mozilla-central/source/accessible/base/RoleMap.inc#384-395). The spec says `graphics-symbol`. Firefox does have `graphics-symbol` as an [ARIA role](https://searchfox.org/mozilla-central/source/accessible/base/ARIAMap.cpp#743-752) (backed by the same internal `roles::GRAPHIC`), but doesn't use it as the native mapping for these elements. Could be a trivial change for us. - `foreignObject` (included) is `role=generic`: Not handled in `MaybeCreateSVGAccessible`, but the [fallback path](https://searchfox.org/mozilla-central/source/accessible/base/nsAccessibilityService.cpp#1607-1611) creates a plain `HyperTextAccessible` for it, which resolves to `TEXT_CONTAINER` / `generic` as above. Slightly more complex for us to align to spec here. - `<text>` is `role=generic`: Gets a plain [`HyperTextAccessible`](https://searchfox.org/mozilla-central/source/accessible/base/nsAccessibilityService.cpp#321) with no explicit role override. [`HyperTextAccessible::NativeRole()`](https://searchfox.org/mozilla-central/source/accessible/generic/HyperTextAccessible.cpp#55-62) falls through to `roles::TEXT_CONTAINER`, which maps to [`nsGkAtoms::generic`](https://searchfox.org/mozilla-central/source/accessible/base/RoleMap.inc#684-695). - `<symbol>` & "`<use>` (included)" are not exposed: Neither case is handled in `MaybeCreateSVGAccessible`, so no accessible is created AIUI. -- GitHub Notification of comment by keithamus Please view or discuss this issue at https://github.com/w3c/svg-aam/issues/52#issuecomment-4183126121 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 3 April 2026 11:41:29 UTC