E-mail List Archives

Thread: TD, TH, SCOPE

for

Number of posts in this thread: 7 (In chronological order)

From: David Ashleydale
Date: Tue, Aug 21 2012 11:58AM
Subject: TD, TH, SCOPE
No previous message | Next message →

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

From: Paul J. Adam
Date: Tue, Aug 21 2012 12:22PM
Subject: Re: TD, TH, SCOPE
← Previous message | Next message →

<td scope=row> does not work with VoiceOver, <th> as row and column headers does. If you omit the top left <th> this will cause VoiceOver bugs where it incorrectly reads the wrong headers, I see this implementation many times in testing.

Here is a test case of the three different implementations: http://pauljadam.com/demos/tableA11yTest.html

Paul J. Adam
Accessibility Evangelist
Deque Systems
= EMAIL ADDRESS REMOVED =
www.PaulJAdam.com
@pauljadam on Twitter

On Aug 21, 2012, at 12:58 PM, David Ashleydale < = EMAIL ADDRESS REMOVED = > wrote:

> 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
> > >

From: Jared Smith
Date: Tue, Aug 21 2012 12:32PM
Subject: Re: TD, TH, SCOPE
← Previous message | Next message →

On Tue, Aug 21, 2012 at 12:22 PM, Paul J. Adam wrote:
> <td scope=row> does not work with VoiceOver,

I believe JAWS has the same behavior. It does not treat this cell as a header.

> If you omit the top left <th> this will cause VoiceOver bugs where it incorrectly reads the wrong headers, I see this implementation many times in testing.

But if the top left cell is not a header or is empty, it should not be
marked up as a header just to address a VoiceOver bug (that has been
noted repeatedly, yet still has not been fixed). Empty headers can
cause additional issues because you are designating an identifier for
a row or column that does not have any descriptive content. <th>s
should never be empty.

Jared

From: Paul J. Adam
Date: Tue, Aug 21 2012 12:37PM
Subject: Re: TD, TH, SCOPE
← Previous message | Next message →

The easiest way to work around the VoiceOver bug is to designate the top-left cell as a header for the column of row headers below it. Then you don't have to have any blanks.

Paul J. Adam
Accessibility Evangelist
Deque Systems
= EMAIL ADDRESS REMOVED =
www.PaulJAdam.com
@pauljadam on Twitter

On Aug 21, 2012, at 1:32 PM, Jared Smith < = EMAIL ADDRESS REMOVED = > wrote:

> On Tue, Aug 21, 2012 at 12:22 PM, Paul J. Adam wrote:
>> <td scope=row> does not work with VoiceOver,
>
> I believe JAWS has the same behavior. It does not treat this cell as a header.
>
>> If you omit the top left <th> this will cause VoiceOver bugs where it incorrectly reads the wrong headers, I see this implementation many times in testing.
>
> But if the top left cell is not a header or is empty, it should not be
> marked up as a header just to address a VoiceOver bug (that has been
> noted repeatedly, yet still has not been fixed). Empty headers can
> cause additional issues because you are designating an identifier for
> a row or column that does not have any descriptive content. <th>s
> should never be empty.
>
> Jared
> > >

From: Weissenberger, Todd M
Date: Tue, Aug 21 2012 3:03PM
Subject: Re: TD, TH, SCOPE
← Previous message | Next message →

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 ADDRESS REMOVED =
319-384-3323




-----Original Message-----
From: David Ashleydale [mailto: = EMAIL ADDRESS 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

From: Bourne, Sarah (ITD)
Date: Tue, Aug 21 2012 3:25PM
Subject: Re: TD, TH, SCOPE
← Previous message | Next message →

I wonder if perhaps you and your developer have wandered too far into the semantic weeds. (This happens to me all the time.) While he may be right that it isn't a "header," it still is defining or describing what is in the cells across from it, so it's functioning as a header. If it walks like a duck and sounds like a duck, I suggest treating it like a duck. Let' say that first column is "last name". If I'm 8 columns over, under the "annual salary" heading, I would want some indication of which row I'm on, and "last name" is probably as good as anything. (If it's not, then you may need to use the headers/id method.)

sb

Sarah E. Bourne
Director of Assistive Technology &
Mass.Gov Chief Technology Strategist
Information Technology Division
Commonwealth of Massachusetts
1 Ashburton Pl. rm 1601 Boston MA 02108
617-626-4502
= EMAIL ADDRESS REMOVED =
http://www.mass.gov/itd

From: Jared Smith
Date: Tue, Aug 21 2012 4:06PM
Subject: Re: TD, TH, SCOPE
← Previous message | No next message

If the developer is using scope to create an "index" for styling
reasons, there are several suitable alternatives. Modern browsers will
support the <col> element (see
http://www.quirksmode.org/css/columns.html) for basic styling.
Additionally, you could use
tr td:first-child {}
styles to style just the first column. Or alternatively just give each
first cell in a row a class name (which is no more complex than adding
the scope attribute).

Jared