Skip to content

[Good first issue] 为通用输入框关联可见标签 #129

Backlog

Description

@ydflow

The shared Input renders a visible label without associating it with the field.

复现

离线渲染两个 Input,一个传 id="price" 和 label="Target Price",另一个只传 label="Minimum Weight"。两个可见 <label> 都没有 for 属性,也都在输入框外部。提醒表单等使用这套组件的页面因此缺少原生的标签关联。

验收标准

  • 有 label 的 Input 用对应输入框的 ID 建立标签关联。调用方传入 ID 时使用该值,省略 ID 时同页的多个字段各有自己的关联。
  • 组件测试覆盖显式 ID 与两个自动关联的字段,可通过标签分别找到输入框。

源码与测试入口

  • 检查共享组件输出的 label 和 input。 通用 Input
  • 可用 installHappyDom 渲染多个输入框并验证关联。 UI 测试 DOM

想处理这项任务,可以评论 /claim。提交 PR 时请关联本 Issue,并附上实际运行的测试命令和结果。 贡献指南

Activity

  1. added
    bug
    accessibility
    help wanted
    good first issue
    area:desktop
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityarea:desktopbuggood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions