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

Issue 619922 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

MD tab strip contrast ratios are too low

Project Member Reported by ellyjo...@chromium.org, Jun 14 2016

Issue description

WCAG (https://www.w3.org/TR/WCAG20-TECHS/G18.html) calls for text contrast ratios of:

1) an absolute minimum of 4.5:1 for regular size text
2) a recommended minimum of 7:1 for regular size text
3) an absolute minimum of 3:1 for large text (>= 18pt or >= 14pt bold)

The text in the top chrome is above the recommended minimum, but many of the other visuals in the top chrome are not:

Border : Inactive tab is 2:1
Border : Active tab is 6:1
Active tab : rest of top chrome is 1.3:1

There is a system "increase contrast" setting on Mac, which is exposed via [NSWorkspace accessibilityDisplayShouldIncreaseContrast]; if this setting is set, we should probably use darker borders and differentiate the active tab somehow (maybe with a heavy/thick border?).
 

Comment 1 by shrike@chromium.org, Jun 14 2016

These are specs for text, so that it's readable. Do different specs apply to graphics?

When you say "Border : Inactive tab is 2:1" are you literally talking about the 1px edge of the tab? If so, is it fair to single that out vs., say, the tab's contrast with the tabstrip background?

Comment 2 by shrike@chromium.org, Jun 22 2016

Cc: shrike@chromium.org
Owner: ellyjo...@chromium.org
Assigning to ellyjones@ for feedback on # 1.
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 23 2016

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

commit 0877d7c2bf39b6179782438f55966754be8ef2a5
Author: ellyjones <ellyjones@chromium.org>
Date: Thu Jun 23 17:52:41 2016

[cocoa] increase tab strip contrast in "Increase Contrast" mode

With this change, when the "Increase Contrast" accessibility option is enabled:
1) The tab strip's bottom border is drawn in black instead of grey
2) Tab edges are drawn in black instead of grey
3) The active tab's title is bolded

BUG= 619922 

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

[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/chrome/browser/themes/theme_service.h
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/chrome/browser/themes/theme_service_mac.mm
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/chrome/browser/ui/cocoa/download/background_theme.h
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/chrome/browser/ui/cocoa/download/background_theme.mm
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/chrome/browser/ui/cocoa/tabs/tab_view.h
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/chrome/browser/ui/cocoa/tabs/tab_view.mm
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/ui/base/default_theme_provider.h
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/ui/base/default_theme_provider_mac.mm
[modify] https://crrev.com/0877d7c2bf39b6179782438f55966754be8ef2a5/ui/base/theme_provider.h

Comment 4 by shrike@chromium.org, Jun 23 2016

I'm not sure your thoughts on this, but when you have a custom theme installed Chrome Mac draws a highlight along the top of the tabstrip. In this case your dark stroke is not being applied.

Screen Shot 2016-06-23 at 11.10.28 AM.png
78.9 KB View Download

Comment 5 by shrike@chromium.org, Jun 23 2016

 Issue 603171  has been merged into this issue.
#4: that's the design behavior, yeah - if the user has a theme that explicitly modifies that area, that takes precedence over the Increase Contrast setting. Do you think we should override the theme?

Comment 7 by shrike@chromium.org, Jun 23 2016

I'm not sure, actually. But the extra highlight is something we're adding to the top edge, not the theme, so we could decide to stroke it differently if we so choose.

State as of current canary.
Screen Shot 2017-02-27 at 10.19.14 AM.png
30.2 KB View Download

Comment 9 by meh...@chromium.org, Feb 27 2017

Is it correct in Incognito Mode? Top dark and bottom bright?

Please see the screenshot. Thanks.
Bildschirmfoto 2017-02-27 um 16.36.15.png
38.6 KB View Download
Status: Started (was: Assigned)
Ah, no, it is not. The top-line code is not properly checking for hasDarkTheme.
I also noted, that when you focussing the Omnibox in Incognito Mode, the focus ring appears in blue and receives squared corners. In Normal Mode, the focus ring appears in grey/black and has rounded corners.

Screenshots are attached. Is this a known issue?
Focusring_Incognito.png
15.0 KB View Download
Focusring_Normal.png
26.0 KB View Download
Fix uploaded for the tab stroke being hard to see: https://codereview.chromium.org/2719993004/

The focus ring issue is strange; I think it's because the border of the omnibox is normally obscured by the focus ring but in high-contrast it is not. I will have to look in a bit more detail.
Okay, thank you.
Cc: ellyjo...@chromium.org
 Issue 699038  has been merged into this issue.
Project Member

Comment 15 by bugdroid1@chromium.org, Mar 15 2017

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

commit af21d513d5715633fb63f879b78074bb15af8f6d
Author: ellyjones <ellyjones@chromium.org>
Date: Wed Mar 15 18:53:19 2017

cocoa: draw tabstrip stroke in white in increase-contrast incognito

The black stroke is nearly impossible to see against the dark theme.

BUG= 619922 

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

[modify] https://crrev.com/af21d513d5715633fb63f879b78074bb15af8f6d/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
[modify] https://crrev.com/af21d513d5715633fb63f879b78074bb15af8f6d/chrome/browser/ui/cocoa/tabs/tab_view.mm

Status: Fixed (was: Started)
This is fixed now :)

Comment 17 by jif@chromium.org, Mar 16 2017

Thank you!

Sign in to add a comment