Html 屏幕阅读器的表样式输入

Html 屏幕阅读器的表样式输入,html,wcag2.0,Html,Wcag2.0,看看这个。 我有一个包含输入的表。每个输入由列标题单元格和行标题单元格定义。您如何确保盲人用户知道在每个输入字段中键入什么 让我们使用以下简化的html表作为示例: <table border="1"> <tr> <th></th> <th>Income</th> <th>Change</th> </tr> <tr> <th&g

看看这个。 我有一个包含输入的表。每个输入由列标题单元格和行标题单元格定义。您如何确保盲人用户知道在每个输入字段中键入什么

让我们使用以下简化的html表作为示例:

<table border="1">
  <tr>
    <th></th>
    <th>Income</th>
    <th>Change</th>
  </tr>
  <tr>
    <th>Personal income</th>
    <td><input type="number" value="0"></td>
    <td><input type="number" value="0"></td>
  </tr>
  <tr>
    <th>Company earnings</th>
    <td><input type="number" value="0"></td>
    <td><input type="number" value="0"></td>
  </tr>
</table>

收入
改变
个人收入
公司收益

答案由W3在示例3中描述:

基本上,您需要使用隐藏的字段集、图例和标签。该示例使用一个隐藏标签的类,但我建议您考虑ARI标签标签,该标签仅由屏幕阅读器(和其他辅助技术)读取,但在视觉上隐藏。p>