dequelabs / dequelabs/axe-core
Color contrast should ignore overlapping elements that have transparent background
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 29
Description
Take the following example:
```html
.overlap {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100px;
}
Hello World
```
This causes an incomplete result for color contrast because the `.overlap` element is on top of the `` element in the DOM stack. However since the `.overlap` element has a transparent background it should just be ignored.
This same problem happens with [Material Button components](https://material.io/components/buttons) due to the ripple effect element that overlaps the button text.
```html
```
Contributor guide
Research direction
Start by reproducing the provided HTML examples, including the Material Button markup, with axe-core's color-contrast check. Trace how overlapping elements are handled and verify that transparent overlays no longer make the result incomplete while opaque overlaps still affect it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100