Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route Announcements #18

Open
Tropix126 opened this issue Aug 16, 2022 · 0 comments
Open

Route Announcements #18

Tropix126 opened this issue Aug 16, 2022 · 0 comments

Comments

@Tropix126
Copy link

Tropix126 commented Aug 16, 2022

Many client-side routers, including SvelteKit and Next's routers have a visually hidden "announcer" element that declares new routes to assistive technologies when the page is navigated. This is acomplished through the aria-live="assertive" state.

image
image

From looking at existing implementations, the announcer simply populates it's innerHTML with name of any new page title after navigation is completed.

The Next.js route announcer looks for the page name to announce by first inspecting document.title, then the <h1> element, and finally the URL pathname. For the most accessible user experience, ensure that each page in your application has a unique and descriptive title.

SvelteKit's implementation
Next Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant