feat(registry): add a11y schema to /r/<name>.json (#255)#307
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
version+stabilityfields to /r/<name>.json (semver discipline) #253).Seed data
Two `meta.json` ship to validate the wiring:
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
Test plan
Pairs with
version+stabilityfields to /r/<name>.json (semver discipline) #253 `version` + `stability` — same build-script pattern.Closes #255