Opened 21 months ago

Last modified 15 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:


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:

Child Tickets

Change History (5)

comment:1 Changed 21 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="" 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 21 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 21 months ago by karsten

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

comment:4 Changed 15 months ago by pili

What's the status of this one? Have we updated to Bootstrap 4 yet?

If so, what are the next steps?

comment:5 Changed 15 months ago by irl

What's the status of this one?

Not in the current roadmap.

Have we updated to Bootstrap 4 yet?


Note: See TracTickets for help on using tickets.