WCAG 2.0 使用表格进行布局
WCAG 2.0 是否允许表格布局,我在指南中看不到任何内容说不能,但这让我感到惊讶。
Does WCAG 2.0 allow tables for layout, I can't see anything in the guidelines saying you can't but this suprises me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
http://www.w3.org/TR/WCAG20-TECHS/H73.html
http://www.w3.org/TR/WCAG20-TECHS/H73.html
我想在 @jordan 的回答中补充一点,叠瓦式的桌子是无法访问的。
布局表必须避免使用数据表中使用的任何元素,即:
caption
、thead
、tfoot
和th 元素(仅限
table
、tr
、td
和可选的tbody
)summary
属性(可以为空),headers
,scope
(只有rowspan
和colspan
。显然还有id
)axis
或col
元素还必须是可线性化的,即从上到下、从左到右读取单元格时必须有意义。
相关 WCAG 2.0 故障技术为:
注意:如果您仅将表格用于设计约束,那么仅供参考,您可以使用
display: table;
(和table-row< /代码> 和
table-cell
) 适用于除 IE6 和 IE7 之外的所有浏览器。I'd add to @jordan answer that imbricated tables are inaccessible.
A layout table must avoid using any element used in data tables, that is:
caption
,thead
,tfoot
andth
elements (onlytable
,tr
,td
and optionallytbody
)summary
attribute (it can be empty),headers
,scope
(onlyrowspan
andcolspan
. Andid
obviously)axis
orcol
elementIt must also be linearizable, that is, must make sense when cells are read from top to bottom and left to right.
Relevant WCAG 2.0 Failure Techniques are:
Note: if you're using tables only for design constraints, then FYI you can use
display: table;
(andtable-row
andtable-cell
) on every browser except IE6 and IE7.