GitShow/facebook/docusaurus
facebook

docusaurus

Easy to maintain open source documentation websites.

by facebook
documentationhacktoberfestjavascriptopen-sourcereactwebsite
Star on GitHubForkWebsitenpm

TypeScript

66.1k stars10.0k forks1.4k contributorsActive · 13h agoSince 2017v3.10.2MIT

Meet the team

See all 1356 on GitHub →
slorber
slorber1.2k contributions
lex111
lex111644 contributions
endiliey
endiliey628 contributions
Josh-Cena
Josh-Cena615 contributions
yangshun
yangshun361 contributions
dependabot[bot]Bot
dependabot[bot]346 contributions
JoelMarcey
JoelMarcey293 contributions
deltice
deltice139 contributions

Languages

View on GitHub →
TypeScript96%
JavaScript1.9%
CSS1.8%
XSLT0.2%
AppleScript0.1%
EJS0%

Commit activity

Last 12 weeks · 115 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
87
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 13h ago
See all on GitHub →
WestonThayer
Single page app (SPA) route navigations sometimes not announced by screen readers (NVDA, VoiceOver)OpenIssue

Have you read the Contributing Guidelines on issues? [x] I have read the Contributing Guidelines on issues. Prerequisites [x] I'm using the latest version of Docusaurus. [x] I have tried the or command. [x] I have tried and re-installing packages. [x] I have tried creating a repro with https://new.docusaurus.io. [x] I have read the console error message carefully (if applicable). Description I believe Docusaurus is a single page app (SPA). When internal links are invoked, the history API is used to update the browser's URL bar. This unfortunately doesn't come with out-of-the-box accessibility support https://www.matuzo.at/blog/2023/single-page-applications-criticism/. The new Navigation API _should_ be better but not ready for prime time yet 🤞🏻 As a result, here's NVDA invoking the "Community" link in the top nav. I'm tabbing to the link, then press Enter to invoke. NVDA announces nothing. https://github.com/user-attachments/assets/16960c37-aaac-49b4-89b9-323071c3ffde macOS VoiceOver is a little inconsistent. I'm again tabbing to the link. First I'm using Enter to invoke. VoiceOver consistently announces nothing. But VO+Space is another common way to invoke links/buttons. VoiceOver sometimes announces the document title in that case, it seems inconsistent. https://github.com/user-attachments/assets/6819e9a8-7346-4ac3-b271-8a3e16a8c0d4 FWIW there's a bit of debate as to whether this is is a WCAG 4.1.3 Status Messages failure (does it fit the definition of a status message?). Reproducible demo https://docusaurus.io/ Steps to reproduce 1. With NVDA (and Chrome in my testing), visit docusaurus.io 2. Tab to a link in the top navigation 3. Press Enter Expected behavior There's a bit of debate on this (see linked blog posts), but I'd argue that since this is basically a MPA (multi page app) navigation, the MPA UX should be mimicked. In a standard MPA nav, NVDA will announce when the page is fully loaded. Note that slower network connections should be considered — the user needs to be aware when the page is fully rendered and ready for interaction. It'd also be nice if they were informed while loading was still taking place. I know the History API doesn't give many options for this, IIRC the Navigation API has the necessary hooks. Actual behavior NVDA announces nothing. Your environment N/A Self-service [ ] I'd be willing to fix this bug myself.

WestonThayer · 11h ago
gonzoblasco
fix(theme-classic): announce page title on route change for screen readersOpenPR

Summary Fixes #11332: SPA route navigations are not announced by screen readers (NVDA, VoiceOver). Root cause Docusaurus already moves focus to the skip-to-content container on route change (PUSH), but that container has a static of "Skip to main content". When a screen reader user navigates, focus lands on that container and the SR announces "Skip to main content region" (or nothing), not the title of the page they landed on. The user knows a navigation happened but not which page they are on. Change Pass the page title down from the to the component, and use it to set the skip-to-content container's to the formatted page title when navigating. The container is focused on route change, so the screen reader announces the page title. The container's is restored to "Skip to main content" on the next render, so the skip link keeps working as before for keyboard users who tab to it. This uses the page title from the prop (formatted via ) rather than reading , because Helmet updates asynchronously (deferred via ), so it is not reliable at the moment focus moves. Why focus management (not a live region) A live region would announce on the audio channel but does not reliably reach refreshable braille displays, and it competes with the new page's own announcements. Moving focus to a meaningful landmark is the one mechanism all screen readers and braille displays agree on, and it matches the MPA behavior the issue asks for. Tests Added verifying that: Focus moves to the skip-to-content container on route change. The container's is updated to the page title when navigating. 116 tests pass in . 51 tests pass in . Typecheck passes for both packages.

gonzoblasco · 11h ago

Recent fixes

View closed PRs →
SethFalco
Incorrect page metadata when using markdown inline-code with XML tags insideClosedIssue

Have you read the Contributing Guidelines on issues? [x] I have read the Contributing Guidelines on issues. Prerequisites [x] I'm using the latest version of Docusaurus. [x] I have tried the or command. [x] I have tried and re-installing packages. [x] I have tried creating a repro with https://new.docusaurus.io. [x] I have read the console error message carefully (if applicable). Description Docusaurus doesn't correctly generate the metadata fields on pages when the first sentence of a page includes inline-code syntax with something that looks like an XML taga inside. Example: Removes the `yarn installyarn run buildbuild/docs/index.htmlpackages/docusaurus-utils/src/__tests__/markdownUtils.test.ts`** Results (truncated):

SethFalco · 13h ago
SethFalco
fix(metadata): preserve MDX special symbols in inline code syntaxMergedPR

Pre-flight checklist [x] I have read the Contributing Guidelines on pull requests. [x] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior. N/A If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan. Motivation The metadata on my SVGO.dev is screwy. :c This fixes the bug so that the metadata shows the correct description. Test Plan I've added two new test cases, a dogfooding page, and can demonstrate it fixes the issue on a live page on Docusaurus.io. The latter is easiest to visualize through Open Graph embeds. I also have what is effectively this patch deployed to SVGO.dev, so it's being tested there: github.com/svg/svgo:patches/@docusaurus__utils.patch SVGO.dev Test links docusaurus-2.netlify.app/. Once available, please edit this section with links to the relevant deploy preview pages. Please don't be afraid to change the main site's configuration as well! You can make use of your new feature on our site so we can preview its effects. We can decide if it should be kept in production before merging it. Deploy preview: https://deploy-preview-11821--docusaurus-2.netlify.app/ Related issues/PRs Closes https://github.com/facebook/docusaurus/issues/11818 Closes https://github.com/facebook/docusaurus/pull/11871 (Made the same mistake as I did originally.)

SethFalco · 13h ago
Soumoditya
fix(utils): preserve inline code containing XML-like text in excerptsMergedPR

Fix createExcerpt() so inline code survives the HTML-stripping pass, which was dropping text like `` from excerpts. Added regression tests for inline code containing XML-like text, both with and without a surrounding link. Closes #11818

Soumoditya · 13h ago
Structured data for AI agents

Repository: facebook/docusaurus. Description: Easy to maintain open source documentation websites. Stars: 66071, Forks: 10014. Primary language: TypeScript. Languages: TypeScript (96%), JavaScript (1.9%), CSS (1.8%), XSLT (0.2%), AppleScript (0.1%). License: MIT. Homepage: https://docusaurus.io Topics: documentation, hacktoberfest, javascript, open-source, react, website. Latest release: v3.10.2 (1mo ago). Open PRs: 100, open issues: 297. Last activity: 13h ago. Community health: 87%. Top contributors: slorber, lex111, endiliey, Josh-Cena, yangshun, dependabot[bot], JoelMarcey, deltice, ericnakagawa, SamChou19815 and others.

·@ofershap

Replace github.com with gitshow.dev