* Add View Transitions announcer * fix astro check * Append the text in a setTimeout * Use 60 for the timeout * Add comment on magic number * Add a changeset * Update .changeset/small-rules-relax.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Bring back announce logic * Remove mention of env file --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
879 B
astro |
---|
minor |
Route Announcer in <ViewTransitions />
The View Transitions router now does route announcement. When transitioning between pages with a traditional MPA approach, assistive technologies will announce the page title when the page finishes loading. This does not automatically happen during client-side routing, so visitors relying on these technologies to announce routes are not aware when a page has changed.
The view transitions route announcer runs after the astro:page-load
event, looking for the page <title>
to announce. If one cannot be found, the announcer falls back to the first <h1>
it finds, or otherwise announces the pathname. We recommend you always include a <title>
in each page for accessibility.
See the View Transitions docs for more on how accessibility is handled.