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

False positive: color-contrast fails on <i> tags used as icons #1068

Closed
iamrafan opened this issue Aug 14, 2018 · 2 comments · Fixed by #1095
Closed

False positive: color-contrast fails on <i> tags used as icons #1068

iamrafan opened this issue Aug 14, 2018 · 2 comments · Fixed by #1095
Labels
color contrast Color contrast issues fix Bug fixes rules Issue or false result from an axe-core rule support

Comments

@iamrafan
Copy link
Contributor

Color-contrast fails on <i> tags used as icons. The failure is due to the unicode () rendered in the DOM

image

axe-core version: 3.0.3
axe-Coconut version: 3.4.0-alpha.2
@WilcoFiers WilcoFiers added fix Bug fixes support labels Aug 15, 2018
@WilcoFiers
Copy link
Contributor

Fair point. I've been thinking of marking very small "texts" like this for review instead. I think that would be the proper solution.

@WilcoFiers WilcoFiers added the color contrast Color contrast issues label Aug 23, 2018
WilcoFiers added a commit that referenced this issue Aug 23, 2018
This fix ensures that font icons and other single character elements are put into needs review for the color-contrast rule. 

Closes #1068

## Reviewer checks

**Required fields, to be filled out by PR reviewer(s)**
- [x] Follows the commit message policy, appropriate for next version
- [x] Has documentation updated, a DU ticket, or requires no documentation change
- [x] Includes new tests, or was unnecessary
- [x] Code is reviewed for security by: @dylanb
@WilcoFiers WilcoFiers added the rules Issue or false result from an axe-core rule label Oct 18, 2018
@joshjg
Copy link

joshjg commented Oct 20, 2019

@WilcoFiers Thoughts on revisiting the original solution for this one, or making it configurable? There are plenty of cases where a single character element needs to have appropriate contrast. Even in the OP's image, there are single digit numbers on the right column which need to be accessible.

Maybe this could be addressed via some sort of configuration for a text content blacklist/regex so that people can only ignore certain characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color contrast Color contrast issues fix Bug fixes rules Issue or false result from an axe-core rule support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants