Re: [techs] The TH Rule

> 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>
>
Using TH elements for data tables is within the HTML specification. It's
perfectly OK and is the intended purpose of the TH element.

Navigating data tables using assistive technologies is very difficult but
adding TH elements to the table can help make the navigation easier. This is
the reason behind the TH rule. It's not required as part of the HTML spec
but can be required by accessibility guidelines. I believe that this simple
rule can make a large difference in creating more accessible tables.

> "<!-- TH is for headers, TD for data, but for cells acting as both use
TD -->"
>
This is a comment within the specification. It's not a requirement for
compliance. Below is another comment from the HTML spec that states your ALT
text should be a description of the image. Our accessibility guidelines run
contrary to that comment and require that spacer and decorative images do
not have a description and should be null. Yes, we must follow the HTML
specification but we don't have to abide with editor comments.

<!-- To avoid problems with text-only UAs as well as
   to make image content understandable and navigable
   to users of non-visual UAs, you need to provide
   a description with ALT, and avoid server-side image maps -->

Kind Regards,
Chris


----- Original Message ----- 
From: "Carlos A Velasco" <Carlos.Velasco@fit.fraunhofer.de>
To: "Chris Ridpath" <chris.ridpath@utoronto.ca>
Cc: "WAI WCAG List" <w3c-wai-gl@w3.org>
Sent: Monday, May 10, 2004 2:56 PM
Subject: 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 15:36:24 UTC