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 should take styled THEAD/TFOOT into account #823

Closed
schne324 opened this issue Apr 4, 2018 · 6 comments
Closed

Color contrast should take styled THEAD/TFOOT into account #823

schne324 opened this issue Apr 4, 2018 · 6 comments
Assignees
Labels
color contrast Color contrast issues fix Bug fixes rules Issue or false result from an axe-core rule

Comments

@schne324
Copy link
Member

schne324 commented Apr 4, 2018

on my y5e game http://harris-schneiderman.com/a11y-games/y5e/ I believe axe is raising a false positive for color contrast. If you click "New game" and then run axe, it calls out each td in the thead as violating color contrast (it isn't properly calculating the background color). Now I do realize that there is an unrelated issue I have in the table in which those tds should be ths but I figured I leave it as is to give you a chance to see the potential false positive.

NOTE: the extension states that the background color is #dee8e6 when in fact it is #0f635b

@marcysutton
Copy link
Contributor

marcysutton commented Apr 4, 2018

Table elements like TH and TD had to be added manually to the color contrast algorithm (document.elementsFromPoint doesn't include those, along with other "edge" cases), and THEAD probably wasn't considered. As long as styling of THEAD is consistent in all browsers, we could add it to the algorithm. In the meantime, you could add the background color to your TH or TD elements instead as those are evaluated.

@schne324
Copy link
Member Author

schne324 commented Apr 4, 2018

cool, thanks @marcysutton !! The solution here is for me to make the <td />s <th />s (because they should be and it was an initial oversight on my part) but I just wanted to point this weird result out before I make the fix on my end

@marcysutton marcysutton added the color contrast Color contrast issues label Apr 4, 2018
@WilcoFiers WilcoFiers changed the title aXe Coconut issue for rule: Elements must have sufficient color contrast (potential false positive?) aXe Coconut issue for rule: Elements must have sufficient color contrast Apr 17, 2018
@WilcoFiers WilcoFiers added the fix Bug fixes label Apr 17, 2018
@marcysutton marcysutton changed the title aXe Coconut issue for rule: Elements must have sufficient color contrast Color contrast should take styled THEAD/TFOOT into account May 2, 2018
@WilcoFiers WilcoFiers added the rules Issue or false result from an axe-core rule label Oct 18, 2018
@WilcoFiers WilcoFiers added this to the Axe-core 3.4 milestone Jun 7, 2019
@straker straker self-assigned this Jun 24, 2019
@jeankaplansky
Copy link
Contributor

No product docs required.

@somaalapati
Copy link

@WilcoFiers You closed and reopened this ticket. Did you close it accidentally? Or you need to fix this issue?

@somaalapati
Copy link

@chandana7393 Please test this ticket. Let me know if you need my help.

@chandana7393
Copy link

Tested, working as expected.
tfoot_color_contrast
thead_color_contrast
Tested Environment:
Attest - 2.5.1.21421v
Axe - 3.8.1.21421v
Axe-coconut - 3.8.1.21704v
Chrome - 76.0.3809.87v
Firefox - 68.0.1v
OS - Windows 10 64 bit.

@WilcoFiers WilcoFiers removed this from the Axe-core 3.4 milestone Sep 30, 2019
mrtnvh pushed a commit to mrtnvh/axe-core that referenced this issue Nov 24, 2023
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
Projects
None yet
Development

No branches or pull requests

7 participants