rsnext/test/integration/client-navigation-a11y/pages/page-with-h1.js
Kitty Giraudel 3ceb9c5673
Give priority to document.title over h1 when announcing page change (#31147)
## Improvement

This pull-request should address https://github.com/vercel/next.js/issues/24021, improving the page change announcement for assistive technologies by giving priority to `document.title` over `h1`. Interestingly, it would also improve a potential performance bottleneck by skipping calls to `innerText` on the main `h1` raised in [this comment](https://github.com/vercel/next.js/pull/20428#issuecomment-962537038).
2021-11-08 14:58:21 +00:00

6 lines
116 B
JavaScript

export default () => (
<div id="page-with-h1">
<h1>My heading</h1>
<div>Extraneous stuff</div>
</div>
)