mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 10:48:32 +07:00
c24e2c80b698c6956183d2a32daefd268131be56
Patch fumadocs-ui to fix accessibility issues reported by amberhinds, plus additional issues found via WCAG 2.1 audit: Reported issues: - #513: Add aria-label to docs navigation toggle button - #514: Add aria-haspopup="dialog" and aria-label to search buttons - #515: Fix close search button accessible name to include visible text - #516: Add role="status" live region for screen reader search announcements - #517: Change search suggestions from <button> to <a> links with role="option" - #518: Add nav landmarks for sidebar, breadcrumbs, TOC, and pagination Additional fixes found via audit: - Theme toggle button: add aria-label="Toggle theme" (WCAG 4.1.2) - Sidebar <aside>: add aria-label="Docs sidebar" (WCAG 4.1.2) - Collapse sidebar button: dynamic label based on state (WCAG 4.1.2) - Heading anchor link icons: add peer-focus-visible:opacity-100 (WCAG 2.4.7) - Breadcrumbs: use <ol>/<li> structure, aria-hidden on separator SVGs (WCAG 1.3.1) - Feedback textarea: add aria-label (WCAG 4.1.2) Closes #513 Closes #514 Closes #515 Closes #516 Closes #517 Closes #518
LibreChat Docs
The official documentation site for LibreChat, built with Next.js 15 and Fumadocs.
Tech Stack
- Framework: Next.js 15 (App Router)
- Docs Engine: Fumadocs (fumadocs-mdx + fumadocs-ui)
- Styling: Tailwind CSS
- Icons: Lucide React
- Package Manager: Bun
Local Development
Prerequisites: Bun 1.0+
- Clone the repository
- Copy
.env.templateto.env.localand fill in any optional values - Install dependencies:
bun i - Start the dev server (uses Turbopack):
bun dev - Open http://localhost:3333
Note: Always run bun run build before opening a PR to catch build errors early.
Project Structure
app/ # Next.js App Router pages (docs, blog, changelog, API routes)
content/
docs/ # Documentation pages (MDX)
blog/ # Blog posts (MDX)
changelog/ # Changelog entries (MDX)
components/ # React components (home, UI, icons, etc.)
lib/ # Utilities, icons, MDX components, Nextra shims
public/ # Static assets
pages/ # Legacy pages (migrating to app/)
source.config.ts # Fumadocs content collections config
Documentation Content
Docs live in content/docs/ and are organized by section. Each directory has a meta.json that controls sidebar navigation:
{
"title": "Section Title",
"icon": "Wrench",
"pages": ["index", "page-one", "page-two"]
}
Only pages listed in the pages array appear in the sidebar.
Scripts
| Command | Description |
|---|---|
bun dev |
Start dev server on port 3333 (Turbopack) |
bun run build |
Production build |
bun start |
Start production server on port 3333 |
bun run lint |
Run ESLint |
bun run prettier |
Format code with Prettier |
bun run analyze |
Analyze production bundle size |
License
Languages
MDX
83.8%
TypeScript
14.9%
CSS
0.6%
JavaScript
0.6%
Shell
0.1%