Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2universalStack: react
accessibilitylinksuxhtml
Open external links in a new tab
Links that navigate to a different site should open in a new tab (target="_blank") so users don't lose the current page. Confirm intent per link; pair with rel attributes for security where relevant.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejsx
| 1 | <a href={externalUrl}>Visit partner</a> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejsx
| 1 | <a href={externalUrl} target="_blank" rel="noopener noreferrer">Visit partner</a> |
Explanation (EN)
Objašnjenje (HR)