mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
We try to focus the new Segment after navigation. This behavior currently has now tests. I plan to change that behavior behind `experimental.appNewScrollHandler` so I'm adding some tests for the current behavior. The test is also meant as a fixture for manual testing with a screen reader.
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import type { ReactNode } from 'react'
|
|
import Link from 'next/link'
|
|
import './styles.css'
|
|
|
|
export default function Root({ children }: { children: ReactNode }) {
|
|
return (
|
|
<html>
|
|
<body>
|
|
<nav aria-label="Main navigation">
|
|
<ul>
|
|
<li>
|
|
<Link href="/">Home</Link>
|
|
</li>
|
|
<li>
|
|
<Link href="/interactive-segment">Interactive Segment</Link>
|
|
</li>
|
|
<li>
|
|
<Link href="/scrollable-segment">Scrollable Segment</Link>
|
|
</li>
|
|
<li>
|
|
<Link href="/segment-with-focusable-descendant">
|
|
Segment with focusable descendant
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
<Link href="/uri-fragments#section-2">
|
|
to URI fragment in different Segment
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
<Link href="/uri-fragments">Segment with URI fragments</Link>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<main>{children}</main>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|