Unverified Commit 7f998950 authored by Lee Robinson's avatar Lee Robinson Committed by GitHub

Update imperative routing docs to have better a11y (#29382)

We should recommend using a `button` instead of a `span` 👍 
parent 2271cd84
...@@ -18,13 +18,13 @@ The following example shows how to do basic page navigations with [`useRouter`]( ...@@ -18,13 +18,13 @@ The following example shows how to do basic page navigations with [`useRouter`](
```jsx ```jsx
import { useRouter } from 'next/router' import { useRouter } from 'next/router'
function ReadMore() { export default function ReadMore() {
const router = useRouter() const router = useRouter()
return ( return (
<span onClick={() => router.push('/about')}>Click here to read more</span> <button onClick={() => router.push('/about')}>
Click here to read more
</button>
) )
} }
export default ReadMore
``` ```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment