Closed Bug 1695199 Opened 4 years ago Closed 4 years ago

[Reader mode] Visited links in dark mode aren't contrasted enough still

Categories

(Toolkit :: Reader Mode, defect)

defect

Tracking

()

VERIFIED FIXED
88 Branch
Tracking Status
firefox87 --- verified
firefox88 --- verified

People

(Reporter: julienw, Assigned: julienw)

References

Details

Attachments

(3 files)

Attached image image.png

In bug 1546213 we addressed accessiiblity concerns about the link colors in the reader mode.

However we realized today that the visited link in dark mode uses an alpha color, and it looks like this alpha color isn't used in this context. As a result the visited link is still not contrasted enough (and TBH it isn't nice either) (see attachment).

Steps to reproduce:

  1. Go on a web page where you can activate the reader view. This one for example: https://en.wikipedia.org/wiki/Web_Accessibility_Initiative
  2. Click on any link to have a visited link, then come back.
  3. Click on the reader view button in the address bar
  4. Go on the appearance menu and activate dark mode.
  5. Contrast for visited links is too low.

(NOTE: we can't use the accessibility panel to check this, because of bug 1695198)

Hey Gijs, do you think the fact that alpha colors don't work is expected? In that case we can use a color without alpha colors.
Otherwise maybe there's an underlying bug...

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Julien Wajsberg [:julienw] from comment #1)

Hey Gijs, do you think the fact that alpha colors don't work is expected? In that case we can use a color without alpha colors.
Otherwise maybe there's an underlying bug...

So, to be clear, the visited link colour in reader mode set to its dark theme is supposed to be rgba(255, 26, 217, 0.3). But the result of changing 0.3 to 0.1 or 1 is... nothing. It doesn't look like we care about the alpha value. Emilio, why is that? I don't see anything on https://developer.mozilla.org/en-US/docs/Web/CSS/color suggesting it shouldn't work.

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(emilio)

This is part of the :visited restrictions to avoid leaking the whole browser history to pages. It is documented here.

Flags: needinfo?(emilio)

So I don't really know what the desired outcome here is supposed to be (ie if the specified alpha-containing colour would have better contrast if it were semi-transparent - seems unlikely?), but given the background is known we can pre-multiply the value we want and use that, right? Julien, are you interested in providing a patch here?

Flags: needinfo?(felash)

I'll have some work to do on m-c this week so I can have a look at this passing-by.

The current value wouldn't work (contrast is 1.34) anyway, not sure why our designer gave it to us...

In the original bug, I was suggesting a much lighter #e675fd (contrast is 5.01). Contrast-finder.org suggested #E76ECA (contrast 4.5) when I submitted the previous #B5007F.
From the previous rgb(255, 26, 217), I get #FF4FE3, , but I think it is too agressive...

My preference is still with the lighter #e675fd.
If any of you do prefer #E76ECA please say it though :-)

Assignee: nobody → felash
Flags: needinfo?(felash)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f7f22a105446 Fix the contrast of visited links in the reader's dark mode r=Gijs

Comment on attachment 9206148 [details]
Bug 1695199 - Fix the contrast of visited links in the reader's dark mode r=gijs!

Beta/Release Uplift Approval Request

  • User impact if declined: The visited links aren't contrasted enough in the reader with the dark mode, which is a problem for our users with color vision deficiencies.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is only a color change in a CSS variable that's used in one place only, so there is virtually no risk.
  • String changes made/needed: none
Attachment #9206148 - Flags: approval-mozilla-beta?
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Comment on attachment 9206148 [details]
Bug 1695199 - Fix the contrast of visited links in the reader's dark mode r=gijs!

approved for 87.0b6

Attachment #9206148 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Confirming the fix with the STR from the description using:

  • Nightly 88.0a1 (buildID 20210309094921)
  • Firefox 87.0b7 (buildID 20210307185839).
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: