New issue
Advanced search Search tips

Issue 913227 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Accessibility: Focused tab not visually visible in some themes

Reported by thebox...@gmail.com, Dec 8

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36

Steps to reproduce the problem:
1. Open Chrome
2. Focus a tab

What is the expected behavior?
User is able to see the difference between tabs. Especially the focused tab at a glance.

What went wrong?
UI Designer made a mistake / didn't do user testing before shipping new tab UI.
Users are no longer able to opt-in to traditional tabs that were more visually distinct.

Did this work before? Yes 70?

Chrome version: 71.0.3578.80  Channel: stable
OS Version: OS X 10.13.4
Flash Version:
 
Image 2018-12-08 at 5.21.26 PM.png
483 KB View Download
Labels: Needs-Feedback
Can you please post the link to the Theme from your screenshot?
Labels: Needs-Triage-M71
I had a similar problem. Went to settings and changed the theme. It seems like my old theme (which I no longer see now in settings) was not compatible with the latest changes...
Cc: thomasanderson@chromium.org
CC thomasanderson@. Hostile contrast calculation here?
OP which theme are you using?
I'll +1 hostile contrast.

To be honest, the new tabs just don't accessibility into consideration. The visual contrast and distinction between tabs has been lost with the design refresh. In addition the focused tab is no longer visible in the new design.

Theme:
https://chrome.google.com/webstore/detail/a-bit-windy/dcjbpfmipgelldfjkdodmghlfcooadld

Regardless of theme, in my opinion the contrast issues persist. I consider myself a fairly able bodied person. I would be curious how what accessibility consideration have been put in place with the new UI.

I've attached a screenshot of when the chrome tabs were visually more distinct.
Capturegggg.PNG
125 KB View Download
Project Member

Comment 7 by sheriffbot@chromium.org, Dec 17

Cc: meh...@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: lgrey@chromium.org
Status: Available (was: Unconfirmed)
Summary: Accessibility: Focused tab not visually visible in some themes (was: Accessibility: Focused tab not visually visible.)
I'll look at this if I have time this week, but not assigning in case someone else has more immediate bandwidth for it.
Owner: thomasanderson@chromium.org
Status: Started (was: Available)
The issue is that the theme's manifest.json looks something like this:

{
   "theme": {
      "colors": {
         "frame": [ 66, 116, 201 ],
         "toolbar": [ 223, 223, 223 ]
      },
      "images": {
         "theme_frame": "images/theme_frame.png",
         "theme_toolbar": "images/theme_toolbar.png"
      }
   }
}

When we compute the contrast ratio between ["theme"]["colors"]["frame"] and ["theme"]["colors"]["toolbar"], we get 3.44 which is above the threshold where we would draw strokes.  But the given colors are blue and light gray, which don't match the greenish color of the images.
Here's a way we could solve this:

* Verify that when there are toolbar/frame images, the toolbar/frame colors are not used to directly draw UI except for the cases noted in the next bullet.  If this isn't true, fix (may need to add theme processing for toolbar image to blend against toolbar color, or mirroring for image to ensure it tiles over the full draw area)
* Introduce new bookmark bar, infobar, and frame border color constants, which inherit their values from the toolbar/frame colors specified by the theme
* Remove the conditional check on the existing "compute a toolbar/frame color from the provided image if the author didn't specify one" code, so it always computes

At this point, when there are toolbar/frame images, the toolbar/frame colors should only be used for contrast checks, and should always have a representative color in them.

This removes the ability of theme authors to "work around" our color computations, but the claim is that was usually a bug rather than a feature.
Owner: rameier@chromium.org
Grabbing this bug since I've fixed some similar issues in the past.
Another example. There are 4 tabs and a new tab button.
Image 2018-12-19 at 9.55.22 AM.png
47.4 KB View Download

Comment 13 Deleted

I'm finishing up a patch that should fix this using a method similar to what pkasting@ mentioned above (when the toolbar has an image, always use the computed color for contrast calculations).

Here are two screenshots of this theme with the patch applied for reference.
ThemeTabStroke_Icons.PNG
27.7 KB View Download
ThemeTabStroke_IconsAndNames.PNG
108 KB View Download
Project Member

Comment 15 by bugdroid1@chromium.org, Jan 4

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

commit fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb
Author: Ryan Meier <rameier@chromium.org>
Date: Fri Jan 04 16:10:32 2019

Added toolbar color processing to BrowserThemePack

To fix a class of theme-related contrast bugs, BrowserThemePack now does processing for the toolbar to generate COLOR_TOOLBAR by compositing the provided image with the color it will be drawn on top of, and then samples that image into COLOR_TOOLBAR - this solves some issues with contrast checking not working properly if a toolbar image is specified alongside an explicit toolbar color that doesn't represent the color of the image.  Additionally, COLOR_FRAME (and its variants) now similarly get replaced with the values computed from their composited images regardless of whether an explicit color was provided (previously, the colors only got set as such if there was no explicit color provided).

To preserve some existing behavior, any explicit color provided for COLOR_TOOLBAR is copied into COLOR_INFOBAR (new), and COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND (existing), and several UI elements have been updated to draw using those colors instead of COLOR_TOOLBAR.

Bug: 913227
Change-Id: Idc4166f3f4e4ee75f178fddc40458b03883e85cc
Reviewed-on: https://chromium-review.googlesource.com/c/1387154
Commit-Queue: Ryan Meier <rameier@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619961}
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/themes/browser_theme_pack.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/themes/browser_theme_pack.h
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/themes/browser_theme_pack_unittest.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/themes/theme_properties.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/themes/theme_properties.h
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/themes/theme_service_browsertest.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/ui/views/download/download_item_view.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/ui/views/download/download_shelf_view.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/ui/views/infobars/infobar_view.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/ui/views/status_bubble_views.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/browser/ui/views/toolbar/toolbar_view.cc
[modify] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/test/data/extensions/theme/Cached Theme.pak
[add] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/images/theme_frame.png
[add] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/images/theme_toolbar.png
[add] https://crrev.com/fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/manifest.json

Project Member

Comment 16 by bugdroid1@chromium.org, Jan 4

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

commit f73cead2d3c3488a6260d257e7cb83efb93ceee0
Author: Xida Chen <xidachen@chromium.org>
Date: Fri Jan 04 18:38:15 2019

Revert "Added toolbar color processing to BrowserThemePack"

This reverts commit fbafdddd9be6bef4a9e57f0be58202aa96b6d3eb.

Reason for revert:
causing failure to the unit test here:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20ChromiumOS%20MSan%20Tests/10553

Original change's description:
> Added toolbar color processing to BrowserThemePack
> 
> To fix a class of theme-related contrast bugs, BrowserThemePack now does processing for the toolbar to generate COLOR_TOOLBAR by compositing the provided image with the color it will be drawn on top of, and then samples that image into COLOR_TOOLBAR - this solves some issues with contrast checking not working properly if a toolbar image is specified alongside an explicit toolbar color that doesn't represent the color of the image.  Additionally, COLOR_FRAME (and its variants) now similarly get replaced with the values computed from their composited images regardless of whether an explicit color was provided (previously, the colors only got set as such if there was no explicit color provided).
> 
> To preserve some existing behavior, any explicit color provided for COLOR_TOOLBAR is copied into COLOR_INFOBAR (new), and COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND (existing), and several UI elements have been updated to draw using those colors instead of COLOR_TOOLBAR.
> 
> Bug: 913227
> Change-Id: Idc4166f3f4e4ee75f178fddc40458b03883e85cc
> Reviewed-on: https://chromium-review.googlesource.com/c/1387154
> Commit-Queue: Ryan Meier <rameier@chromium.org>
> Reviewed-by: Peter Kasting <pkasting@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#619961}

TBR=pkasting@chromium.org,rameier@chromium.org

Change-Id: I1b5cf5180ad970195a753ef51a9c1bd948bc29b5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 913227
Reviewed-on: https://chromium-review.googlesource.com/c/1396169
Reviewed-by: Xida Chen <xidachen@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620006}
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/themes/browser_theme_pack.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/themes/browser_theme_pack.h
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/themes/browser_theme_pack_unittest.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/themes/theme_properties.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/themes/theme_properties.h
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/themes/theme_service_browsertest.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/ui/views/download/download_item_view.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/ui/views/download/download_shelf_view.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/ui/views/infobars/infobar_view.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/ui/views/status_bubble_views.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/browser/ui/views/toolbar/toolbar_view.cc
[modify] https://crrev.com/f73cead2d3c3488a6260d257e7cb83efb93ceee0/chrome/test/data/extensions/theme/Cached Theme.pak
[delete] https://crrev.com/c02001b6b55026de15b4feb77ea11ac346c3ee0e/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/images/theme_frame.png
[delete] https://crrev.com/c02001b6b55026de15b4feb77ea11ac346c3ee0e/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/images/theme_toolbar.png
[delete] https://crrev.com/c02001b6b55026de15b4feb77ea11ac346c3ee0e/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/manifest.json

Project Member

Comment 17 by bugdroid1@chromium.org, Jan 4

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

commit 44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c
Author: Ryan Meier <rameier@chromium.org>
Date: Fri Jan 04 23:45:07 2019

Relanding 'Added toolbar color processing to BrowserThemePack' (CL 1387154)

Bug: 913227
Change-Id: Ic2e96b96bd9239c39ffe5023d5b6aa7465f91558
Reviewed-on: https://chromium-review.googlesource.com/c/1396496
Commit-Queue: Ryan Meier <rameier@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620110}
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/themes/browser_theme_pack.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/themes/browser_theme_pack.h
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/themes/browser_theme_pack_unittest.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/themes/theme_properties.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/themes/theme_properties.h
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/themes/theme_service_browsertest.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/ui/views/download/download_item_view.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/ui/views/download/download_shelf_view.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/ui/views/infobars/infobar_view.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/ui/views/status_bubble_views.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/browser/ui/views/toolbar/toolbar_view.cc
[modify] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/test/data/extensions/theme/Cached Theme.pak
[add] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/images/theme_frame.png
[add] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/images/theme_toolbar.png
[add] https://crrev.com/44a797d5cb8aa4f5db1e8dbdaff28740bd3aea0c/chrome/test/data/extensions/theme_test_toolbar_frame_images_and_colors/manifest.json

Owner: ----
Status: Available (was: Started)
Mass-unassigning bugs from rameier@.

Sign in to add a comment