Repository navigation
fix(site/src): open docs links in a new tab - #31603
Merged
Merged
Conversation
Docs links showed the external-link icon but opened in the same tab, so Link never announced "(opens in new tab)" and the icon misled sighted users. Give every docs Link target="_blank", turn the wildcard access URL docs button into a new-tab anchor, and open external notification inbox links in a new tab while links back into this deployment stay in the same tab.
jeremyruppel
reviewed
Nov 2, 2026
jeremyruppel
left a comment
Collaborator
There was a problem hiding this comment.
[reviewer-agent] round 1: changes needed.
The new-tab fix works. In Storybook, every changed link that a story renders (Templates, Workspaces, Audit, Users and org members Roles/Groups popovers, WorkspaceWildcardWarning, InboxItem markdown) now has target="_blank", its accessible name ends with " (opens in new tab)", and it shows a focus ring. The PR adds no axe violations. Every non-test docs(...) link on the branch now sets target.
Inline findings:
- [should-fix] InboxItem's origin check is a string prefix match.
- [should-fix] ×3: header "View docs" links should use
SettingsHeaderDocsLink.
Nits:
- The 3 loosened story matchers (
CoderAgentsProductCard.stories.tsx:36,LicenseCard.stories.tsx:237,TemplateVersionEditor.stories.tsx:187) sit inplayassertions that FE1 bans. Deleting them would be cleaner than loosening them. - No story renders
AIBridgeSessionsLayout, so that link was verified in code only.
Follow-ups: added evidence to DEQ-608 (same-tab links that show the external-link icon: relative inbox links, and the IconsPage GitHub link).
🤖 Generated by Coder Agents on behalf of @jeremyruppel.
jeremyruppel
marked this pull request as draft
November 2, 2026 16:51
aqandrew
marked this pull request as ready for review
November 3, 2026 18:36
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Docs links showed the external-link icon but opened in the same tab. Since #31587,
Linkannounces " (opens in new tab)" only when it really opens one, so screen reader users still heard nothing for these, and the icon misled sighted users. Every docs link now opens in a new tab, which matches coder.com's docs link behavior.Links with adocs(...)href and no target gettarget="_blank" rel="noreferrer". Several of them are inside forms (template settings, workspace parameters, create workspace, model form), where a same-tab link used to throw away unsaved input.WorkspaceWildcardWarninglinked to its docs page with a react-routerLink, so it couldn't open a new tab. It is now an anchor withNewTabLabel.{{base_url}}/@owner/...) stay in the same tab.Closes DEQ-238, Closes DEQ-268, Closes DEQ-319, Closes DEQ-401, Closes DEQ-531, Closes DEQ-574, Closes DEQ-598
Decision log
Refsin fix(site/src): give screen readers the meaning of hidden icons #31587 because their remaining links opened in the same tab.Linkdefault totarget="_blank"for absolute URLs. The default would be shorter, but it is an implicit change to a core primitive and would also affect external links that are not docs.Links that are not docs links stay as they are: internal links, the GitHub link on the Icons page,mailto:links, and the license banner, which already sets its own target.WorkspaceWildcardWarninglink (fixed), and inbox links to this deployment, which would have opened a new tab (fixed by comparing the origin).InboxItem.test.tsxchecks the accessible name for external, relative, and same-deployment links. The rest of this PR only adds attributes, and that behavior is already covered byLink.test.tsx.URL.parse), with a look-alike-origin test, and the three header "View docs" links useSettingsHeaderDocsLink. The three loosened story matchers stay: they predate this PR, and deletingplayassertions is out of scope.