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): skip ligature icons #3867

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

WilcoFiers
Copy link
Contributor

Closes: #3659

@WilcoFiers WilcoFiers requested a review from a team as a code owner January 20, 2023 15:06
@@ -537,4 +537,32 @@ describe('color-contrast-matches', function () {
assert.isTrue(rule.matches(input, axe.utils.getNodeFromTree(input)));
});
}

describe('with font icons', () => {
Copy link
Contributor

@straker straker Jan 23, 2023

Choose a reason for hiding this comment

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

Needs a true test case (there are only 2 false cases)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The way I figured it, pretty much every other test in this suite shows that text that isn't an icon font can pass or fail the check. Whatever I add here would basically just be a copy of the default "true" case.

Copy link
Contributor

@straker straker Jan 23, 2023

Choose a reason for hiding this comment

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

The test that's missing is making sure that at least 1 non-ligature icon text passes the matchers when there is an icon ligature present https://github.com/dequelabs/axe-core/pull/3867/files#diff-3d333c18371db80de7813d5146a4dd966928b3463664813bcb8a99289136e542R171-R173

Copy link
Contributor

Choose a reason for hiding this comment

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

We talked about this. Due to how font icons work and our font icon detection strategy, having non-icons ligatures in the same text node as icon ligatures doesn't really work. We'll open a pr to add a comment about this in a different pr.

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.

color-contrast fails on aria-hidden="true" elements
2 participants