Placing a table on your site should only be done for displaying tabular data. Tables must not be used for any other reason such as page layout. 还应尽量避免使用嵌套表或标题单元格跨越多行或多列的复杂表, as screen reader users can encounter problems accessing these tables.
使用表时, 有一些补充,每个表应该被认为是一个可访问的表. When adding a table using the Rich Text Editor, along with setting the desired 列 and row numbers, 它还会问第一行是否, 列, or both should be treated as a header. 这对于屏幕阅读器非常重要,因为它知道如何向用户读取表格. 没有头, the screen reader will read the full 内容s of the table, 从左上单元格开始, 到右下角的单元格,而不给出任何上下文,它将显示什么.
创建表时提供的其他字段是标题和摘要字段. 标题应该是表格的标题,并且在显示时出现在表格的上方. 类似“学生每学期的费用”这样的文字就是一个例子.
的 Summary, contrary to what it sounds like, does not describe the table. Instead it is used to tell the user how to properly read the physical table. 的 Summary is only available to screen readers; sighted users will never see the Summary. 一个总结, 对于我们的学费表例子, 将, "的 first-row separates the 列s by semester name. 的 first 列 displays the different expenses a student may encounter."
Student Expenses Per Semester (example only)
|
秋天 |
冬天 |
夏天 |
学费 |
$5,872 |
$5,872 |
$2,500 |
房间 |
$3,296 |
$3,296 |
$800 |
董事会 |
$2,838 |
$2,838 |
$1,432 |
书籍及用品 |
$515 |
$515 |
$112 |