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

fix(color-contrast-matches): only absolutely positioned elements using clip should be not visible #3038

Merged
merged 2 commits into from
Jun 29, 2021

Conversation

clottman
Copy link
Contributor

Clip is only applied on absolutely positioned elements (position: fixed or position: absolute), so if an element is using clip but doesn't have that positioning, it will still be visible.

Closes issue: #3037

@clottman clottman requested a review from a team as a code owner June 24, 2021 20:26
@@ -174,6 +188,21 @@ describe('dom.isVisible', function() {
assert.isFalse(axe.commons.dom.isVisible(el));
});

it('should detect when clip is not applied because of positioning on parent', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you repeating tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not - this is when clip is not applied because of positioning on the parent, the previous test is positioning on the element itself. Down below, it's testing when the screenreader option is set using these same two cases.

@straker straker merged commit e93fdb1 into develop Jun 29, 2021
@straker straker deleted the 3037-color-contrast-clip-matches branch June 29, 2021 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants