New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 595880 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug
Team-Accessibility



Sign in to add a comment

JAWS reads background color incorrectly

Project Member Reported by aboxhall@chromium.org, Mar 17 2016

Issue description

Version: m47
OS: Windows

What steps will reproduce the problem?
(1) Using JAWS, inspect color of a piece of text on a completely plain background, e.g. http://output.jsbin.com/famovo

What is the expected output? What do you see instead?

Expected: Color should be read as "black on white"
Actual: Color is read as "black on black"


 
A couple of thoughts on how to fix:
- The issue is that most elements don't have any background color, but rather a transparent background which is composited on whatever is "behind" it.
- I have dealt with this issue for the devtools color contrast tool; the code is here: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp&sq=package:chromium&type=cs&l=2049
- This is more complicated than we need in a couple of ways:
  - It handles gradients, and color blending for colors with opacity less than 1.0
  - It does hit testing to pick up absolute positioned elements - necessary in that case as this case is more common than you'd think, but probably we can do without it for the screen reader case.

However, one thing to note is that it includes code to get the very base color layer, which is not set in any style: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp&sq=package:chromium&type=cs&l=2081

So a hand-wavy proposal for simplified, faster version, but less reliable method might be:
- Let `element` = the element whose background color we wish to determind
- Determine the ancestor hierarchy between the `element` and the top-level document element
- while `element` is not the top-level document element:
  - if `element` has a background color whose opacity is greater than 5.0, cache that color as the background color for the element's accessible object and return it
  - else, `element` = `element.parentElement`
- If we found the document element, return its "base color".
Labels: OS-Windows
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, May 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36a0acdb9f8022148a26ab6198098a44964c19fd

commit 36a0acdb9f8022148a26ab6198098a44964c19fd
Author: nektar <nektar@chromium.org>
Date: Thu May 26 18:47:14 2016

Improved the reporting of background color information.

Previously only the background color in the element's style was exposed. More often than not, this was set to transparent.
With this change, the background colors of all the layout objects from the current object up to the document object are blended until we reach an opacity of less than 50%.
R=dmazzoni@chromium.org, aboxhall@chromium.org
BUG= 595880 
TESTED=layout test

Review-Url: https://codereview.chromium.org/2006043002
Cr-Commit-Position: refs/heads/master@{#396242}

[modify] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/content/test/data/accessibility/css/color-expected-blink.txt
[modify] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/content/test/data/accessibility/css/color-expected-win.txt
[add] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/third_party/WebKit/LayoutTests/accessibility/background-color.html
[modify] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/third_party/WebKit/LayoutTests/accessibility/css-styles-expected.txt
[modify] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/third_party/WebKit/LayoutTests/accessibility/css-styles.html
[modify] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
[modify] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
[modify] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
[modify] https://crrev.com/36a0acdb9f8022148a26ab6198098a44964c19fd/third_party/WebKit/Source/modules/accessibility/AXObject.h

Comment 4 by nek...@chromium.org, May 26 2016

Status: Fixed (was: Assigned)
The comment in the patch is wrong. It should say that we continue blending colors of all parent objects until opacity is 100%, not 50%.

Sign in to add a comment