Navigating tables such as Table 2 in RJ-2012-006 is difficult because row and column headers are not correctly identified and marked up with <th> tags
Unfortunately LaTeX does not mark up row and column headers in an unambiguous way, however we might do better by inferring structure from tables that use \multicolumn. In this example,
\toprule
&& \multicolumn{5}{c}{Class} \\
implies that we have two levels of row headers (indicated by &&) and at least two levels of column headers (since the \multicolumn would almost surely be paired with another row of minor column headers nested within this major column header). If there is no \multicolumn in the next row, then we can assume there is no further nesting, i.e. exactly two levels of column headers. This may be a bit tricky to implement though.
We could at least try to ensure that \multicolumn is correctly handled though, so that it correctly spans the relevant columns, e.g.
This would at least avoid the screen reader navigating through empty cells in the first header row cause by converting multicolumn headers to one header plus several blank cells.
Comment from @ajrgodfrey
Unfortunately LaTeX does not mark up row and column headers in an unambiguous way, however we might do better by inferring structure from tables that use
\multicolumn
. In this example,implies that we have two levels of row headers (indicated by
&&
) and at least two levels of column headers (since the\multicolumn
would almost surely be paired with another row of minor column headers nested within this major column header). If there is no\multicolumn
in the next row, then we can assume there is no further nesting, i.e. exactly two levels of column headers. This may be a bit tricky to implement though.We could at least try to ensure that
\multicolumn
is correctly handled though, so that it correctly spans the relevant columns, e.g.This would at least avoid the screen reader navigating through empty cells in the first header row cause by converting multicolumn headers to one header plus several blank cells.