Skip to content

feat(registry): add a11y schema to /r/<name>.json (#255)#307

Merged
bntvllnt merged 1 commit into
mainfrom
feat/255-a11y-schema
May 10, 2026
Merged

feat(registry): add a11y schema to /r/<name>.json (#255)#307
bntvllnt merged 1 commit into
mainfrom
feat/255-a11y-schema

Conversation

@bntvllnt
Copy link
Copy Markdown
Collaborator

Summary

Build pipeline now reads an `a11y` field from each `packages/ui/src/components//meta.json` and stamps it onto registry items + per-component JSON.

Schema

```ts
type A11ySchema = {
role?: string; // ARIA role
keyboard?: { keys: string; action: string }[];
aria?: string[]; // required ARIA attrs
focusManagement?: "auto" | "manual";
notes?: string;
};
```

Pipeline integration

Seed data

Two `meta.json` ship to validate the wiring:

  • `combobox/meta.json` — full WAI-ARIA combobox pattern (Enter/Space/ArrowDown/ArrowUp/Escape/Type-ahead).
  • `dialog/meta.json` — Radix Dialog focus-trap pattern.

Both are real, hand-authored — not generated. Other 220 components have no a11y field yet (additive, non-breaking). Filling them out is an ongoing effort tracked separately.

Validation

  • Local build: `jq '.items[] | select(.name == "combobox") | .a11y'` returns the full schema.
  • Components without meta.json get no a11y key — confirmed.

Test plan

Pairs with

Closes #255

Build pipeline now reads an a11y field from each
packages/ui/src/components/<name>/meta.json. The schema captures:
- role        ARIA role
- keyboard    keys + action bindings
- aria        required ARIA attributes
- focusManagement  'auto' | 'manual'
- notes       human-readable specifics

inline-component-source.ts stamps the schema onto registry.json
items; stamp-registry-metadata.ts patches it back into
public/r/<name>.json after shadcn build (same drift fix as #253).

Seed two meta.json files to validate the wiring end-to-end:
- combobox/meta.json — full WAI-ARIA combobox pattern
- dialog/meta.json   — Radix Dialog focus-trap pattern

Verified locally: jq '.items[] | select(.name == "combobox") | .a11y'
returns the expected schema. Components without meta.json have no a11y
field (additive, non-breaking).

Closes #255
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
storybook Ready Ready Preview, Comment May 10, 2026 3:05pm
ui.vllnt.ai Ready Ready Preview, Comment May 10, 2026 3:05pm

Request Review

@bntvllnt bntvllnt merged commit 06f0e84 into main May 10, 2026
10 checks passed
@bntvllnt bntvllnt deleted the feat/255-a11y-schema branch May 10, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ai-agents: add per-component accessibility schema to /r/<name>.json

1 participant