Description
I think links to external URLs, at least to non-Carpentries websites should open a new browser tab, by adding target="_blank"
to their <a>
tags.
(If deemed sensible for security, see below, also rel="noopener"
could be added.)
My reasoning is: For users reading the course description for the first time, it feels unexpected to open external links into the same tab. It disrupts reading the course description, forcing the user to either go back-and-forth or explicitly use "open in a new tab". For example, when clicking on the location link to OpenStreetMap, I'm expecting a new tab to open, since it's a different website with a specific goal, and I usually want to keep reading the course description.
I'm aware that at least one similar discussion (#528) resulted in rejection of adding target="_blank"
, however my proposal is smaller in scope: My suggestion is to add it to external links only, not to all links.
In that discussion, also "potential issues" are mentioned, probably hinting at potential security and privacy issues mentioned at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#security_and_privacy.
Quoting the relevant section:
<a>
elements can have consequences for users' security and privacy.
See Referer header: privacy and security concerns for information.Using
target="_blank"
without rel="noreferrer" and rel="noopener" makes the website vulnerable to window.opener API exploitation attacks, although note that, in newer browser versions settingtarget="_blank"
implicitly provides the same protection as settingrel="noopener"
.
See browser compatibility for details.
Accordingly, in case it's accepted to add target="_blank"
to external links, we could also add rel="noopener"
to avoid risks of security or privacy with older browsers.