@@ -8,11 +8,12 @@ import {
88 TableRow ,
99} from "@/components/ui/table" ;
1010import {
11- EyebrowTitle ,
12- Lead ,
13- PageTitle ,
14- SectionTitle ,
15- } from "@/components/ui/typography" ;
11+ DocumentationHeader ,
12+ DocumentationInlineCode as InlineCode ,
13+ DocumentationPage ,
14+ DocumentationParagraph ,
15+ DocumentationSectionHeading as SectionHeading ,
16+ } from "@/components/documentation-primitives" ;
1617
1718/**
1819 * Accessibility documentation page for Care UI.
@@ -34,28 +35,6 @@ import {
3435 * src/components/ui/.
3536 */
3637
37- function InlineCode ( { children } : { children : React . ReactNode } ) {
38- return (
39- < code className = "bg-muted text-foreground relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold" >
40- { children }
41- </ code >
42- ) ;
43- }
44-
45- function SectionHeading ( {
46- id,
47- children,
48- } : {
49- id : string ;
50- children : React . ReactNode ;
51- } ) {
52- return (
53- < SectionTitle id = { id } className = "scroll-m-20" >
54- { children }
55- </ SectionTitle >
56- ) ;
57- }
58-
5938/* ── What Care UI ships for accessibility ── */
6039
6140type BuiltInRow = {
@@ -362,22 +341,13 @@ const TOOLS: { name: string; use: string }[] = [
362341
363342export function AccessibilityPage ( ) {
364343 return (
365- < main className = "flex-1 overflow-y-auto" >
366- < div className = "mx-auto max-w-4xl space-y-16 p-4 md:p-8" >
344+ < DocumentationPage >
367345 { /* Header */ }
368- < header >
369- < EyebrowTitle className = "text-muted-foreground text-xs tracking-widest uppercase" >
370- Documentation
371- </ EyebrowTitle >
372- < PageTitle className = "mt-3 scroll-m-20" >
373- Accessibility
374- </ PageTitle >
375- < Lead className = "mt-6 max-w-2xl text-xl" >
376- Care UI targets < strong > WCAG 2.2 AA</ strong > across every theme.
377- Half of the work is built into the design tokens and primitives; the
378- other half is a short checklist every contributor must apply.
379- </ Lead >
380- </ header >
346+ < DocumentationHeader title = "Accessibility" >
347+ Care UI targets < strong > WCAG 2.2 AA</ strong > across every theme. Half
348+ of the work is built into the design tokens and primitives; the other
349+ half is a short checklist every contributor must apply.
350+ </ DocumentationHeader >
381351
382352 { /* Standards */ }
383353 < section >
@@ -410,10 +380,10 @@ export function AccessibilityPage() {
410380 < SectionHeading id = "built-in" >
411381 What Care UI gives you for free
412382 </ SectionHeading >
413- < p className = "text-foreground mt-6 leading-7" >
383+ < DocumentationParagraph >
414384 Before you write a single attribute, the design tokens and providers
415385 below are already doing accessibility work on your behalf.
416- </ p >
386+ </ DocumentationParagraph >
417387
418388 < div className = "border-border mt-6 overflow-hidden rounded-lg border" >
419389 < Table >
@@ -446,11 +416,11 @@ export function AccessibilityPage() {
446416 { /* Author checklist */ }
447417 < section >
448418 < SectionHeading id = "checklist" > Author checklist</ SectionHeading >
449- < p className = "text-foreground mt-6 leading-7" >
419+ < DocumentationParagraph >
450420 Apply every rule below when authoring a new component or composing
451421 existing ones. Each group maps to one WCAG outcome and one place
452422 reviewers will look during code review.
453- </ p >
423+ </ DocumentationParagraph >
454424
455425 < div className = "mt-8 space-y-10" >
456426 { CHECKLIST . map ( ( group ) => (
@@ -483,10 +453,10 @@ export function AccessibilityPage() {
483453 { /* Anti-patterns */ }
484454 < section >
485455 < SectionHeading id = "anti-patterns" > Anti-patterns</ SectionHeading >
486- < p className = "text-foreground mt-6 leading-7" >
456+ < DocumentationParagraph >
487457 Reviewers will flag any of these on sight. They are the most common
488458 ways an otherwise good component becomes inaccessible.
489- </ p >
459+ </ DocumentationParagraph >
490460 < ul className = "text-foreground mt-6 ml-5 list-disc space-y-2 leading-7" >
491461 { ANTI_PATTERNS . map ( ( p ) => (
492462 < li key = { p } > { p } </ li >
@@ -497,11 +467,11 @@ export function AccessibilityPage() {
497467 { /* Testing */ }
498468 < section >
499469 < SectionHeading id = "testing" > Testing & tooling</ SectionHeading >
500- < p className = "text-foreground mt-6 leading-7" >
470+ < DocumentationParagraph >
501471 Automated tools catch a fraction of accessibility issues. Combine
502472 them with the manual passes below before any non-trivial change
503473 ships.
504- </ p >
474+ </ DocumentationParagraph >
505475
506476 < div className = "border-border mt-6 overflow-hidden rounded-lg border" >
507477 < Table >
@@ -584,7 +554,6 @@ export function AccessibilityPage() {
584554 </ div >
585555 </ div >
586556 </ section >
587- </ div >
588- </ main >
557+ </ DocumentationPage >
589558 ) ;
590559}
0 commit comments