Files
Sebastian "Sebbie" SilbermannandGitHub e17b1152ba [test] Current behavior of focus after next/link navigation (#89959)
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.
2026-02-18 09:26:29 -08:00

40 lines
967 B
TypeScript

import Link from 'next/link'
export default function UriFragmentsPage() {
return (
<>
<nav aria-label="table of contents">
<ol>
<li>
<Link href="#section-1">Section 1</Link>
</li>
<li>
<Link href="#section-2">Section 2</Link>
</li>
<li>
<Link href="#section-3">Section 3</Link>
</li>
</ol>
</nav>
<article style={{ height: '50vh', overflow: 'scroll' }}>
<h1>A post</h1>
<p style={{ height: '100vh' }}>some long intro</p>
<h2 id="section-1">Section 1</h2>
<p style={{ height: '100vh' }}>bla</p>
<h2 id="section-2">Section 2</h2>
<p style={{ height: '100vh' }}>bla</p>
<h2 id="section-3">Section 3</h2>
<p style={{ height: '100vh' }}>bla</p>
<h2 id="section-4">Section 4</h2>
<p style={{ height: '100vh' }}>bla</p>
</article>
</>
)
}