CommandHelper

CommandHelper

46.5k Downloads

MethodScript.com Accessibility - 'Learning Trail' table header is not given a scope

LeigerGaming opened this issue ยท 0 comments

commented

This one is pretty simple. See 'Ensure headers and cells are properly associated' in the referenced link.

<th colspan="2">Learning Trail</th>

The best approach may actually be the pull the 'Learning Trail' header out of the table and use a header tag instead. This is because it doesn't directly relate to the contents in any particular row or column of the table, but is a label for the table as a whole.

Every data cell in a complex data table must be properly associated with the column and row header cells that label it. Complex data tables are any data table with more than one row or column of header cells. The header cells are usually--but not necessarily--the outermost cells (i.e. top row and left-most column). While screen readers are often able to "guess" correctly which cells are the headers in simple data tables, various circumstances can cause them to guess "wrong", such as headers that are not in Row 1 and Column 1, unusually lengthy row content, etc. Using proper, supported header markup allows screen readers and other assistive technologies to reliably identify the headers as the user navigates cell by cell within the data table.

For simple tables or those with less than two rows or columns of logical headers, each header cell is not required to set the scope attribute, scope="col" for column headers, and scope="row" for row headers but is recommended.

References: