{
  "synthetic": true,
  "execution": "Teaching record only; no live integration tested",
  "slug": "service-search-combobox-acceptance",
  "group": "accessible-interaction",
  "title": [
    "Autocomplete must distinguish a suggestion from a choice",
    "自动补全，要区分建议与已选项目"
  ],
  "intro": [
    "A service enquiry may use suggestions to help a customer select the right branch or service. Before commissioning a custom combobox, decide whether free text is allowed and what commits a suggestion. Merely highlighting an item should not silently change the enquiry destination.",
    "服务询盘可用建议项帮助客户选分店或服务。制作自定义组合框前，要约定能否自由填写，以及什么动作才算选中。高亮一项不能静默改变询盘去向。"
  ],
  "facts": [
    [
      "W3C APG describes combobox keyboard interaction, including popup dismissal and accepting a selected suggestion; the exact behaviour depends on the chosen combobox pattern.",
      "W3C APG说明组合框键盘交互，包括关闭弹出框及接受选中建议，具体行为依所选模式。",
      "https://www.w3.org/WAI/ARIA/apg/patterns/combobox/"
    ]
  ],
  "columns": [
    [
      "Synthetic state",
      "Action",
      "Expected stored selection"
    ],
    [
      "合成状态",
      "动作",
      "预期保存选择"
    ]
  ],
  "example": [
    [
      [
        "Typed“design”; no committedID",
        "Down arrow highlightsS2",
        "No committed serviceID yet"
      ],
      [
        "输入design，未提交ID",
        "下箭头高亮S2",
        "尚无正式服务ID"
      ]
    ],
    [
      [
        "S2 highlighted",
        "Enter commits suggestion",
        "serviceID=S2; visible label matches"
      ],
      [
        "S2高亮",
        "回车接受建议",
        "服务ID为S2，文字一致"
      ]
    ],
    [
      [
        "Popup open; prior committed S1",
        "Escape under declared pattern",
        "Popup closes; preserve agreed prior value"
      ],
      [
        "弹出框打开，原已选S1",
        "按本例模式Escape",
        "关闭弹出框，保留约定原值"
      ]
    ],
    [
      [
        "Edited text no longer matchesS2",
        "Submit required-selection form",
        "Clear staleID; explain selection requirement"
      ],
      [
        "文字已改，不再对应S2",
        "提交必须选项的表单",
        "清掉旧ID，说明须重新选择"
      ]
    ]
  ],
  "steps": [
    [
      "Choose editable versus select-only behaviour and whether unmatched text is valid. Document visible text, active suggestion and committed ID as separate states.",
      "选择可编辑或仅选择模式，明确未匹配文字是否有效；文字、高亮建议和正式ID分状态记录。"
    ],
    [
      "Give suggestions stable IDs and accessible labels. Test arrow navigation, Enter, Escape, pointer selection and a no-results state against the chosen APG pattern.",
      "建议项使用稳定ID及可访问标签，按选定APG模式测试方向键、回车、Escape、点击及无结果。"
    ],
    [
      "Verify stale-ID clearing after edits and compare final payload with the confirmation screen. Include keyboard and assistive-technology observations, not only mouse selection.",
      "修改后核对旧ID清除，最终数据与确认画面一致；须有键盘和辅助技术观察，不能只测鼠标。"
    ]
  ],
  "result": [
    "The first row highlights S2 without selecting it. That distinction prevents a request being routed to a service the customer never chose. In the last row a server must validate the actual selection; a plausible visible label is insufficient. Search matching quality remains a different decision from committing a result.",
    "第一行只是高亮S2，尚未选择，这可避免请求被分派到客户没选的服务。最后一行须由服务端验证真实选择，看似正确的文字不够；搜索匹配质量与正式选中是不同决定。"
  ],
  "accept": [
    "Require agreement between committed ID, visible label, submitted payload and confirmation under all supported input paths. A native select may be simpler when search is unnecessary.",
    "各输入路径下，正式ID、文字、提交及确认须一致；无需搜索时，原生选择框可能更简单。"
  ],
  "limit": [
    "Synthetic state contract, not a tested component or APG compliance certificate. Actual browser/assistive-technology support and server-side service availability need their own validation.",
    "仅合成状态合同，不是已实测组件或APG合规证书；浏览器辅助技术支持及服务端项目可用性另需核对。"
  ]
}
