Browser-laptop: CSS for visited links ( A:Visited ) does not work

Created on 1 Feb 2016  Â·  16Comments  Â·  Source: brave/browser-laptop

Related to #505 and #444 and as requested by @bbondy in the former.

CSS related to the "A:Visited" CSS object is not displayed even when the user has visited a link and then returned to the original page. This is NOT a CSS issue because (for example) the A:Hover CSS works fine, but seems to be related to the unimplemented history functionality

Steps to reproduce. Original

  1. Google Something e.g. "brave issues"
  2. Go to the page of one of the hits
  3. Go back to the google search page
  4. Note that the link you visitied is still blue not purple as it is with any other browser

Steps to reproduce new

  1. Create two html files test1.htm and test 2.htm as attached.
  2. Go to the first one.
  3. Note color to link to second one
  4. Click on link
  5. Note color of link back to first one

testhtm.zip

Qchecked-Linux Qchecked-Win32 Qchecked-Win64 Qchecked-macOS Qtest-plan-specified bug parity release-noteinclude

Most helpful comment

a pretty cool optional feature

Not sure I agree. This is a fundamental browsing UX feature, esp. on any sites that you return to frequently that it's likely desirable to be on by default. Ever since I switch to Brave as my default, this is the single major issue I have with it. It is painful on various classified ad websites (planning some big purchases...) and it is painful on search engines (esp. when searching for the same thing using different keywords).

There may be scope for some intelligent handling if this is an "optional" feature (e.g. suggest to turn it on if the site is visited frequently and has long lists and the visitor is going through these lists clicking multiple items). In fact in the situation described, I'd even consider a notification to turn on the visited link highlighting even if the website sheet does not have :visited configured.

All 16 comments

This makes aggregator sites like Hacker News and Reddit harder to use because it's impossible to tell at a glance what links you've visited or not.

I'm guessing this is based on a misunderstanding of the privacy risk: although other browsers allow modifying some of the visual properties of visited links (especially color) the visited state is not exposed to the DOM (e.g. via element.matches) and the styling can not use properties that would alter the link in a way that is recognisable in JS (e.g. switching fonts to check for a size difference).

@jonathansampson I know we had an issue in which we documented why this was not enabled, but I'm having trouble finding it. Do you have any info about that?

Regardless, it would be a pretty cool optional feature (maybe allow a setting to enable, default to false).

~I think #6395 is probably related to this issue. So this might be with all link styles in general~
Update it wasn't the case, the problem was (and still is) within Chromium project.

a pretty cool optional feature

Not sure I agree. This is a fundamental browsing UX feature, esp. on any sites that you return to frequently that it's likely desirable to be on by default. Ever since I switch to Brave as my default, this is the single major issue I have with it. It is painful on various classified ad websites (planning some big purchases...) and it is painful on search engines (esp. when searching for the same thing using different keywords).

There may be scope for some intelligent handling if this is an "optional" feature (e.g. suggest to turn it on if the site is visited frequently and has long lists and the visitor is going through these lists clicking multiple items). In fact in the situation described, I'd even consider a notification to turn on the visited link highlighting even if the website sheet does not have :visited configured.

As a citation for the claim that this is a fundamental usability feature:

https://www.nngroup.com/articles/change-the-color-of-visited-links/

I think it can even be argued that this is an accessibility feature because it reduces the cognitive load when browsing link lists (e.g. reddit, HN, as above), especially for people with mild cognitive disabilities.

+1 from user @da0ist. I definitely miss the purple visited links myself. It would be great if this was addressed soon

I think this is something every other browser has. It would be nice to have a setting for it.

@bsclifton @Liunkae I suspect we don't preserve a:visited styles in order to further protect user privacy: If I flood the DOM with links, and check their rendered color, I can tell where you go (and fingerprint you).

We may consider allowing the styling, but breaking the integrity of getComputedStyle, such that it returns the a:link color, rather than the a:visited color. I believe this is what some browsers today are doing. I'd love to get @diracdeltas' input on this approach as a potential alternative to full-on blocking.

i'm pretty sure other browsers visually support CSS visited differentiation; they just lie about it in getComputedStyle to prevent fingerprinting.

@diracdeltas I'm surprised we don't _get this for free_ from Chromium… Or did we?

As of 0.15.310, visited links seem to be highlighted for me.

See also #9351 (Visited links are not reset when history is cleared)

@bbondy @alexwykoff should we close this? it seems to be working now

I tested and this seems fixed now

tested on google result

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathansampson picture jonathansampson  Â·  3Comments

octohedron picture octohedron  Â·  3Comments

luixxiul picture luixxiul  Â·  3Comments

jkup picture jkup  Â·  3Comments

jonathansampson picture jonathansampson  Â·  3Comments