ElemeFE / ElemeFE/element

[Bug Report] Incorrect use of <label for=FORM_ELEMENT>

Open
#22,572 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.15.13

### OS/Browsers version
macOS11.4/chrome113

### Vue version
2.7.14

### Reproduction Link
https://codepen.io/Macrolam/pen/xxQOWBP?editors=1111

### Steps to reproduce
https://juejin.cn/post/7246638858912366649
这里有详细的阐述。codeopen不太会用,可以看这篇文章,具体复现。
1.使用表单元素的地方就会出现
2.示例代码


### What is Expected?
谷歌浏览器113版本不再报红。
给el-input 等其他表单元素自动绑定一个与label标签for属性值一致的id。

### What is actually happening?
报错:
The label's `for` attribute doesn't match any element `id`. This might prevent the browser from correctly autofilling the form and accessibility tools from working correctly.

To fix this issue, make sure the label's `for` attribute references the correct `id` of a form field.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.