Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/www/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@import "./styles/theme/dark.css";
@import "./styles/theme/inline.css";
@import "./styles/components/github-alerts.css";
@import "./styles/components/fd.css";
@import "./styles/base.css";
@import "fumadocs-twoslash/twoslash.css";

Expand Down
13 changes: 13 additions & 0 deletions apps/www/app/styles/components/fd.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
header {
background-color: var(--secondary);
}

/* Override fumadocs muted-foreground for WCAG AA compliance */
:root {
--color-fd-muted-foreground: hsl(
240 4% 40%
); /* WCAG AA compliant: 6.13:1 contrast on white background */
}

.dark {
--color-fd-muted-foreground: hsl(
240 5% 70%
); /* WCAG AA compliant: 8.88:1 contrast on dark background */
}
2 changes: 1 addition & 1 deletion apps/www/app/styles/theme/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
--secondary: color-mix(in srgb, var(--background) 80%, transparent);
--secondary-foreground: hsl(0 0% 98%);
--muted: hsl(240 3.7% 15.9%);
--muted-foreground: hsl(240 5% 64.9%);
--muted-foreground: hsl(240 5% 70%); /* WCAG AA compliant: 8.88:1 contrast */
--accent: hsl(240 3.7% 15.9%);
--accent-foreground: hsl(0 0% 98%);
--destructive: hsl(0 62.8% 30.6%);
Expand Down
2 changes: 1 addition & 1 deletion apps/www/app/styles/theme/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
--secondary: rgb(247, 249, 252);
--secondary-foreground: hsl(240 5.9% 10%);
--muted: hsl(240 4.8% 95.9%);
--muted-foreground: hsl(240 3.8% 46.1%);
--muted-foreground: hsl(240 4% 40%); /* WCAG AA compliant: 6.13:1 contrast */
--accent: rgb(244, 244, 245);
--accent-foreground: hsl(240 5.9% 10%);
--destructive: hsl(0 84.2% 60.2%);
Expand Down
5 changes: 3 additions & 2 deletions apps/www/source.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ export default defineConfig({
remarkPlugins: [remarkGemoji, remarkNpm],
rehypeCodeOptions: {
themes: {
light: "github-light",
dark: "github-dark",
// High-contrast themes for WCAG AA compliance
light: "github-light-high-contrast",
dark: "github-dark-high-contrast",
},
transformers: [
...(rehypeCodeDefaultOptions.transformers ?? []),
Expand Down
3 changes: 1 addition & 2 deletions tooling/playwright-www/tests/a11y.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,11 @@ test.describe("A11y Smoke Tests", () => {
await assertNoA11yViolations(page, {
disableRules: [
// Known issues from third-party libraries
"aria-allowed-attr", // shiki-twoslash
// TODO: Re-enable once fumadocs-twoslash fixes aria-allowed-attr violation
// fumadocs-twoslash renders <span class="twoslash-hover" type="button"> which is invalid HTML
// Should use <button> element instead of <span> for interactive hover triggers
// Track: https://github.com/fuma-nama/fumadocs/issues/2574
"color-contrast", // syntax highlighting themes
"aria-allowed-attr", // shiki-twoslash
// TODO: Re-enable once fumadocs-ui fixes scrollable-region-focusable
// code block containers need keyboard focus
// Track: https://github.com/fuma-nama/fumadocs/issues/2573
Expand Down
Loading