docusaurus
docusaurus copied to clipboard
feat(core): route announcer
Motivation
By doing this, client-side route changes will be announced to screen readers, improving accessibility to screen-reader users.
This was heavily inspired by https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/navigation.js#L173-L202.
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
- Add the route announcer component
- Include the route announcer component in the root
Related PRs
N/A
[V2]
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 7d67a48fe75eda3e7fcad5060566ae4b74d435aa |
| Latest deploy log | https://app.netlify.com/sites/docusaurus-2/deploys/628dcf2b15c35e00083b43b0 |
| Deploy Preview | https://deploy-preview-7074--docusaurus-2.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
⚡️ Lighthouse report for the deploy preview of this PR
| URL | Performance | Accessibility | Best Practices | SEO | PWA | Report |
|---|---|---|---|---|---|---|
| / | 🟠 71 | 🟢 100 | 🟢 100 | 🟢 100 | 🟢 90 | Report |
| /docs/installation | 🟠 84 | 🟢 99 | 🟢 100 | 🟢 100 | 🟢 90 | Report |
The timeout unfortunately doesn't work if the network is slow and the bundle preloading takes more than 50ms. I think this should better be implemented as a client module since it seems pretty decoupled from the main app. We can do this after fixing #6732
I agree. Given the current architecture, it seems feasible to put this in layout as well.