Add option to turn off next-route-announcer
#48097
Replies: 4 comments 2 replies
-
|
An ugly workaround is to set the display of the route-announcer to none. The component remains in the document, but at least screen-readers don't read the content. |
Beta Was this translation helpful? Give feedback.
-
|
next-route-announcer{ add this to global.css and done. |
Beta Was this translation helpful? Give feedback.
-
|
The CSS workarounds do not solve this issue. The component must not be included in the DOM. Is there no way to disable it? I keep receiving this error in our production build, and NextJS seems to force this component with no way to disable it. |
Beta Was this translation helpful? Give feedback.
-
|
This is causing hydration issues due to: <next-route-announcer style="position: absolute"></next-route-announcer>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
next-route-announcerNon-Goals
next-route-announcerby default (it's good that it's on out-of-the-box)Background
next-route-announcer/ https://nextjs.org/docs/accessibility#route-announcements assumes it's strategy of an assertive ARIA live region that announces the page title / h1 / pathname is desirable for all apps.But many apps explicitly manage focus on route transitions (ex: Slack), moving it between interactive elements. Screen readers and other assistive technologies follow/announce focus, so
next-route-announceradds unnecessary noise to the UX.Please provide a way to disable
next-route-announcer.Proposal
https://nextjs.org/docs/advanced-features/custom-app or https://nextjs.org/docs/api-reference/next.config.js/introduction seem like natural configuration seem like natural places to configure to me, but I don't feel strongly.
Beta Was this translation helpful? Give feedback.
All reactions