WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: empty cells in data tables

for

From: Jukka K. Korpela
Date: Feb 14, 2013 2:24PM


2013-02-14 22:42, Trafford, Logan wrote:

> What is the generally accepted best practice for dealing with large
> blocks of empty data cells in tables

Years ago, I wrote a treatise on empty cells, primarily to address some
styling problems:
http://www.cs.tut.fi/~jkorpela/html/emptycells.html

It's a bit dusty, but I think the basic reasoning is still relevant: we
should try to avoid leaving cells empty in data tables. It is not just a
matter of nonvisual access, which may or may not have trouble with empty
cells. In general, when a table cell is presented as empty, visually or
otherwise, the question arises what the emptiness means. It can mean a
wide variety of things, from simple oversight or data error to absence
of data due to security restrictions, logical impossibility, lack of
anything to report, or just lack of data.

Depending on the nature of the data and the table, as well as the human
language, different notations can be used, and may need to be explained.
A fairly common convention is that an en dash indicates absence of data
without disclosing a reason; but in some conventions, it indicates an
exact value of zero.

> For example, suppose you have a report with 5 columns and 50 rows
> (each row represents a different building location for example). Now
> under one column, perhaps only 5 of the 50 buildings have a value
> associated with that category, while the other 45 do not.

In this case, en dashes might be suitable, possibly along with CSS
settings that set e.g. the background of those cells to gray.

> Should the cell(s) be left blank, or should some kind of value be put
> in (like “nil”, “n/a” etc.)?

The dummy values, or metadata, to be used depends on the context. This
often tricky, since the notations should be compact. The notation n/a or
N/A is now used even when the language is not English, but this might
not be suitable in documents for a general audience. Moreover, "n/a" is
very ambiguous. "Not applicable" and "not available" can be very
different things.

Yucca