Skip to content

fix(a11y): improve screen reader support and keyboard navigation in docs#535

Merged
berry-13 merged 1 commit into
mainfrom
fix/docs-accessibility-issues
Mar 21, 2026
Merged

fix(a11y): improve screen reader support and keyboard navigation in docs#535
berry-13 merged 1 commit into
mainfrom
fix/docs-accessibility-issues

Conversation

@berry-13
Copy link
Copy Markdown
Member

Summary

Fixes 6 reported accessibility issues and 6 additional issues found via a WCAG 2.1 audit. All fixes are applied via a pnpm patch on fumadocs-ui@14.7.7 plus one project-level fix.

Closes #513
Closes #514
Closes #515
Closes #516
Closes #517
Closes #518

Reported Issues

Issue Problem Fix
#513 Navigation toggle button (⋯) has no accessible name Added aria-label="LibreChat website navigation"
#514 Search button doesn't warn screen readers it opens a modal Added aria-haspopup="dialog" and aria-label to both search toggles
#515 Close search button visible text "Esc" doesn't match aria-label="Close Search" (WCAG 2.5.3) Changed to aria-label="Close Search (Esc)"
#516 Search suggestions/results not announced by screen readers Added role="status" live region announcing result count and navigation instructions
#517 Search suggestions are <button> but navigate to a new URL — semantically they're links Changed to <a> with href, role="option", and role="listbox" on container
#518 Docs pages missing landmark regions Added <nav> landmarks for sidebar, breadcrumbs, TOC, and pagination

Additional Fixes (WCAG Audit)

Problem WCAG Fix
Theme toggle button has no accessible name 4.1.2 (A) Added aria-label="Toggle theme"
Sidebar <aside> has no accessible name 4.1.2 (A) Added aria-label="Docs sidebar"
"Collapse Sidebar" label doesn't update when collapsed 4.1.2 (A) Dynamic label: "Expand Sidebar" / "Collapse Sidebar"
Heading anchor link icon only visible on hover, not keyboard focus 2.4.7 (AA) Added peer-focus-visible:opacity-100 and focus ring
Breadcrumbs use <div> instead of <ol>/<li>, separator SVGs exposed to AT 1.3.1 (A) Changed to <ol>/<li>, added aria-hidden="true" on chevron separators
Feedback <textarea> has no programmatic label 4.1.2 (A) Added aria-label="Additional feedback"

Implementation

All fumadocs-ui fixes are in patches/fumadocs-ui@14.7.7.patch, applied automatically on pnpm install. The feedback textarea fix is a one-line change in components/Feedback.tsx.

Testing

  • Build passes ✅
  • All 12 fixes verified in the browser against the live dev server
  • Accessibility tree inspected on /docs and /docs/configuration/librechat_yaml/object_structure/anthropic_vertex

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
librechat-ai Ready Ready Preview, Comment Mar 21, 2026 2:30pm

Request Review

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@berry-13
Copy link
Copy Markdown
Member Author

@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?

@berry-13 berry-13 requested a review from Copilot March 21, 2026 14:17
@berry-13 berry-13 changed the title fix(a11y): improve docs accessibility — WCAG 2.1 Level A & AA compliance fix(a11y): improve screen reader support and keyboard navigation in docs Mar 21, 2026
@berry-13 berry-13 marked this pull request as ready for review March 21, 2026 14:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-ui patch.
  • 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.

Comment thread patches/fumadocs-ui@14.7.7.patch Outdated
Comment thread patches/fumadocs-ui@14.7.7.patch
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
@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@berry-13 berry-13 merged commit c24e2c8 into main Mar 21, 2026
3 checks passed
@berry-13 berry-13 deleted the fix/docs-accessibility-issues branch March 21, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment