Skip to content

fix(design-data): converge key-focus to keyboard-focus state - #1270

Merged
GarthDB merged 3 commits into
mainfrom
bja-converge-key-focus-keyboard-focus
Jul 20, 2026
Merged

fix(design-data): converge key-focus to keyboard-focus state#1270
GarthDB merged 3 commits into
mainfrom
bja-converge-key-focus-keyboard-focus

Conversation

@GarthDB

@GarthDB GarthDB commented Jul 20, 2026

Copy link
Copy Markdown
Member

Description

Converges the drifted key-focus state value onto its registry-canonical form
keyboard-focus. registry/states.json already lists key-focus as an alias
of keyboard-focus, but the alias had leaked into 26 tokens' name.state
values (vs. only 3 using the canonical form) plus stack-item.json's
component state declaration.

  • packages/design-data/tokens/color-aliases.tokens.json: 22 tokens' name.statekeyboard-focus.
  • packages/design-data/tokens/color-component.tokens.json: 1 token's name.statekeyboard-focus.
  • packages/design-data/tokens/layout-component.tokens.json: 2 tokens' name.statekeyboard-focus.
  • packages/design-data/tokens/semantic-color-palette.tokens.json: 1 token's name.statekeyboard-focus.
  • packages/design-data/components/stack-item.json: declared state renamed key-focuskeyboard-focus to match.

Each affected token already carries an explicit legacyKey pinning its
published 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 authoring
stack-item.json in bead 7a5, which had to declare key-focus verbatim to
match existing data and pass SPEC-022).

Motivation and Context

key-focus vs keyboard-focus was drift, not a real semantic distinction:
key-focus is a registered alias of keyboard-focus, and every other
signal (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. Only stack-item.json
and these 26 tokens lagged.

How Has This Been Tested?

  • moon run design-data:validate — no errors (SPEC-022 component-state-valid
    passes 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-byte
    against a pre-change baseline: identical, confirming legacyKey pinning
    held.
  • moon run design-data:roundtrip-verifyRoundtrip OK.
  • moon run :test — full workspace test suite (Node + Rust), all passing.
  • Changeset linted clean: node tools/changeset-linter/src/cli.js check --fail-on-warnings.

Screenshots (if appropriate):

N/A — data-only change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…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-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 232cc8d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@adobe/spectrum-design-data Patch
@adobe/spectrum-component-api-schemas Patch
@adobe/design-system-registry Patch
@adobe/design-data-agent-mcp Patch
@adobe/design-data-mcp Patch
markdown-generator Patch
@adobe/token-corpus-migrate Patch
@adobe/token-naming-audit Patch
component-options-editor Patch
@adobe/spectrum-design-data-mcp Patch

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

@github-actions

Copy link
Copy Markdown
Contributor

🎨 Token Changes Report

Tokens Changed (0)

Original Branch: main
New Branch: bja-converge-key-focus-keyboard-focus


This comment was automatically generated by the token diff tool. 🤖

@github-actions

Copy link
Copy Markdown
Contributor

🧩 Component Schema Changes Report

Component Schemas Changed (0 added, 0 deleted, 1 updated)

Original Branch: main

New Branch: bja-converge-key-focus-keyboard-focus

✅ No Breaking Changes

This PR contains only non-breaking changes to component schemas.

🔄 Non-Breaking Updates

stack-item


This diff was generated automatically and contains only backward-compatible changes.


This comment was automatically generated by the component schema diff tool. 🤖

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Run report for 232cc8da

Total time: 2m 9s | Comparison time: 2m 44s | Estimated savings: 35.4s (21.5% faster)

Action Time Status Info
⬛️ SetupProto(0.57.4) 0ms Skipped
🟩 SyncWorkspace 8.6ms Passed
🟩 SyncProject(sdk) 0.6ms Passed
🟩 SyncProject(design-data) 3.7ms Passed
⬛️ SetupToolchain(node:20.17.0) 11.7ms Skipped
⬛️ SetupToolchain(pnpm:10.17.1) 2.1ms Skipped
⬛️ SetupToolchain(javascript) 0ms Skipped
🟩 SetupEnvironment(javascript) 0.4ms Passed
⬛️ InstallDependencies(javascript) 0.1ms Skipped
⬛️ SetupEnvironment(javascript, sdk) 0.6ms Skipped
🟩 RunTask(design-data:validate-registry) 161.9ms Passed
⬛️ SetupToolchain(rust:1.88.0) 376.9ms Skipped
🟩 SetupEnvironment(rust, sdk) 149.5ms Passed
⬛️ InstallDependencies(rust, sdk) 4.8ms Skipped
🟩 InstallDependencies(javascript, sdk) 3.5s Passed
🟩 RunTask(sdk:codegen-check) 70.7ms Passed
🟩 RunTask(sdk:build) 55.6s Passed
🟩 RunTask(design-data:legacy-output) 679ms Passed
🟩 RunTask(design-data:roundtrip-verify) 1.3s Passed
🟩 RunTask(design-data:validate-dataset) 4s Passed
And 2 more...
Expanded report
Action Time Status Info
🟩 RunTask(design-data:validate) 1.6s Passed
🟩 RunTask(sdk:test) 2m 5s Passed SLOW
Changed files
.changeset/bja-converge-key-focus-keyboard-focus.md
packages/design-data/components/stack-item.json
packages/design-data/tokens/color-aliases.tokens.json
packages/design-data/tokens/color-component.tokens.json
packages/design-data/tokens/layout-component.tokens.json
packages/design-data/tokens/semantic-color-palette.tokens.json

@GarthDB
GarthDB merged commit b3d1803 into main Jul 20, 2026
9 checks passed
@GarthDB
GarthDB deleted the bja-converge-key-focus-keyboard-focus branch July 20, 2026 21:43
@GarthDB GarthDB mentioned this pull request Jul 20, 2026
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.

1 participant