Bug 209851 - Default link colors lack sufficient contrast in the dark color scheme
Summary: Default link colors lack sufficient contrast in the dark color scheme
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
: 226893 235328 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-01 03:00 PDT by Thomas Steiner
Modified: 2023-09-10 18:22 PDT (History)
13 users (show)

See Also:


Attachments
Too low contrast for links when page in `color-scheme: dark` (498.00 KB, image/png)
2020-04-01 03:00 PDT, Thomas Steiner
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steiner 2020-04-01 03:00:34 PDT
Created attachment 395153 [details]
Too low contrast for links when page in `color-scheme: dark`

OS Version: OS X 10.15.4
URLs (if applicable): https://color-scheme-demo.glitch.me/
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
    Chrome: Fail
    Firefox: Fail (doesn't support `color-scheme` yet)
    IE/Edge: Fail (for old IE and new Edge)

What steps will reproduce the problem?
1. Go to https://color-scheme-demo.glitch.me/
2. Note how when the page is toggled to `color-scheme: dark` all user agent stylesheet link colors (apart from :active) have too low contrast.

What is the expected result?

Link colors (except for :active) should have enough contrast.

What happens instead of that?

Link colors (except for :active) don't have enough contrast.
Comment 1 Radar WebKit Bug Importer 2020-04-01 03:00:49 PDT
<rdar://problem/61149466>
Comment 2 Thomas Steiner 2020-04-01 03:12:00 PDT
Since this probably requires changes to the user agent stylesheets, it would be great to agree on a cross-browser set of dark scheme default link colors.

[Chrome](https://crbug.com/1066811)
[WebKit](https://bugs.webkit.org/show_bug.cgi?id=209851)
[Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=1626560)
Comment 3 Thomas Steiner 2020-04-01 04:50:23 PDT
I have opened https://github.com/whatwg/html/issues/5426 for cross-vendor awareness.
Comment 4 Tim Nguyen (:ntim) 2022-03-28 12:10:59 PDT
*** Bug 226893 has been marked as a duplicate of this bug. ***
Comment 5 Tim Nguyen (:ntim) 2022-03-28 12:11:05 PDT
*** Bug 235328 has been marked as a duplicate of this bug. ***
Comment 7 Aditya Keerthi 2022-08-07 22:17:46 PDT
I don’t think this is as simple as just updating the color in `RenderTheme.cpp`, I believe there is also logic on `Document.cpp` to support the `link` attribute that needs to be reworked.
Comment 8 Connor 2023-03-25 09:41:36 PDT
Are there any plans/relative priorities for fixing this? For a blog website, simply using `color-scheme: light dark` has a lot of benefits.

Firefox and Chrome have fixed their link colors in `color-scheme: dark` (on macOS/desktop at least), so I hope to see Safari support land.
Comment 9 Aditya Keerthi 2023-09-06 16:24:43 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17512
Comment 10 EWS 2023-09-10 18:22:02 PDT
Committed 267847@main (5413aa7d4157): <https://commits.webkit.org/267847@main>

Reviewed commits have been landed. Closing PR #17512 and removing active labels.