WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: what to do when CMS doesn't support table caption or <tfootr>

for

From: Jared Smith
Date: Nov 2, 2011 7:57PM


On Wed, Nov 2, 2011 at 7:11 PM, Angela French < <EMAIL REMOVED> > wrote:

> Jared, for years I have used <tfoot> for table "foot" notes. You're saying this is a wrong usage?

Yes. The htmlhelp example (as is generally the case there) is
incorrect. The W3C page doesn't present a functional example of
<tfoot>, though it does not suggest it be used for footnotes.

As defined in the HTML spec (which you linked to), "The table head and
table foot should contain information about the table's columns." In
other words, the footer should repeat the column headers or provide
other descriptive information about the relevant columns. Unless the
spanned row contains information about all of the spanned columns
(which footnotes rarely would), defining a spanned row as a table
footer is quite a stretch from this definition, I think.

HTML5 defines it this way: "The tfoot element represents the block of
rows that consist of the column summaries (footers) for the parent
table element".

A primary issue with <tfoot> is that it must be in the markup before
the data contents of the table (even though it visually is presented
at the bottom of the table). This means that your footnotes would be
read by a screen reader before the content that references them. If
you put <tfoot> at the bottom of your table, your code would be
invalid.

> Here is one example of a table, I'm trying to make more accessible: http://sbctc.edu/college/f_tuition.aspx

Only put the data inside the table. The first cell, as you noted,
should be a <caption>. If you can't do captions, then it should
probably be a heading before the table. It definitely should NOT be in
a <thead> as it is currently marked up. The bottom "Source" cell is
not tabular data or a table footer, so it should be presented
immediately after the table. There's no way I know of to associate
this content to the table.

Jared