Measured while implementing #4652. Filed unassigned. Duplicate-searched (keyword +
accordion.mdx + AccordionSchema): no open issue covers it.
The finding
content/docs/components/disclosure/accordion.mdx's "Schema" section shows:
interface AccordionSchema {
type: 'accordion';
items: Array<{
title: string;
content: string | SchemaNode;
}>;
defaultOpen?: number[];
multiple?: boolean;
}
The real interface, packages/types/src/disclosure.ts, is materially different:
exportinterfaceAccordionItem{value: string;// required — MISSING from the docs block entirelytitle: string;content: SchemaNode|SchemaNode[];disabled?: boolean;// MISSING (as of #4652, now a real, honored key)}exportinterfaceAccordionSchemaextendsBaseSchema{type: 'accordion';items: AccordionItem[];accordionType?: 'single'|'multiple';// docs calls this `multiple?: boolean` — wrong name AND wrong typecollapsible?: boolean;// MISSING from docsdefaultValue?: string|string[];// docs calls this `defaultOpen?: number[]` — wrong name AND wrong typevalue?: string|string[];// MISSING from docsonValueChange?: (value: string|string[])=>void;// MISSING from docsvariant?: 'default'|'bordered'|'separated';// MISSING from docs}defaultOpen and multiple do not exist anywhere on the real interface — this reads like an early draft of the component that was never updated as the interface evolved, not a columns/fields-style two-name drift.
Impact
The docs page is the corpus authors (including AI authoring tools) read to learn the accordion schema shape, and it currently teaches: a required value key does not exist; the real selection-mode key (accordionType) and default-open key (defaultValue) under different, non-existent names; and omits collapsible/onValueChange/variant/disabled entirely. Not breaking (docs, not a gate), but actively misleading.
Why this is filed separately from #4652
#4652's declared surfaces are the three-way contract (TS interface / Zod mirror / renderer) for exactly the disabled/icon pair. This finding is a different, broader, pre-existing defect class — stale field names and shapes, not a declared-but-unenforced authoring key — spanning fields #4652 never touched (accordionType, collapsible, defaultValue, value, onValueChange, variant). Fixing it there would have been unrelated scope creep on a file already flagged as drifted independent of the disabled/icon settlement.
Options
- Rewrite the schema block to match the real
AccordionSchema/AccordionItem shape (mechanical — the interface is the source of truth). - Leave as-is (not recommended — actively teaches a non-existent shape).
Related: #4652 (the settlement this finding was measured alongside).
Measured while implementing #4652. Filed unassigned. Duplicate-searched (keyword +
accordion.mdx+AccordionSchema): no open issue covers it.The finding
content/docs/components/disclosure/accordion.mdx's "Schema" section shows:The real interface,
packages/types/src/disclosure.ts, is materially different:defaultOpenandmultipledo not exist anywhere on the real interface — this reads like an early draft of the component that was never updated as the interface evolved, not acolumns/fields-style two-name drift.Impact
The docs page is the corpus authors (including AI authoring tools) read to learn the
accordionschema shape, and it currently teaches: a requiredvaluekey does not exist; the real selection-mode key (accordionType) and default-open key (defaultValue) under different, non-existent names; and omitscollapsible/onValueChange/variant/disabledentirely. Not breaking (docs, not a gate), but actively misleading.Why this is filed separately from #4652
#4652's declared surfaces are the three-way contract (TS interface / Zod mirror / renderer) for exactly the
disabled/iconpair. This finding is a different, broader, pre-existing defect class — stale field names and shapes, not a declared-but-unenforced authoring key — spanning fields #4652 never touched (accordionType,collapsible,defaultValue,value,onValueChange,variant). Fixing it there would have been unrelated scope creep on a file already flagged as drifted independent of the disabled/icon settlement.Options
AccordionSchema/AccordionItemshape (mechanical — the interface is the source of truth).Related: #4652 (the settlement this finding was measured alongside).