Open the repository link in a new tab - #4
Open
FurkaanBoraa wants to merge 1 commit into
Open
Conversation
The link is already labelled with an ↗ arrow, which is the conventional promise that it leaves the site. It did not: it replaced the landing page in the same tab, so a reader who clicked it to glance at the repo lost the page they were reading. rel="noopener" alongside, so the opened page gets no handle on window.opener. Not noreferrer: the referrer is how GitHub's traffic panel shows that visitors arrived from rectzones.app, and that is worth keeping. Only this link changes. It is the one that carries the arrow, so it is the one whose behaviour was inconsistent with its own label; the other external links make no such promise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small one. The header link is labelled:
The
↗is the conventional promise that the link leaves the site — but it did not. It replaced the landing page in the same tab, so a reader who clicked it to glance at the repo lost the page they were reading and had to come back through history. The label and the behaviour disagreed; this makes the behaviour match the label.Two deliberate choices
rel="noopener", but notnoreferrer.noopenerdenies the opened page a handle onwindow.opener.noreferrerwould additionally strip the referrer — and the referrer is exactly what makes visits show up as coming fromrectzones.appin the repo's traffic panel. Modern browsers implynoopenerfortarget="_blank"anyway; it is written out so the intent survives anyone reading the markup.Only this link changes. The page has four other external links (the
★ View on GitHubCTA, the README link, andSource on GitHub/Rectanglein the footer). None of them carries the arrow, so none of them is currently making a promise it breaks. Changing them too would be a behaviour change with no signal to justify it, and unannounced new tabs are a real accessibility complaint (WCAG 3.2.5) — the arrow is what defuses that here.Worth a separate decision, not assumed in this PR: the hero
★ View on GitHubCTA has the opposite argument going for it. It is the primary conversion action, and sending people off the landing page in the same tab is arguably not what you want either — but that needs its own affordance rather than a silenttarget="_blank". Say the word and I will open one.Verification
Served the page and clicked the link in a real browser: the source tab stayed on the landing page instead of navigating away, which is the actual behaviour this fixes. Attributes confirmed live in the DOM (
target="_blank",rel="noopener"), and the other four external links confirmed unchanged.Note
Opened from a fork —
pullonly on this repo. Independent of #2 (security-policy footer link) and #3 (copy button); the three touch different parts of the file and can merge in any order.