fix(design-data): converge key-focus to keyboard-focus state - #1270
Conversation
…m-design-data-bja) key-focus is a registered alias of the canonical keyboard-focus state in registry/states.json, but drifted into 26 tokens' name.state values plus stack-item.json's component state declaration. Converge onto the canonical form; each token's legacyKey already pins the published legacy name, so legacy output is unaffected (verified byte-identical via legacy-output diff). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 232cc8d The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🎨 Token Changes ReportTokens Changed (0)Original Branch: This comment was automatically generated by the token diff tool. 🤖 |
🧩 Component Schema Changes ReportComponent Schemas Changed (0 added, 0 deleted, 1 updated)Original Branch: New Branch: ✅ No Breaking ChangesThis PR contains only non-breaking changes to component schemas. 🔄 Non-Breaking Updatesstack-item This diff was generated automatically and contains only backward-compatible changes. This comment was automatically generated by the component schema diff tool. 🤖 |
Run report for 232cc8daTotal time: 2m 9s | Comparison time: 2m 44s | Estimated savings: 35.4s (21.5% faster)
Expanded report
Changed files |
Description
Converges the drifted
key-focusstate value onto its registry-canonical formkeyboard-focus.registry/states.jsonalready listskey-focusas an aliasof
keyboard-focus, but the alias had leaked into 26 tokens'name.statevalues (vs. only 3 using the canonical form) plus
stack-item.json'scomponent state declaration.
packages/design-data/tokens/color-aliases.tokens.json: 22 tokens'name.state→keyboard-focus.packages/design-data/tokens/color-component.tokens.json: 1 token'sname.state→keyboard-focus.packages/design-data/tokens/layout-component.tokens.json: 2 tokens'name.state→keyboard-focus.packages/design-data/tokens/semantic-color-palette.tokens.json: 1 token'sname.state→keyboard-focus.packages/design-data/components/stack-item.json: declared state renamedkey-focus→keyboard-focusto match.Each affected token already carries an explicit
legacyKeypinning itspublished flat name, so this is a structured-data-only change — no published
legacy token names change.
Related Issue
Closes bead
spectrum-design-data-bja(discovered while authoringstack-item.jsonin bead 7a5, which had to declarekey-focusverbatim tomatch existing data and pass SPEC-022).
Motivation and Context
key-focusvskeyboard-focuswas drift, not a real semantic distinction:key-focusis a registered alias ofkeyboard-focus, and every othersignal (29 of 30 component state declarations, platform-extension
termIds,the accessibility/terminology block referencing WCAG 2.4.7 and
:focus-visible) already points at the canonical form. Onlystack-item.jsonand these 26 tokens lagged.
How Has This Been Tested?
moon run design-data:validate— no errors (SPEC-022component-state-validpasses for
stack-item); only pre-existing, unrelated warnings remain(SPEC-043, SPEC-027 dangling bindings already present at
main).moon run design-data:legacy-output— regenerated output diffed byte-for-byteagainst a pre-change baseline: identical, confirming
legacyKeypinningheld.
moon run design-data:roundtrip-verify—Roundtrip OK.moon run :test— full workspace test suite (Node + Rust), all passing.node tools/changeset-linter/src/cli.js check --fail-on-warnings.Screenshots (if appropriate):
N/A — data-only change.
Types of changes
Checklist: