dequelabs / dequelabs/axe-core
Elements must only use allowed ARIA attributes for SVG g element with aria-label
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
Product: axe Extension
Sorry for the divergence from the template. It's actually more a question than a bug report.
I have an SVG with a group that renders text as paths and [animation library](https://github.com/airbnb/lottie-web) producing this SVG adds `aria-label` with this text to the group.
```
```
Axe (and lighthouse) gives an error "Elements must only use allowed ARIA attributes". I've read a spec and your latest issue about prohibiting `aria-label` for some roles. The question is does `g` element has a `generic` or a `group` role. I've searched spec for information about `g` element, found [this one](https://www.w3.org/TR/2018/WD-svg-aam-1.0-20180510/) (it's old but the latest one). It says that `g` maps to a group role if I read it right and `group` role is allowed to have `aria-label`

I think that in this case `title` should be used instead of `aria-label` and will ask the maintainers about that.
Though I'm still interested in the reason (partially as the argument to animation library not to use `aria-label`), whether it's something I don't see in specs or just some empiric rule that no screen readers will handle this the right way.
axe-core version: v4.3.5
extension version: v4.22.1
Contributor guide
Assessment
This issue has not been assessed yet.