Page MenuHomePhabricator

Reply link and subscribe buttons are using :visited colours
Closed, ResolvedPublic

Description

@ppelberg @nayoub @Esanders: it seems that on Talk pages, in both Legacy Vector and Vector 2022, the [ reply ] and [ unsubscribe ] links/buttons are able to get :visited styling. I never noticed this until recently, when we made the :visited styling more distinct from the normal link styling. I wonder whether or not it makes sense for these links/buttons to be able to get :visited styling (my initial thought is that it doesn't make sense)? What do you all think? And if you agree that it doesn't make sense, should we prioritize changing this? I believe this will no longer be an issue with the updated Talk pages, since they use buttons instead of links for Reply and Unsubscribe, though I don't know how soon that will be rolled out everywhere.

Screen Shot 2022-09-07 at 12.07.09 PM.png (2×3 px, 1 MB)

Event Timeline

I would agree not - these are buttons styled as links, not really links to other pages, so I don't think the :visited colour makes sense here.

Technical approaches:

  1. Set the link colour of :visited manually in the stylesheet, although the colour changes from skin to skin
  2. Set the link href to something unique that doesn't exist, e.g. '#subscribe-<id>'. The link handler prevents default so this link is never visited (unless you middle/ctrl click). One could even set it to '#<random number>'

Change 837102 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Don't re-color :visited links that act as buttons

https://gerrit.wikimedia.org/r/837102

While (2) would be more future proof and skin-agnostic, it requires adding a bunch of useless data to the HTML which seems worse.

n.b. This is not an issue on pages using visual enhancements, as these links become proper OOUI buttons.

Change 837102 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Don't re-color :visited links that act as buttons

https://gerrit.wikimedia.org/r/837102

I would agree not - these are buttons styled as links, not really links to other pages, so I don't think the :visited colour makes sense here.

+1 cc @nayoub for final design "okay."

Also, great spot, @alexhollender_WMF – thank you for drawing our attention to this issue.

Thanks for the ping @ppelberg and for spotting this @alexhollender_WMF!
I agree with @Esanders: although styled as links, these are buttons so :visited colour doesn't make sense here.