示例工程 24-labels-errors
24-labels-errors/app/README.md
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
# 24-labels-errors / app
显式/隐式标签、帮助文字、错误关联与错误摘要。
## 运行
```bash
cd tutorials/html
python3 -m http.server 8080
# 打开 http://127.0.0.1:8080/examples/24-labels-errors/app/
```
## 观察
- label for 与 input id 对应
- 帮助文字用 aria-describedby 关联
- 错误字段有 aria-invalid 与错误 id
- 错误摘要链接到字段
- 复选框用 label 包住