我還沒有通過屏幕閱讀器運行它,但它可能會被你的 
扔掉。需要用分號關閉 
。像這樣:
。此外,表沒有alt屬性。用summary attribute來代替屏幕閱讀器提供一個有用的解釋。
最重要的是,我建議您移除空單元格,並使用CSS創建更大的空間。
1 - 刪除空行,並提供與CSS的縫隙,就像這樣:
HTML
<table summary="Account Information">
<tr>
<th scope="row">Account Number:</th>
<td>1111 1111 1111</td>
<th scope="row">Reference Number:</th>
<td>XXXX XXXX XXXX</td>
</tr>
</table>
CSS
th { padding: 0 10px; }
2 - ...以及最重要的是,也許它有點挑剔,所以你可以嘗試:
<table summary="Account Information">
<thead>
<tr>
<th scope="col">Account Number Heading</th>
<th scope="col">Account Number</th>
<th scope="col">Reference Number Heading</th>
<th scope="col">Reference Number</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Account Number:</th>
<td>1111 1111 1111</td>
<th scope="row">Reference Number:</th>
<td>XXXX XXXX XXXX</td>
</tr>
</tbody>
</table>
CSS
thead { display: none; }
th { padding: 0 10px; }
3 - ...但是理想的表將只是這樣的:
<table summary="Account Information">
<thead>
<tr>
<th scope="col">Account Number</th>
<th scope="col">Reference Number</th>
</tr>
</thead>
<tbody>
<tr>
<td>1111 1111 1111</td>
<td>XXXX XXXX XXXX</td>
</tr>
</tbody>
</table>
CSS
th { padding: 0 10px; }
有,爲什麼你的頭部和數據是一個具體的理由相互尊重? –
@ShashankChaturvedi他們是行標題而不是列標題 – SaggingRufus
這意味着單行,因爲你只有一行。 –