feat(combo-box): migrate ComboBox with input-owned focus and filtering
Port the fixed-baseline ComboBox onto the B02a collection protocol: the input keeps real DOM focus, the list only tracks an active row, and filtering reuses the owner filter instead of a second collection kernel. - Five parts: root (field text control, value/input/open models, form value, owner wiring), InputGroup (composes the caller's Input into the combobox control and anchors the popover), Trigger, Value, Popover. - Closed-state metadata is planned from the slot tree, so filtering, the initial value label and form-value="text" work before the list has mounted. - Selection text syncs on selection changes only, so allows-custom-value typing is not overwritten; read-only and disabled are injected onto the composed input because it reads the text-field protocol, not the field context. - 24 baseline previews, the Chinese doc page, navigation, 19 behaviour tests and 6 demo/document contracts. Async demo uses a local async source with abort, loading and incremental append (documented adaptations). Not included: independent tarball consumption (B02d).
This commit is contained in:
@@ -1017,3 +1017,12 @@ Tag/TagGroup/ErrorMessage 的最新验收见 [B03 复核记录](migrations/B03-r
|
||||
## B02a 共享协议阶段(2026-10-25)
|
||||
|
||||
阶段复核见 [B02a 验收](migrations/B02a-acceptance.md)。过滤/虚拟焦点协议及真实受限虚拟窗口通过重点验证;静态空集合、嵌套按下状态和测试环境由集成人补齐。相关98项、全套1026项、类型/文档构建通过,无未处理错误。只允许继续B02b–d,不代表ComboBox/Autocomplete公共迁移完成。
|
||||
|
||||
## 2026-10-25 B02b ComboBox
|
||||
|
||||
部件、示例、文档与测试范围见 [B02 报告](migrations/B02-combobox-autocomplete.md) 第 11 节;本段只记录本轮实际命令与证据。
|
||||
|
||||
- `pnpm typecheck` 通过;`pnpm test` **79 文件 / 1051 项**通过;`pnpm build:docs`、Prettier、`git diff --check` 通过。
|
||||
- 新增 `tests/combo-box.test.ts`(19 项行为)与 `tests/combo-box-demos.test.ts`(6 项文档/演示契约),均已加入 `test:unit`。
|
||||
- 浏览器 5182(Chromium/IAB):输入过滤后焦点仍在输入框、`aria-activedescendant` 指向真实 option、列表只有一个 Tab 入口;`ArrowDown`+`Enter` 回写文本并关闭;`Escape` 移除 `aria-activedescendant`;三个预选示例输入框显示“猫”;禁用示例输入框原生禁用;`ComboBoxValue` 占位文本;form-value 输出 `animal` / `animal-text` 隐藏输入。
|
||||
- 未验证:浮层选项的真实鼠标点击(本 IAB 对 floating option 报 `not actionable`,指针保焦点由 B02a harness 覆盖)、真实 IME、读屏软件、逐像素对比、独立 tarball 消费(B02d)。
|
||||
|
||||
Reference in New Issue
Block a user