控制组标签(不是单独控制) - 508合规性HTML

问题描述 投票:0回答:1

假设我有以下形式,我需要通过为每个控制描述符包含一个Label For=<id>来使其符合508。

在简单文本框的情况下,很明显Label For=<id>将指向文本框的ID。

在Choice控件的情况下,例如单选按钮/复选框,qazxsw poi将指向各个选项的ID。

但是应该如何处理控制组的描述符,即以下示例中的速度评估?

Label For=<id>
input[type=radio] {
  float: left;
}
html section508
1个回答
0
投票

<form id="myForm"> <label for="distance">Distance:</label> <input type="text" id="distance"/> <label for="unit">Unit:</label> <select id="unit"> <option value="miles">Miles</option> <option value="km">Km</option> </select> <p>Speed Assessment:</p> <label for="speedSlow">Slow</label> <input type="radio" name="speed" id="speedSlow"/><br/> <label for="speedMedium">Medium</label> <input type="radio" name="speed" id="speedMedium"/><br/> <label for="speedFast">Fast</label> <input type="radio" name="speed" id="speedFast"/><br/> </form>

在我看来是一个标题,应该是<p>Speed Assessment:</p>

根据前面标题的使用情况,它不会是h1。

© www.soinside.com 2019 - 2024. All rights reserved.