Skip to content

feat(design-data): spec sheet Keyboard table lists the keys of the web bindings - #2226

Merged
GarthDB merged 4 commits into
mainfrom
feat/spec-sheet-keyboard-bindings
Nov 27, 2026
Merged

GarthDB merged 4 commits into
mainfrom
feat/spec-sheet-keyboard-bindings

Conversation

@GarthDB

@GarthDB GarthDB commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Description

The spec sheet's Keyboard table listed the registry default keys for every pattern-level keyboard intent. It now follows the web key bindings (behaviors/bindings/web.json).

Rule (sdk/plugins/spec-sheet/src/sections.rs, keyboard_rows):

  • If the component's behavior contract names exactly one part role and the web bindings list that role (even with no keys, like textbox), the table is authoritative: an intent is a row only when a binding gives it at least one key, and the Keys cell shows the binding's keys (activate = press-start/press-end, navigate-* = navigate-next/navigate-previous, every other intent under its own name). Keys keep the registry default order, then binding order, so a binding that agrees with the default reads the same.
  • Otherwise (no contract, no part role such as color wheel and color area per A662 c, or a role with no binding) the registry default keys stay, and an intent with no default key is not a row (an empty Keys cell says nothing).
  • The CLI loads behaviors/bindings for the spec sheet. A graph with no bindings keeps the old defaults.

Only the accessibility--keyboard block changes. 18 of 92 sheets change against current main (10 rows/keys and 5 note text only, from this PR, plus text-field, text-area and search-field from #2223's contracts):

Component Rows lost Rows gained Keys changed
checkbox, switch, radio-button none none activate Enter, Space -> Space
link none none activate Enter, Space -> Enter
number-field increment-page, decrement-page (empty keys) none increment ArrowUp, ArrowRight -> ArrowUp, PageUp; decrement ArrowDown, ArrowLeft -> ArrowDown, PageDown; set-min -> Home; set-max -> End
slider, color-slider, rating none none increment-page -> PageUp, decrement-page -> PageDown, set-min -> Home, set-max -> End (were empty)
color-wheel, color-area increment-page, decrement-page, set-min, set-max (empty keys) none none
button, action-button, clear-button, close-button, tooltip none none none (Note column reads "Web key bindings (role)")

The text contracts of #2223 are now on main: text-field and text-area lose the clear and submit rows (no Keyboard block), search-field shows clear = Escape and submit = Enter.

Related Issue

Owner decision A747 c (bead hd0g.5.15). Follows the review findings on #2216 and #2223.

Motivation and Context

A table that lists clear/submit with empty keys, a color wheel with four empty rows, a checkbox that "activates" with Enter and a number-field with ArrowRight tells a reader something the web binding does not do.

How Has This Been Tested?

  • A CLI test (keyboard_table_shows_the_keys_of_the_web_bindings: checkbox, search-field, text-field) that fails when the CLI stops loading behaviors/bindings.
  • Unit tests in sdk/plugins/spec-sheet (12, 7 new, including key de-duplication, order and the Note text): button, checkbox, link, slider, number-field, color-wheel, color-area rows; textbox/searchbox with the real web bindings; press and navigation events with inline bindings; no bindings loaded; a binding mutation moves or drops the row. Mutation check: each of 6 reverts of the new logic fails a test (see report).
  • cargo test --workspace --no-fail-fast: 2786 passed, 0 failed. cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings clean.
  • spec-sheet --all before/after (92 sheets): with the Keyboard block removed the other 92 sheets are identical.
  • render-compare --sample 10: 6349 cases byte-identical, 20 PNG identical, 0 spec-sheet rows lost or gained; it FAILs only on the 15 sheets' accessibility section above (expected).
  • behavior test --all: 617 passed, 0 failed before and after. validate packages/design-data: counts identical before and after. Legacy output byte-identical (legacy-verify and diff -rq).
  • wasm-visual: not in its dependency tree and core is untouched, so budget.test.mjs numbers cannot move (CI runs it).
  • No Cargo version bump: 0.63.9 is not tagged.

Screenshots (if appropriate):

None. Table-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.

@changeset-bot

changeset-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8c3411b

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

This PR includes changesets to release 5 packages
Name Type
@adobe/design-data-spec Patch
@adobe/design-data Patch
@adobe/design-data-agent-mcp Patch
@adobe/design-data-mcp Patch
@adobe/design-data-skill 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


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

@github-actions

Copy link
Copy Markdown
Contributor

🧩 Component Schema Changes Report

No component schema changes detected.

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

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Run report for 8c3411b4

Total time: 14m 17s | Comparison time: 33m 11s | Estimated savings: 18m 54s (57.0% faster)

Action Time Status Info
⬛️ SetupProto(0.57.4) 0ms Skipped
🟩 SyncWorkspace 10.2ms Passed
🟩 SyncProject(sdk-wasm-visual) 1.3ms Passed
🟩 SyncProject(sdk) 0.4ms Passed
🟩 SyncProject(design-data-mcp) 2.1ms Passed
🟩 SyncProject(sdk-wasm) 0.9ms Passed
⬛️ SetupToolchain(node:20.17.0) 232.7ms Skipped
⬛️ SetupToolchain(rust:1.88.0) 365.3ms Skipped
🟩 SetupEnvironment(rust, sdk) 188.1ms Passed
⬛️ InstallDependencies(rust, sdk) 0.1ms Skipped
⬛️ SetupToolchain(pnpm:10.17.1) 352ms Skipped
⬛️ SetupToolchain(javascript) 0ms Skipped
⬛️ SetupEnvironment(javascript, sdk) 3.9ms Skipped
🟩 SetupEnvironment(javascript) 0.6ms Passed
⬛️ InstallDependencies(javascript) 0.1ms Skipped
🟩 RunTask(sdk:fmt-check) 4.5s Passed
🟩 InstallDependencies(javascript, sdk) 4.9s Passed
🟩 RunTask(sdk:codegen-check) 318ms Passed
🟩 RunTask(sdk:lint) 37.6s Passed
🟩 RunTask(sdk-wasm-visual:build) 54.7s Passed
And 11 more...
Expanded report
Action Time Status Info
🟩 RunTask(sdk:build) 54s Passed
🟩 RunTask(sdk:test-doc) 1m 22s Passed
🟩 RunTask(sdk-wasm:cache-build) 1m 43s Passed
🟩 RunTask(sdk-wasm:build) 2m 2s Passed SLOW
🟩 RunTask(design-data-mcp:stage) 6.3s Passed
🟩 RunTask(design-data-mcp-eval:test) 1m 4s Passed
🟩 RunTask(design-data-mcp:bundle) 13.7s Passed
🟩 RunTask(figma-spec-plugin:test) 5m 8s Passed SLOW
🟩 RunTask(sdk-wasm-visual:test) 7m 17s Passed SLOW
🟩 RunTask(design-data-mcp:test) 3m 14s Passed SLOW
🟩 RunTask(sdk:test) 14m 11s Passed SLOW
Changed files
.changeset/spec-sheet-keyboard-binding-keys.md
packages/design-data-spec/spec/accessibility.md
sdk/cli/src/main.rs
sdk/cli/tests/cli_spec_sheet.rs
sdk/plugins/spec-sheet/src/sections.rs
tools/design-data-mcp/src/cli.js

@GarthDB
GarthDB merged commit d3607c4 into main Nov 27, 2026
10 of 11 checks passed
@GarthDB
GarthDB deleted the feat/spec-sheet-keyboard-bindings branch November 27, 2026 13:14
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