ARIA 資料表警告

Text

資料表包含資料,但沒有 summary 或有效的 aria-describedby 屬性。

類型

警告

描述

此警告適用于具有多個儲存格的 HTML 資料表。 它不適用於 具有 role="presentation" 的資料表,因為這些資料表會被視為版面配置資料表。

這個警告表示資料表已識別為數據表,但未定義可存取的描述。

注意

並非所有資料表都需要有可存取的描述。 如果使用者需要更多資訊來瞭解資料表結構和內容,您應該定義無障礙描述。

 

若要解決這個警告,請使用 summary 屬性或 aria-describedby 屬性來定義資料表可存取的描述。

範例

<!-- Define a table description by using the summary attribute. -->
<table summary="The first column contains the list of examples. In the second column ...">
...
</table>

<!-- Define a table description using the aria-describedby attribute. -->
<p id="tableHeader" >The first column contains the list of examples. In the second column ...</p>
<table aria-describedby="tableHeader" >
...
</table>