René's URL Explorer Experiment


Title: Define focus restoration for controlled dialogs · Issue #1209 · TanStack/tanstack.com · GitHub

Open Graph Title: Define focus restoration for controlled dialogs · Issue #1209 · TanStack/tanstack.com

X Title: Define focus restoration for controlled dialogs · Issue #1209 · TanStack/tanstack.com

Description: Evidence Merged PR #1205 moved shipping overlays onto the shared Radix-backed Dialog, but the controlled-dialog call sites do not register an opener with DialogTrigger. Current source has 16 controlled Dialog roots and no shipping Dialog...

Open Graph Description: Evidence Merged PR #1205 moved shipping overlays onto the shared Radix-backed Dialog, but the controlled-dialog call sites do not register an opener with DialogTrigger. Current source has 16 contro...

X Description: Evidence Merged PR #1205 moved shipping overlays onto the shared Radix-backed Dialog, but the controlled-dialog call sites do not register an opener with DialogTrigger. Current source has 16 contro...

Opengraph URL: https://github.com/TanStack/tanstack.com/issues/1209

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Define focus restoration for controlled dialogs","articleBody":"## Evidence\n\nMerged PR #1205 moved shipping overlays onto the shared Radix-backed `Dialog`, but the controlled-dialog call sites do not register an opener with `DialogTrigger`.\n\nCurrent source has 16 controlled `Dialog` roots and no shipping `DialogTrigger` usage. Radix stores the trigger in `context.triggerRef`, then its modal `onCloseAutoFocus` handler prevents the browser default and calls `context.triggerRef.current?.focus()`. Without a registered trigger, that ref is null, so keyboard focus is not restored to the control that opened the dialog.\n\nThis is straightforward for colocated single openers, such as the NPM baseline package picker. It is not one mechanical change for every caller:\n\n- Some dialogs are controlled by an opener in a parent component.\n- The admin role removal dialog has one dynamic opener per table row.\n- Some design-system examples currently keep their opener outside the `Dialog` root.\n\nRepeated title, body, keyword, and open-PR searches found no existing owner. Issue #775 tracks unrelated empty-name, label, landmark, and skip-navigation findings.\n\n## Expected impact\n\nClosing a dialog should return keyboard and assistive-technology users to the control that opened it. Falling back to the document body loses their place and makes repeated actions harder.\n\n## Proposed direction\n\nAdopt one explicit controlled-dialog focus contract:\n\n1. Require `DialogTrigger asChild` for dialogs with one colocated opener.\n2. Add a typed shared API for external or dynamic openers, such as an explicit restore-focus ref or a narrowly exposed Radix close-auto-focus callback.\n3. Add a browser-level regression test that opens a dialog, closes it with Escape and the close button, and verifies focus returns to the actual opener.\n\n## Alternatives and tradeoffs\n\n- Requiring `DialogTrigger` everywhere keeps the shared API smallest, but dynamic table-row openers would need dialog state and content moved per row or another structural change.\n- Restoring the previously active element automatically inside `DialogContent` reduces call-site work, but it changes every dialog and can restore focus to a stale or unrelated node when opening is indirect.\n- Exposing only `onCloseAutoFocus` matches Radix directly, but every caller must repeat the same focus logic and the shared primitive cannot enforce consistency.\n\n## Decision needed\n\n@tannerlinsley, should the shared controlled-dialog contract support both `DialogTrigger` for colocated openers and an explicit restore-focus ref for external or dynamic openers, or should every dialog be restructured so one `DialogTrigger` always owns the opener?\n\nSource: #1205\n","author":{"url":"https://github.com/tannerlinsley","@type":"Person","name":"tannerlinsley"},"datePublished":"2026-09-01T15:36:42Z","url":"https://github.com/TanStack/tanstack.com/issues/1209"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7ea3a7af-289e-5aef-f9f0-f61b380b3435
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idED2A:1EDECA:3BEDE1D:4EEBAB6:6AF999C6
html-safe-nonce99b6f491cecf9cccc44021ce054d4209d162e135dc7463e2b34ab673b40800be
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDJBOjFFREVDQTozQkVERTFEOjRFRUJBQjY6NkFGOTk5QzYiLCJ2aXNpdG9yX2lkIjoiNTYyNDczNTQyNTEzOTE1MzM1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb36da4bc918fbc8ff0787e3d1bacf4215684f4b923c1dbec7ff73ed22b0f0436
hovercard-subject-tagissue:5313797886
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TanStack/tanstack.com/1209/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7513cd51553a27bae0e9c24948bf7cb6d12166630f1c96502b9ba61cb2b61b01/TanStack/tanstack.com/issues/1209
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7513cd51553a27bae0e9c24948bf7cb6d12166630f1c96502b9ba61cb2b61b01/TanStack/tanstack.com/issues/1209
og:image:altEvidence Merged PR #1205 moved shipping overlays onto the shared Radix-backed Dialog, but the controlled-dialog call sites do not register an opener with DialogTrigger. Current source has 16 contro...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametannerlinsley
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/TanStack/tanstack.com git https://github.com/TanStack/tanstack.com.git
octolytics-dimension-user_id72518640
octolytics-dimension-user_loginTanStack
octolytics-dimension-repository_id297489727
octolytics-dimension-repository_nwoTanStack/tanstack.com
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id297489727
octolytics-dimension-repository_network_root_nwoTanStack/tanstack.com
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/TanStack/tanstack.com/issues/1209#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTanStack%2Ftanstack.com%2Fissues%2F1209
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTanStack%2Ftanstack.com%2Fissues%2F1209
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=TanStack%2Ftanstack.com
Reloadhttps://github.com/TanStack/tanstack.com/issues/1209
Reloadhttps://github.com/TanStack/tanstack.com/issues/1209
Reloadhttps://github.com/TanStack/tanstack.com/issues/1209
TanStackhttps://github.com/TanStack
tanstack.comhttps://github.com/TanStack/tanstack.com
Codehttps://github.com/TanStack/tanstack.com
Issues20 (20)https://github.com/TanStack/tanstack.com/issues
Pull requests64 (64)https://github.com/TanStack/tanstack.com/pulls
Discussionshttps://github.com/TanStack/tanstack.com/discussions
Actionshttps://github.com/TanStack/tanstack.com/actions
Security and qualityhttps://github.com/TanStack/tanstack.com/security
Insightshttps://github.com/TanStack/tanstack.com/pulse
https://github.com/TanStack/tanstack.com
New issuehttps://github.com/login?return_to=https://github.com/TanStack/tanstack.com/issues/1209
New issuehttps://github.com/login?return_to=https://github.com/TanStack/tanstack.com/issues/1209
Define focus restoration for controlled dialogshttps://github.com/TanStack/tanstack.com/issues/1209#top
source-auditTracked by the automated source audithttps://github.com/TanStack/tanstack.com/issues?q=state%3Aopen%20label%3A%22source-audit%22
https://github.com/tannerlinsley
tannerlinsleyhttps://github.com/tannerlinsley
on Sep 1, 2026https://github.com/TanStack/tanstack.com/issues/1209#issue-5313797886
#1205https://github.com/TanStack/tanstack.com/pull/1205
#775https://github.com/TanStack/tanstack.com/issues/775
@tannerlinsleyhttps://github.com/tannerlinsley
#1205https://github.com/TanStack/tanstack.com/pull/1205
tannerlinsleyhttps://github.com/tannerlinsley
source-auditTracked by the automated source audithttps://github.com/TanStack/tanstack.com/issues?q=state%3Aopen%20label%3A%22source-audit%22
on Sep 1, 2026https://github.com/TanStack/tanstack.com/issues/1209#event-30356680828
https://github.com/AmirAliAzimloo
AmirAliAzimloohttps://github.com/AmirAliAzimloo
on Sep 16, 2026https://github.com/TanStack/tanstack.com/issues/1209#issuecomment-5695222342
@tannerlinsleyhttps://github.com/tannerlinsley
https://github.com/tannerlinsley
tannerlinsleyhttps://github.com/tannerlinsley
on Oct 15, 2026https://github.com/TanStack/tanstack.com/issues/1209#issuecomment-6188704409
#1287https://github.com/TanStack/tanstack.com/pull/1287
#1287https://github.com/TanStack/tanstack.com/pull/1287
Sign up for freehttps://github.com/signup?return_to=https://github.com/TanStack/tanstack.com/issues/1209
Sign in to commenthttps://github.com/login?return_to=https://github.com/TanStack/tanstack.com/issues/1209
source-auditTracked by the automated source audithttps://github.com/TanStack/tanstack.com/issues?q=state%3Aopen%20label%3A%22source-audit%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.