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

Elements with display:table-row not included in background color test #1588

Closed
WilcoFiers opened this issue May 25, 2019 · 4 comments
Closed
Assignees
Labels
color contrast Color contrast issues fix Bug fixes rules Issue or false result from an axe-core rule
Milestone

Comments

@WilcoFiers
Copy link
Contributor

WilcoFiers commented May 25, 2019

Expected: The following should pass the color-contrast rule

<div style="background-color: #003; color: #eee; display: table-row;">
  <p>Good contrast</p>
</div>

Actual: The rule fails to pick up the background-color because it is on a display: table-row element. This is similar to how <tr> and <thead> elements aren't picked up by elementsFromPoint.

@WilcoFiers WilcoFiers added fix Bug fixes color contrast Color contrast issues rules Issue or false result from an axe-core rule labels May 25, 2019
@dbjorge
Copy link
Contributor

dbjorge commented May 29, 2019

Note that this issue repros on Chromium (stable and dev) but not Firefox, as of writing. We are reasonably confident that the root cause is Chromium bug 647594. We already notified the Chromium team of the axe-core impact and they have already escalated the bug to P1 accordingly, tagged for release M-78.

@jeankaplansky
Copy link
Contributor

Include as part of the overall improvements/fixes to color-contrast

@padmavemulapati
Copy link

Throwing color-contrast voilation.
image

@atotic
Copy link

atotic commented Mar 20, 2021

FYI: Chrome will not change elementFromPoint behavior for rows/sections. I've tested it in all modern browsers, and it seems that current Firefox matches Chrome's behavior.

Background color of a table cell is also determined by columns. This makes it impossible to determine true table background cell from javascript in general case. (unless there is an api I am not aware of). I suggest filling a csswg issue if this is a capability you need for accessiblity.

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

6 participants