Provide a general summary of the issue here
When a React Aria Link is focused via Tab and activated via Enter, neither onClick nor onPress is fired. This prevents 3rd-party routers (e.g. TanStack Router) from intercepting navigation and calling e.preventDefault(), causing the browser to fall back to native href navigation — resulting in a full page reload instead of SPA client-side navigation.
Mouse click works correctly: both onClick and onPress fire as expected.
🤔 Expected Behavior?
Pressing Enter on a focused Link should fire both onClick and onPress, identical to mouse click behavior.
<Link
href="/development"
onClick={() => console.log("onClick fired")} // ✅ should fire on keyboard Enter
onPress={() => console.log("onPress fired")} // ✅ should fire on keyboard Enter
>
Development
</Link>
Third-party routers that rely on onClick + e.preventDefault() (e.g. TanStack Router) should be able to intercept the event and perform client-side navigation without a full page reload.
😯 Current Behavior
When the link is activated via keyboard (Tab to focus → Enter to activate):
onClick is not fired ❌
onPress is not fired ❌
- Browser follows the
href natively → full page reload ❌
When activated via mouse click:
onClick fires ✅
onPress fires ✅
- SPA navigation works correctly ✅
This affects both integration approaches documented in TanStack Router's custom link guide:
// Approach 1 — createLink()
const CustomLink = createLink(AriaLink);
<CustomLink to="/development">Development</CustomLink>
// Approach 2 — _asChild (internal API)
<RouterLink to="/development" _asChild={AriaLink}>
Development
</RouterLink>
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Plain React Aria reproduction (no TSR):
- Open: https://stackblitz.com/edit/skmzpfdr?file=src%2FExample.tsx
- Open the browser console
- Click a link with the mouse → observe
onClick and onPress logged ✅
- Focus the same link with Tab and press Enter → observe nothing logged ❌
With TanStack Router integration:
- Open: https://stackblitz.com/edit/vitejs-vite-2xxlupse
- Click a link with the mouse → SPA navigation, no page reload ✅
- Focus a link with Tab and press Enter → full page reload ❌
Version
1.16.0
What browsers are you seeing the problem on?
Microsoft Edge
If other, please specify.
No response
What operating system are you using?
Window
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
Provide a general summary of the issue here
When a React Aria
Linkis focused viaTaband activated viaEnter, neitheronClicknoronPressis fired. This prevents 3rd-party routers (e.g. TanStack Router) from intercepting navigation and callinge.preventDefault(), causing the browser to fall back to nativehrefnavigation — resulting in a full page reload instead of SPA client-side navigation.Mouse click works correctly: both
onClickandonPressfire as expected.🤔 Expected Behavior?
Pressing
Enteron a focusedLinkshould fire bothonClickandonPress, identical to mouse click behavior.Third-party routers that rely on
onClick+e.preventDefault()(e.g. TanStack Router) should be able to intercept the event and perform client-side navigation without a full page reload.😯 Current Behavior
When the link is activated via keyboard (
Tabto focus →Enterto activate):onClickis not fired ❌onPressis not fired ❌hrefnatively → full page reload ❌When activated via mouse click:
onClickfires ✅onPressfires ✅This affects both integration approaches documented in TanStack Router's custom link guide:
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Plain React Aria reproduction (no TSR):
onClickandonPresslogged ✅With TanStack Router integration:
Version
1.16.0
What browsers are you seeing the problem on?
Microsoft Edge
If other, please specify.
No response
What operating system are you using?
Window
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response