Question

I need to create 508-compliant code and am running into an issue with a table that does not have headers. Each row simply contains a category name in the left column, and value in the right column. So I guess my initial question is - is this a data table? Should it be represented in a different way instead, like a list? If it is a valid data table, must I invent a header name for each column? The information is in a particular format that has never had column headers, so I'm not even sure the client will want these, but I'm wondering if I need to tell them they must be there in order to be strictly 508-compliant? Finally, is there a way that I could make these headers accessible to those using, say, a screen reader, but invisible to normal viewers?

Was it helpful?

Solution

Yes, it is a data table—of very simple structure, but still. Representing it as a dl is a possibility, but would raise various formatting issues and could be less accessible (since browsing tools may have special support for HTML tables, hardly for dl).

Clause (g) in 508 rules says: “Row and column headers shall be identified for data tables.” The strict interpretation is that every row and every column must have a header. In your case, this is not a problem for rows, since the cell in the first column is logically a row header here, so you just use <td scope=row> for them. But you would need to add a row of column headers.

It is not crystal clear whether this is needed for compliance; the rule does not have the word “all”, and the explanatory prose says “The first row of each table should include column headings.” So it uses “should”, not “shall” or “must”.

If the column headers are required by the rule, and I would say they are, it would not be acceptable to add them with client-side scripting, for example (since then they would not exist when scripting is disabled). Neither would it be acceptable to have them in some browsing modes only; the rules are general (and headers can really be useful even when browsing “normally”).

Consider how the page behaves when read aloud to someone who does not see it. If the content of the table just starts with no warning or explanation, it can be confusing. Even in graphic browsing, the user may get puzzled, partly depending on cognitive difficulties. Explanations in the text before the table (in a heading or in a text paragraph), a caption of the table, and a row of column headers may all help here. The content of the column headers should be planned as part of this; they might be rather concise, if the situation is made clear with the other texts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top