Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color-contrast rule returns incomplete and claims node is partially obscured #1539

Closed
straker opened this issue May 2, 2019 · 6 comments
Closed
Assignees
Labels
color contrast Color contrast issues info needed More information or research is needed to continue
Milestone

Comments

@straker
Copy link
Contributor

straker commented May 2, 2019

Run Axe on https://straker.github.io/kontra/.

Expectation: Color contrast should pass

Actual: Color contrast returns incomplete for all nodes under the fold claiming the elements are partially obscured, even though no element obscures it.

I tried to figure out why the rule fails with @scurker, but we both gave up after we couldn't reproduce a reliable test case that worked consistently.

The best we could determine is that when the color-contrast rule tries to determine the background color of the element, it thinks document.body does not visually contain the element. We thought it was because there is an inner scroll element <main> that captures the scroll instead of the body itself, so body never scrolls. But any time we tried to create a test case to reproduce that, the color-contrast rule would pass.

In summary: we think the code for color.getBackgroundColor scrolling the element with scrollIntoView is not scrolling the body element, so when checking dom.visuallyContains, the element fails for document.body.


axe-core version: 3.2.2
axe-devtools 3.8.0
browser: Chrome
@straker straker changed the title Color-contrast claims node is partially obscured Color-contrast rule returns incomplete and claims node is partially obscured May 2, 2019
@WilcoFiers WilcoFiers added color contrast Color contrast issues info needed More information or research is needed to continue labels May 8, 2019
@robertvrabel
Copy link

I'm having a similar issue. It looks like when putting a background-color on the body element it throws off the color-contrast check.

If you move it to the html element instead it seems to resolve the issue.

@jeankaplansky
Copy link
Contributor

ID'd as color-contrast issue. We're going to make one entry into the release notes for all color-contrast fixes/enhancements.

@jeankaplansky
Copy link
Contributor

ID'd as color-contrast issue. We're going to make one entry into the release notes for all color-contrast fixes/enhancements.

@padmavemulapati
Copy link

@straker , ran axe on, https://straker.github.io/kontra/ , I am seeing "all issues (17)" count, and all 17 were under "Needs to review" section. Verified with the latest axe. What is the expected behaviour here?

@padmavemulapati
Copy link

Now with the latest axe, getting all issues(17) in "Incomplete", working as expected.

@padmavemulapati
Copy link

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color contrast Color contrast issues info needed More information or research is needed to continue
Projects
None yet
Development

No branches or pull requests

5 participants