加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html-table – 数据表可访问性的“id”和“headers”或“scope”

发布时间:2020-12-14 23:27:37 所属栏目:资源 来源:网络整理
导读:屏幕阅读器最支持哪种方法 – 标识和标题或范围属性? 我发现有关这些方法在将HTML表头与表格单元格相关联时的支持方式存在冲突信息. 解决方法 这取决于数据表的复杂性.使用范围通常是最佳选择. 例如,如果您使用colspan或rowspan,则使用id和headers将是更好
屏幕阅读器最支持哪种方法 – 标识和标题或范围属性?

我发现有关这些方法在将HTML表头与表格单元格相关联时的支持方式存在冲突信息.

解决方法

这取决于数据表的复杂性.使用范围通常是最佳选择.

例如,如果您使用colspan或rowspan,则使用id和headers将是更好的选择.

H43: Using id and headers attributes to associate data cells with header cells in data tables:

This technique is used when data cells are associated with more than one row and/or one column header. This allows screen readers to speak the headers associated with each data cell when the relationships are too complex to be identified using the th element alone or the th element with the scope attribute.

话虽这么说,当数据表需要这样的补充属性时,其他人(不使用屏幕阅读器)可能很难将单元格与其标题相关联,并且为标题添加补充视觉提示可能是必要的(例如交替颜色或鼠标悬停效果等).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读