Open every link in the same tab - #77
Conversation
The footer was the only place external links stayed in the same tab. Its four external links (Substack, Pine Peak Digital, Stack Overflow, Ko-fi) now carry target="_blank" and rel="noopener noreferrer", matching the convention set on PR #75 and used everywhere else on the site. The internal /uses link previously carried rel="noopener noreferrer" with no target, which did nothing; it now carries neither. Verified across the whole built site: of 84 anchors, all 74 external ones have target and rel, all 10 internal ones have neither, and nothing is mismatched. The rule is now written down in knowledge.md, since it drifted silently once. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reverses the previous commit on this branch. Current best practice is to default to same-tab navigation regardless of whether the destination is external, and to reach for target="_blank" only where it protects in-progress work — a form, editor, or checkout. This site has none of those, so "it's external" was the only justification and that isn't enough: a new tab takes control away from the reader, and anyone who wants one can middle-click. Removes target="_blank" and rel="noopener noreferrer" from every link in src/. Verified across the built site: 84 anchors, 74 of them external, none carrying target or rel. Two things fall out of it: - rel="noreferrer" was not harmless. Unlike noopener, it applies to same-tab navigation too, so it was stripping the Referer header and preventing Substack, Pine Peak Digital and Stack Overflow from seeing this site as a traffic source. That is the opposite of useful when the open question is whether this site sends anyone anywhere. (I earlier described the footer's rel-without-target as inert; that was wrong for the noreferrer half.) - Both isExternal helpers existed only to decide target, so both are now deleted along with the duplication between them. knowledge.md now records the same-tab rule and what to do if a link ever does need a new tab: rel="noopener", never noreferrer, plus a visible cue. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 45 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository: narthur/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The footer was the only place external links stayed in the same tab. Rather than make the footer match the rest of the site, this makes the rest of the site match the footer — following current best practice, which is to default to same-tab navigation regardless of whether the destination is external, and reach for
target="_blank"only where it protects in-progress work (a form, an editor, a checkout).This site has none of those. "It's external" was the only justification, and that isn't enough: a new tab takes control away from the reader, and anyone who wants one can middle-click.
What changed
target="_blank"andrel="noopener noreferrer"removed from every link insrc/. Verified across the built output: 84 anchors, 74 of them external, none carryingtargetorrel.rel="noreferrer"was not harmlessWorth calling out separately, because it was quietly costing something. Unlike
noopener,noreferrerapplies to same-tab navigation too — it suppresses theRefererheader unconditionally. So every click through to Substack, Pine Peak Digital or Stack Overflow arrived with no referrer, and none of those could attribute the traffic to nathanarthur.com.That's the opposite of useful given the open question of whether this site sends anyone anywhere. If a link ever does need a new tab, the rule is now
rel="noopener"— nevernoreferrer— plus a visible cue in the label.Falls out for free
Both
isExternalhelpers existed only to decidetarget, so both are deleted, along with the duplication between the copy in+page.svelteand the one in+layout.svelte.Accessibility
A net improvement. Unexpected new-tab navigation without warning is a documented WCAG failure mode (SC 3.2.5), and there were no "opens in new tab" cues anywhere to make it safe. Removing the behaviour removes the problem rather than papering over it.
Notes
knowledge.mdrecords the same-tab rule and what to do if an exception is ever needed. The repo's review learnings previously requiredtarget="_blank"on external links (a convention from PR #75) — that entry now records the reversal, so future reviews don't flag this as a regression.Judgment call worth surfacing: the footer carries a newsletter email field on every page, which is technically "a form" under the best-practice exception. I didn't treat it as one — a single optional email input isn't in-progress work worth protecting, and the back button covers it.
pnpm lint,pnpm check,pnpm testandpnpm buildall pass.🤖 Generated with Claude Code