简体   繁体   English

满足508复杂数据表的可访问性要求

[英]Meeting 508 Accessibility requirements for complex data tables

I'm using a extension for Firefox to check for 508 compliance issues. 我正在使用Firefox的扩展来检查508合规性问题。 found here: 在这里找到:

https://addons.mozilla.org/en-US/firefox/addon/accessibility-evaluation-toolb/ https://addons.mozilla.org/en-US/firefox/addon/accessibility-evaluation-toolb/

I'm getting the following two errors which I have been unable to resolve on each report: 我收到以下两个错误,我无法在每个报告中解决这两个错误:

Fail: Data tables must use th elements to indicate header cells for the first cell in all the columns or rows. 失败:数据表必须使用th元素来指示所有列或行中第一个单元格的标题单元格。

Fail: For complex data tables, the td elements must have headers attributes that point to associated th header ids. 失败:对于复杂数据表,td元素必须具有指向关联的标头ID的标头属性。

The addon highlights the following table cell for both errors but I can't find anything wrong with it: 插件突出显示以下表格单元格中的两个错误,但我找不到任何错误:

<table cellpadding="5"  width="100%" style ="text-align:right" class ="ecoRow" summary="Budget History" title="Budget History">

<tr> <th id="date_range"  colspan="7" style="text-align:center;">From #params.start_date# To #params.end_date#</th></tr>

What to do? 该怎么办?

I'm using this firefox extension and ran into this same issue today. 我正在使用这个firefox扩展,今天遇到了同样的问题。 It appears that the tool wants to see some text inside the element. 看来该工具想要在元素中看到一些文本。

Other dev on the team replaced plain text header labels with buttons and anchors. 团队中的其他开发人员用按钮和锚点替换了纯文本标题标签。 anchors were passing with the tool, but buttons weren't. 锚点正在使用工具,但按钮不是。 We already had the scope defined and all the closing tags (I checked). 我们已经定义了范围和所有结束标记(我已经检查过)。

Results may differ, but this fixed our issue. 结果可能有所不同,但这解决了我们的问题。 Note that the passing lines have actual text between tags. 请注意,传递行在标记之间包含实际文本。

  • Fail: <th><input type="button" text="blah"></input></th> 失败: <th><input type="button" text="blah"></input></th>
  • Fail: <th><img url="blah.jpg"></img></th> 失败: <th><img url="blah.jpg"></img></th>
  • Pass: <th><a href="www.blah.com">blah</a></th> 通过: <th><a href="www.blah.com">blah</a></th>
  • Pass: <th><span>blah</span></th> 通过: <th><span>blah</span></th>
  • Pass: <th>blah</th> 通过: <th>blah</th>

I see several things about the table that can be improved (inline styles, lack of <tbody> , etc), but header identification is not one of them. 我看到有关表的几个方面可以改进(内联样式,缺少<tbody>等),但标题识别不是其中之一。 Then again, I can't see the entire table. 然后,我再也看不到整张桌子了。 But it looks like the plugin evidently doesn't understand a colspan. 但看起来这个插件显然不了解colspan。 Try adding a scope="col" to the header. 尝试在标题中添加scope="col"

For an alternative plugin, try the WAVE toolbar: http://wave.webaim.org/toolbar 有关替代插件,请尝试使用WAVE工具栏: http//wave.webaim.org/toolbar

UPDATE : Now that I see the table via the pastbin link in the comment, I see some serious problems. 更新 :现在我通过评论中的pastbin链接看到了表格,我看到了一些严重的问题。 First and foremost, there's no closing table tag. 首先,没有关闭表标签。 You have some rows wider than others. 你有一些行比其他行宽。 You have an empty row that has has been inserted for display purposes. 您有一个空行已插入用于显示目的。 Don't do that, use CSS. 不要这样做,使用CSS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM