fix(a11y): improve screen reader support and keyboard navigation in docs#535
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
|
@amberhinds Thank you for the detailed accessibility reports, they were very helpful. I've addressed all 6 issues in this PR, plus a few additional a11y improvements. Would you mind verifying the fixes work as expected with your setup? |
There was a problem hiding this comment.
Pull request overview
This PR applies a pnpm patch to fumadocs-ui@14.7.7 plus a small project-level change to address a set of WCAG 2.1 A/AA accessibility issues in the docs UI (search dialog, navigation landmarks, headings, breadcrumbs/pagination, sidebar controls, and feedback form).
Changes:
- Adds/adjusts ARIA attributes and landmark semantics across the docs UI via a
fumadocs-uipatch. - Improves docs search accessibility (modal semantics, live-region announcements, and suggestion item semantics).
- Adds an accessible name to the feedback
<textarea>at the project level.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pnpm-lock.yaml | Registers the patched fumadocs-ui@14.7.7 dependency and updates the resolved version with a patch_hash. |
| patches/fumadocs-ui@14.7.7.patch | Implements the bulk of accessibility fixes in patched fumadocs-ui dist files (search, headings, toggles, sidebar, TOC, breadcrumbs, pagination). |
| package.json | Declares pnpm.patchedDependencies entry for fumadocs-ui@14.7.7. |
| components/Feedback.tsx | Adds aria-label="Additional feedback" to the feedback textarea. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
08cce24 to
7f34e39
Compare
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Summary
Fixes 6 reported accessibility issues and 6 additional issues found via a WCAG 2.1 audit. All fixes are applied via a
pnpm patchonfumadocs-ui@14.7.7plus one project-level fix.Closes #513
Closes #514
Closes #515
Closes #516
Closes #517
Closes #518
Reported Issues
aria-label="LibreChat website navigation"aria-haspopup="dialog"andaria-labelto both search togglesaria-label="Close Search"(WCAG 2.5.3)aria-label="Close Search (Esc)"role="status"live region announcing result count and navigation instructions<button>but navigate to a new URL — semantically they're links<a>withhref,role="option", androle="listbox"on container<nav>landmarks for sidebar, breadcrumbs, TOC, and paginationAdditional Fixes (WCAG Audit)
aria-label="Toggle theme"<aside>has no accessible namearia-label="Docs sidebar"peer-focus-visible:opacity-100and focus ring<div>instead of<ol>/<li>, separator SVGs exposed to AT<ol>/<li>, addedaria-hidden="true"on chevron separators<textarea>has no programmatic labelaria-label="Additional feedback"Implementation
All fumadocs-ui fixes are in
patches/fumadocs-ui@14.7.7.patch, applied automatically onpnpm install. The feedback textarea fix is a one-line change incomponents/Feedback.tsx.Testing
/docsand/docs/configuration/librechat_yaml/object_structure/anthropic_vertex