In T213778#8218136, @alexhollender_WMF wrote:@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.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Don't re-color :visited links that act as buttons | mediawiki/extensions/DiscussionTools | master | +16 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T320798 [EPIC] :visited link styling should not be applied to button-type-links | |||
Resolved | Esanders | T319019 Reply link and subscribe buttons are using :visited colours |
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:
- Set the link colour of :visited manually in the stylesheet, although the colour changes from skin to skin
- 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
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
+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.