dequelabs / dequelabs/axe-core
Investigate supporting partially obscured elements in color-contrast
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 29
Description
Currently axe-core ignores partially elements for color-contrast and returns incomplete. However we should investigate updating that to instead only test the visible part of the element for color-contrast. This could be done by updating our [`get-background-stack` function](https://github.com/dequelabs/axe-core/blob/develop/lib/commons/color/get-background-stack.js#L32-L35) to call `splitRects` on the target and any node that partially overlaps it, then finding a new element stack with the new target rect.
Contributor guide
Research direction
Start by reading lib/commons/color/get-background-stack.js, especially the current handling of partially overlapping elements. Trace how splitRects could be applied to the target and overlapping nodes, then determine how a new target rectangle would produce an element stack for visible-part color-contrast testing. Done means establishing whether partially obscured elements can be tested instead of returning incomplete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100