RE: [techs] The TH Rule

Chris Ridpath:
> We've been looking at using the "TH" rule to differentiate different HTML
> table types. The proposal is that all data tables must have TH elements
> while all layout tables cannot have TH elements. This would make it easy 
> for assistive technologies to determine the table type and render the
> information more accurately to the user.

When this came up in a recent call, I was puzzled and confused by the term
"rule." I agree with Chris that the guidelines could go beyond the HTML spec
to "require" the use of TH if and only if the table is a data table. That
may be a good idea, because, as we argue so often, you can always visually
style your TH's any way you want.

But the reason Chris gives doesn't work for me. Screen readers can read
tables cell by cell whether or not they are data tables. They don't need to
know the difference between layout and data. 

When there is no table markup, Home Page Reader, JAWS and Window-Eyes all
assume that row 1 and column 1 are headings for columns and rows
respectively. And they will read those "headings" as you navigate with the
table navigation keys.

When there is data-table markup (TH, scope, headers/id's), HPR is different
from the screen readers. Once there is any data-table markup, HPR reads ONLY
what the author has marked up as heading information. I think that is the
way it should be. 

If I were to "require" a data table indication, a "rule," I would use the
requirement of a summary or (not and) a caption. As far as headings
information, if you mark up data tables, then be sure to indicate all
headings through that markup. If you don't mark up data table headings then
row 1 and column 1 will be assumed to be headings.

Because screen reader developers are very pragmatic, the use of row 1 and
column 1 comes through even there is markup for headings (see [1]). 

Chris:
> The scope attribute must also be used with TH elements. In my testing with
> Jaws 4.5 I noticed that the TH elements were not read with the data cells
> unless the TH elements also had the scope attribute. I've heard that other
> screen readers behave the same way. Assistive technologies should be able 
> to use the TH element alone but it appears that since the TH rule is not 
> widely used they have taken to use the scope attribute.

Example 5 in [1] does not have scope and Jaws reads those headings. These
comparisons live on very slippery slope. I would not be the slightest bit
surprised if I have errors in my assertions in [1] about what the AT does.
Except for HPR, the usual deference to row 1 and column 1 is confusing in
trying to figure out screen reader behavior.

Sailesh Panchang:
> Well I'll say  make table caption  too necessary for data tables. They 
> will certainly  help make a distinction and be very useful for 
> accessibility and enhance usability.

Summary I can see, but because of the visibility of the caption, it seems
that the "rule" might be, as I suggested above, "Always use summary or
caption on data tables. Don't use summary or caption on layout tables
(please)."

Jim
http://jimthatcher.com

[1] http://jimthatcher.com/samples/tablesample2.htm 

Received on Tuesday, 11 May 2004 12:49:18 UTC