docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

feat(core): route announcer

Open seyoon20087 opened this issue 3 years ago • 4 comments

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

  1. Add the route announcer component
  2. Include the route announcer component in the root

Related PRs

N/A

seyoon20087 avatar Mar 30 '22 12:03 seyoon20087

[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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Mar 30 '22 13:03 netlify[bot]

⚡️ 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

github-actions[bot] avatar Mar 30 '22 13:03 github-actions[bot]

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

Josh-Cena avatar Mar 31 '22 07:03 Josh-Cena

I agree. Given the current architecture, it seems feasible to put this in layout as well.

Josh-Cena avatar Apr 03 '22 22:04 Josh-Cena