Declarative WebMCP: a radio group's parameter never gets a `description`
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- html, javascript
调研方向
首先定位将表单转换为工具架构、并根据分组的单选输入构建参数的声明式逻辑。使用提供的 <form> 复现问题,并检查 document.modelContext.getTools(),确认缺少描述。更新单选组的处理方式,优先使用 toolparamdescription,然后回退到该组的可访问名称。通过针对单选组和现有控件类型的测试来验证行为。
由索引模型根据 Issue 内容生成。
描述
Summary
A declarative tool form builds a parameter for a group of radio buttons that share a name, with each radio's
label as the title of its choice. The parameter itself never gets a description. Every other control type
we tried (text, textarea, checkbox, select, select multiple, range) takes one from toolparamdescription or
from its <label>. As a result, an agent sees the choices but not what the group is.
Reproduction
<form toolname="createProfile" tooldescription="Creates a profile.">
<fieldset>
<legend>Shift</legend>
<label><input type="radio" name="shift" value="day" toolparamdescription="Which shift they work."> Day</label>
<label><input type="radio" name="shift" value="night"> Night</label>
</fieldset>
<button type="submit">Create</button>
</form>
(await document.modelContext.getTools())[0].inputSchema.properties.shift
Expected: a description for shift. The obvious sources are toolparamdescription on a radio in the
group (or on all of them), the <legend> of the <fieldset> the group sits in, or the accessible name of an
enclosing role="radiogroup".
Actual:
{
"type": "string",
"anyOf": [
{ "type": "string", "const": "day", "title": "Day" },
{ "type": "string", "const": "night", "title": "Night" }
],
"enum": ["day", "night"]
}
None of these added a description:
toolparamdescriptionon the first radio, the second radio, or botharia-descriptionon a radioaria-descriptionon the<fieldset>- the
<fieldset>'s<legend>
It is not a stale schema. Changing toolparamdescription on a text input in the same form is reflected by the
next getTools() call, and removing and restoring toolname (re-registering the tool) did not add one either.
Suggestion: use the first toolparamdescription found among the group's radios. Failing that, fall back
to the group's accessible name: the <legend> of the nearest <fieldset>, or the label of a
role="radiogroup" ancestor. That would mirror the <label> fallback other controls already get.
- 主要语言
- Bikeshed
- 星标
- 4.7k
- 派生
- 328
- 平均合并
- 2 天 9 小时
- 30 天内合并 PR
- 15
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
webmachinelearning/webmcp 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 72/100
webmachinelearning/webmcp#360 · 1 条评论 ·
维护者通常 1 天内回复
-
Say how an agent should weigh annotations that the page wrote about itself可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
webmachinelearning/webmcp#353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
webmachinelearning/webmcp#343 · 1 个 reaction ·
维护者通常 1 天内回复
-
Agenda+ i18n-tracker
难度 2/5 1-3 小时 新手友好度 75/100
webmachinelearning/webmcp#273 · 3 条评论 ·
维护者通常 1 天内回复
-
a11y-tracker Agenda+
难度 2/5 1-3 小时 新手友好度 67/100
webmachinelearning/webmcp#272 · 4 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
查看 webmachinelearning/webmcp 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
fossasia/scrum_helper#949 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
CodeChefVIT/ffcs#280 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 68/100
Boston-area-Women-in-Bioinformatics/webpage#440 ·
维护者通常 1 天内回复