dequelabs / dequelabs/axe-core
Color contrast add support for svg text nodes
Open
color contrast
feat
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
Svgs can have text nodes with proper text and foreground color. Color contrast ignores all svg elements as an image.
For the foreground color could handle them by just getting the `fill` property of the node.
Handling the background is a bit tricker. Svg paths can use `fill` to create any path structure behind the text node. It would be impossible to read the path data and determine if the text collides with it, so we will probably just return `incomplete` with `imgNode`.
But if the text node does not collide with a path node, we could just get the normal background color of the stack as we do now.
Contributor guide
Assessment
This issue has not been assessed yet.