WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Tables with a checkbox column


From: Jukka K. Korpela
Date: Mar 28, 2010 6:06AM

James Kennard wrote:

> I have a table which includes a <thead> and a bunch of <th> cells.

This sounds odd. Do you mean the <thead> element contains lots of <th> cells
in several rows, as the sequel suggests? Why? Why not post a URL?

> The left most column contains checkboxes (one per row) and is used to
> select rows.

Checkboxes as such don't select anything. There must be some server-side or
client-side programming involved. This in turn might imply serious
accessibility issues. Why not post a URL?

> I currently have no content in the left most <th> cell.

That's very odd, unless you mean that it has no content _except_ a checkbox,
in which case it's "just" an issue.

> Is this considered accessible?

No, it is considered inaccessible. It even violates the technical
requirement of always associating a "control" (input field) with a label.
Don't the rows have any identifying text saying what the row is about? Then
that would be an accessibility problem even irrespectively of any

> If not what is the best practice for
> this type of thing, it must be quite a common scenario.

We don't know what "this type of thing" really is, in the absence of a URL.

If the idea is that the user can select some of the rows for processing,
then it is surely relevant to know what the rows are. You might think that
the nature of a row can immediately be seen by looking at the table, then
your assumptions fail, for example, when the user cannot see anything.

In the absence of any logical row header (do you really have a tabular data
structure then?), you could introduce enumerative labels like 1, 2, 3 etc.
or a, b, c etc. This would let you satisfy the technical requirement of
associating a label with a field, but would it really make the page more
accessible? Consider a person "viewing" the page with a browser that reads
its content in a linearized manner. He would have decide whether to check
the checkbox or not solely on the basis of the row number (or, in your
current design, without any information about its meaning).

P.S. Did I mention that the URL would enable us to consider the _real_

Yucca, http://www.cs.tut.fi/~jkorpela/