Skip to content

Contract gap: radio-group-item under-declares its semantic value #39

Description

@ryandmonk

Surfaced by T3 (declared joins, dspack-emit): radio-group-item declares no props, so the only per-item datum a surface can carry is its id. The worked examples encode the semantic value into ids by convention (id: "reimbursement-payroll" vs defaultValue: "payroll") — the id is DOM identity, not a value, and the convention leaves defaultValue unmatchable against any declared field.

The real shadcn RadioGroupItem API requires value, and the contract already expresses sub-component props elsewhere (tabs-trigger declares value, disabled, asChild) — so this is an authoring gap, not a schema limitation. The T3 emit plans currently source option value from self.id with the limitation documented in the profile; once the contract declares value on the item (and examples carry it), the plans switch to self.props.value with no engine change.

Recommended fix: add value (required) to radio-group-item's props, update the two worked examples, keep ids as DOM identity for the htmlFor join. Same class of correction as the taxonomy trail in #38 — contract-side, owner-authored.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions