我一定遗漏了一些明显的东西——为什么这个页面没有在谷歌浏览器(灯塔)审计中验证?
<!doctype html>
<html lang="en">
<head>
<title>Label Test</title>
</head>
<body>
<form action="form.php" method="post">
<label>
<input name="phrase" id="phrase" type="text">
</label>
</form>
</body>
</html>
它说:
“表单元素没有关联的标签。” 失败元素:
<input name="phrase" id="phrase" type="text">
(我尝试使用<label for="phrase"
但仍然失败。