Re: [techs] The TH Rule

Dear Chris,

I have posted some thoughts about this already in:
<http://lists.w3.org/Archives/Public/w3c-wai-gl/2004JanMar/0234.html>

I insist that you review once more the HTML spec. WCAG cannot force people to 
use TH in data tables, because simply it is against the spec:

<http://www.w3.org/TR/html4/struct/tables.html#edef-TD>

data cells (TD) can also be headers. It states:
"<!-- TH is for headers, TD for data, but for cells acting as both use TD -->"
That is what attributes @headers and @scope were created for.

regards,
carlos

Chris Ridpath wrote:
> 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.
> 
> I took an action to look at how this may impact tables as they are currently
> used on the web.
> 
> As examples of real word tables, I used the Yalin Wang database of tables
> [1].
> 
> Of the over 14000 tables in the database, I looked at a random sample of
> about 2000 tables and graded them as layout or data. In most cases it was
> easy to decide the table type but I discovered several tables that didn't
> fit into either category. (If you're interested in grading these tables
> yourself, I've written a small program to assist the process. Please contact
> me for more info.)
> 
> In some cases, authors combined both data and layout into one table [2].
> This is very confusing to the viewer and we should discourage this practice.
> Use a table for one purpose only.
> 
> The majority of tables in use on the web are used for layout. In my sample
> 89% of the tables were layout, only 11% were data. We're asking authors to
> use CSS instead of TABLE elements but the reality is that layout tables are
> in wide use.
> 
> Only a very small number (< 1% in my sample) of layout tables use TH
> elements. This is an improper use of TH when other markup such as a heading
> or STRONG should be used [4]. Not a big problem but we should continue to
> discourage authors from doing this.
> 
> Most data tables are missing TH elements. In my sample a whopping 87% of the
> data tables were without TH elements. Most authors leave off the headings of
> their data tables or mark one of the TD elements incorrectly as B or STRONG
> [3]. We need to more strongly encourage authors to put TH elements into
> their data tables.
> 
> Exceptions to the TH rule:
> 
> Tables are often used to layout form controls. This is a kind of layout
> table but also acts like a data table because the cells can't be moved
> without affecting their meaning [5]. In this type of table the TH elements
> are not as necessary because each control has an associated label. I suggest
> that tables used to layout form controls can have an optional row/column of
> TH elements.
> 
> Tables are sometimes used to display "tables of contents" [6]. These are
> really data tables but I don't think they require TH elements. A "table of
> contents" is generally understood to include a title (e.g. chapter name)
> associated with a location (e.g. page number). When the viewer encounters a
> number within a table of contents they don't need to be reminded that this
> is the page number, they already know that because of the table's purpose. I
> suggest that tables used for "table of contents" purposes may have optional
> TH elements.
> 
> Discussion:
> 
> All tables with only one row are layout tables.
> 
> 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.
> 


-- 
Dr Carlos A Velasco - mailto:Carlos.Velasco@fit.fraunhofer.de
Fraunhofer-Institut für Angewandte Informationstechnik FIT
   [Fraunhofer Institute for Applied Information Technology (FIT)]
   http://access.fit.fraunhofer.de/
   Barrierefreie Informations- und Kommunikationstechnologie für Alle
   Schloss Birlinghoven, D53757 Sankt Augustin (Germany)
   Tel: +49-2241-142609 Fax: +49-2241-1442609

Received on Monday, 10 May 2004 14:57:33 UTC