Skip to content

Commit c24e2c8

Browse files
authored
fix(a11y): add missing ARIA attributes and landmark regions to docs (#535)
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
1 parent 473208b commit c24e2c8

4 files changed

Lines changed: 205 additions & 4 deletions

File tree

components/Feedback.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export function Feedback() {
122122
<form className="flex flex-col gap-3" onSubmit={submit}>
123123
<textarea
124124
autoFocus
125+
aria-label="Additional feedback"
125126
value={message}
126127
onChange={(e) => setMessage(e.target.value)}
127128
className="resize-none rounded-lg border border-fd-border bg-fd-secondary p-3 text-sm text-fd-secondary-foreground placeholder:text-fd-muted-foreground focus-visible:outline-none"

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"homepage": "https://www.librechat.ai",
1818
"dependencies": {
1919
"@glidejs/glide": "^3.6.0",
20+
"@hookform/resolvers": "^3.3.4",
2021
"@mdx-js/loader": "^3.1.1",
2122
"@mdx-js/react": "^3.1.1",
22-
"@hookform/resolvers": "^3.3.4",
2323
"@radix-ui/react-accordion": "^1.1.2",
2424
"@radix-ui/react-avatar": "^1.0.4",
2525
"@radix-ui/react-dialog": "^1.0.5",
@@ -69,8 +69,8 @@
6969
"@eslint/js": "^9",
7070
"@next/bundle-analyzer": "^15.1.4",
7171
"@next/eslint-plugin-next": "^15",
72-
"@types/mdx": "^2.0.13",
7372
"@playwright/test": "^1.58.2",
73+
"@types/mdx": "^2.0.13",
7474
"@types/node": "18.16.0",
7575
"@types/react": "^18.3.12",
7676
"autoprefixer": "^10.4.19",
@@ -103,6 +103,9 @@
103103
"diff": ">=5.2.2",
104104
"minimatch": ">=3.1.4",
105105
"serialize-javascript": ">=7.0.3"
106+
},
107+
"patchedDependencies": {
108+
"fumadocs-ui@14.7.7": "patches/fumadocs-ui@14.7.7.patch"
106109
}
107110
},
108111
"nextBundleAnalysis": {

0 commit comments

Comments
 (0)