WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: TD, TH, SCOPE

for

From: Weissenberger, Todd M
Date: Aug 21, 2012 3:03PM


David,

According to the HTML5 reference at w3.org (Draft 29 March 2012) [http://www.w3.org/TR/html-markup/td.html], the scope attribute is no longer valid for the <td> element, so that's one thing. As for the nature of "scope" the HTML4 spec defines scope as follows:

"This attribute specifies the set of data cells for which the current header cell provides header information. This attribute may be used in place of the headers attribute, particularly for simple tables. When specified, this attribute must have one of the following values:

row: The current cell provides header information for the rest of the row that contains it (see also the section on table directionality).
col: The current cell provides header information for the rest of the column that contains it."

That seems to suggest that the purpose of scope is to define a header relationship to a row or column. With that in mind, if the cells in question aren't logical or semantic headers, I'd go with no scope. If they are headers, then I'd use scope pretty much automatically.

$0.02

Todd


T.M. Weissenberger
Web Accessibility Coordinator
University of Iowa
<EMAIL REMOVED>
319-384-3323




-----Original Message-----
From: David Ashleydale [mailto: <EMAIL REMOVED> ]
Sent: Tuesday, August 21, 2012 12:58 PM
To: WebAIM Discussion List
Subject: [WebAIM] TD, TH, SCOPE

Hi,

I have a philosophical question about whether there's a difference between assigning a cell in a table as a TH or assigning it as a TD but with scope="row".

One of my developers is saying that he doesn't want to assign the first column of the table as THs because the information in the first column aren't really "headers" for the row -- they aren't descriptive of the row, they are just data related to the first column header. But he does want to give them scope="row" so that they act as kind of an "index" for that row.

I understand what he's getting at, but I'm wondering what the people on this list think. Does a screen reader like JAWS handle TH differently than 'TD scope='row'"? Or is this just a case of six of one, half dozen of the other?

Thanks,
David