Opened 6 months ago

Last modified 5 months ago

#29424 new enhancement

Differentiate between internal and external links

Reported by: irl Owned by: hiro
Priority: Medium Milestone:
Component: Webpages/Styleguide Version:
Severity: Normal Keywords:
Cc: metrics-team, antonela Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Currently Tor Metrics opens external links in a new tab. This is bad for two reasons:

1) It gives external pages access to window.opener.location which could be used to redirect Tor Metrics users discreetly to a non-Tor Metrics site that does malicious things but looks like Tor Metrics
2) It is bad for accessibility where users may use assistive technology that is upset when new tabs appear
3) It is bad for users that might not want new tabs all over the place and are perfectly capable of using the back button

It would still be good to be able to distinguish visually where there are external vs. internal links. I will leave the actual design/implementation up to UX people as I have no suggestions that I think are great.

The following StackOverflow post talks about a CSS selector that can be used for external links:

https://stackoverflow.com/questions/5379752/css-style-external-links

Child Tickets

Change History (3)

comment:1 Changed 5 months ago by karsten

Happy to change this on the Tor Metrics side if this is bad. I was under the impression that it's a good thing, but that impression may be very old or very wrong.

So, right now we're writing external links as:

<a href="https://shadow.github.io/" target="_blank">Shadow</a>

I assume we'd remove the target and instead define some class for external links and use that for the styling? I can try that if the approach sounds sane.

comment:2 Changed 5 months ago by irl

The idea was to do something consistent across the whole Tor web presence. The _blank thing is bad for a lot of reasons, but I'm not sure what the best practice "right" thing is to do. We would apply this as part of the Bootstrap 4 update once it is integrated to the styleguide.

comment:3 Changed 5 months ago by karsten

Sounds good to me. Leaving things as they are until there's a plan for moving forward. Thanks!

Note: See TracTickets for help on using tickets.