为什么这个HTML表格不符合508合规性要求?

3

我将我的一个页面源代码通过在线的508合规性检查器运行了一遍,结果显示我的某些表格不正确。我按照指南使用了范围设置,但仍然无法通过检查。

<table>

    <tr bgcolor="#f6f7f7">
        <td scope="col">adsf</td>
        <td scope="col">Type</td>
        <td scope="col">&nbsp;Check ID</td>
        <td scope="col">&nbsp;Check Title</td>
    </tr>

    <tr bgcolor="#EEEEEE" onMouseOver="javascript: this.style.backgroundColor='#FFF8DC';" onMouseOut="javascript:this.style.backgroundColor='#EEEEEE';">
        <td scope="row" id="statuscell0">aad</td>
        <td align="center" id="statuscell0">OVAL</td>
        <td align="left" id="statuscell0">asdfasdf</td>
        <td align="left" id="statuscell0">asdfasdf</td>
    </tr>
    <!-- More such table rows here ... //-->
</table>

感谢您的选择。
3个回答

4

您需要添加表头<th>


<th>标签是否具有与<td>相同的所有属性,例如,我是否可以只修改我的<td>中的标题为<th>而不是<td>? - user105033

2

你需要添加摘要、标题、说明、表头、表头单元格、表尾和表身


没有想到 summary、caption、tfoot、thead 和 tbody 是强制要求的,只是建议性的。 - user105033

1

我也不知道那个内联的onmouseover是否可行。为了让它能够被访问,当用户通过文档进行选项卡选择时,它需要执行相应的操作--这需要一些调整才能正常工作。即使你没有使用鼠标,你也需要一些提示来突出显示该行。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接