WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: The affect of "scope" attributes in <th> tags

for

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

From: Langum, Michael J
Date: Thu, Aug 26 2010 8:42AM
Subject: The affect of "scope" attributes in <th> tags
No previous message | Next message →

Will screen readers correctly handle nested scope for columns and rows?

For example, will the following table be correctly presented by a screen reader? This would mean I could avoid the coding overhead of using "id" and "headers".

<table border="1">
<tr>
<th scope="col" rowspan="2">Major Category</th>
<th scope="col" rowspan="2">Sub Category</th>
<th scope="col" colspan="2">Year 2009</th>
<th scope="col" colspan="2">Year 2010</th>
</tr>
<tr>
<th scope="col">Amount</th>
<th scope="col">% Change</th>
<th scope="col">Amount</th>
<th scope="col">% Change</th>
</tr>
<tr>
<th scope="row" rowspan="2">Supplies</th>
<th scope="row">Stationary</th>
<td>$200</td>
<td>3</td>
<td>$212</td>
<td>6</td>
</tr>
<tr>
<th scope="row">Cleaning</th>
<td>$150</td>
<td>1</td>
<td>$152</td>
<td>1</td>
</tr>
</table>

-- Mike

From: Simius Puer
Date: Thu, Aug 26 2010 9:39AM
Subject: Re: The affect of "scope" attributes in <th> tags
← Previous message | Next message →

As far as I am aware any cell should only be linked to (a max of) one row
and one col "scope" according to the W3C spec. It is not overly clear, but
as I understand it as soon as you go from a "simple" to a "complex" table
that is where IDs and Headers kick in.

Support for IDs and Headers in AT is reasonable, but where possible you
should try to keep your tables simple as possible if accessibility is
vital...even though this technique makes complex tables "accessible" they
are not easy to use. If you can split the table content up (sometimes you
simply can't as the layout needs to be preserved) or simplify the headers it
is a better option (in terms of accessibility).

e.g. your first row contains "Major Category", of which no doubt you have
many...could each one form a new table and the category can form part of the
table <caption>.

There are lots of different methods out there, but the simpler you keep it
the better from an accessibility standpoint...the end result is usually
tables that everyone finds easier to read too. Sometimes though you have to
bite the bullet and go with IDs and Headers.

From: Joshue O Connor
Date: Thu, Aug 26 2010 1:39PM
Subject: Re: The affect of "scope" attributes in <th> tags
← Previous message | Next message →

FWIW use of @scope is practically useless. Very poorly supported by screen readers.

Cheers

Josh

On 26 Aug 2010, at 16:37, Simius Puer < = EMAIL ADDRESS REMOVED = > wrote:

> As far as I am aware any cell should only be linked to (a max of) one row
> and one col "scope" according to the W3C spec. It is not overly clear, but
> as I understand it as soon as you go from a "simple" to a "complex" table
> that is where IDs and Headers kick in.
>
> Support for IDs and Headers in AT is reasonable, but where possible you
> should try to keep your tables simple as possible if accessibility is
> vital...even though this technique makes complex tables "accessible" they
> are not easy to use. If you can split the table content up (sometimes you
> simply can't as the layout needs to be preserved) or simplify the headers it
> is a better option (in terms of accessibility).
>
> e.g. your first row contains "Major Category", of which no doubt you have
> many...could each one form a new table and the category can form part of the
> table <caption>.
>
> There are lots of different methods out there, but the simpler you keep it
> the better from an accessibility standpoint...the end result is usually
> tables that everyone finds easier to read too. Sometimes though you have to
> bite the bullet and go with IDs and Headers.
>
>
>

From: David Farough
Date: Thu, Aug 26 2010 2:09PM
Subject: Re: The affect of "scope" attributes in <th> tags
← Previous message | Next message →

I tried your sample code using Jaws starting with version 9 and then
with version 10 and finally with the current version 11.0.1467. All
versions handled your table with no difficulty.

David Farough
Application Accessibility Coordinator/coordonateur de l'accessibilité
Information Technology Services Directorate /
Direction des services d'information technologiques
Public Service Commission / Commission de la fonction publique
Email / Courriel: = EMAIL ADDRESS REMOVED =
Tel. / Tél: (613) 992-2779

>>> "Langum, Michael J" < = EMAIL ADDRESS REMOVED = > 10:42 AM Thursday,
August 26, 2010 >>>
Will screen readers correctly handle nested scope for columns and
rows?

For example, will the following table be correctly presented by a
screen reader? This would mean I could avoid the coding overhead of
using "id" and "headers".

<table border="1">
<tr>
<th scope="col" rowspan="2">Major Category</th>
<th scope="col" rowspan="2">Sub Category</th>
<th scope="col" colspan="2">Year 2009</th>
<th scope="col" colspan="2">Year 2010</th>
</tr>
<tr>
<th scope="col">Amount</th>
<th scope="col">% Change</th>
<th scope="col">Amount</th>
<th scope="col">% Change</th>
</tr>
<tr>
<th scope="row" rowspan="2">Supplies</th>
<th scope="row">Stationary</th>
<td>$200</td>
<td>3</td>
<td>$212</td>
<td>6</td>
</tr>
<tr>
<th scope="row">Cleaning</th>
<td>$150</td>
<td>1</td>
<td>$152</td>
<td>1</td>
</tr>
</table>

-- Mike

From: Sailesh Panchang
Date: Fri, Aug 27 2010 10:09AM
Subject: Re: The affect of "scope" attributes in <th> tags
← Previous message | No next message

Mike,
At this time it is only JAWS that seems to support the scope
attribute. Other readers like Window-Eyes and NVDA do not.
Some time ago, even JAWS did not support rowspan and its use for
complex tables was not recommended. And then the support for scope in
JAWS had also gone awry. (I had filed a bug with Freedom Scientific
then). Now the support for scope is much better with JAWS.
See user agent notes for technique H63 for WCAG2 and the last
resource listed on that page.
Sailesh Panchang
Accessibility Services Lead
Deque Systems
www.deque.com