WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: th scope=row

for

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

From: Trafford, Logan
Date: Wed, Apr 06 2016 10:09AM
Subject: th scope=row
No previous message | Next message →

I'm documenting steps for non-technical content creators who have some limited control over table creation.

I'm looking for a clear explanation of when to define a first column cell as a <th> with scope="row" as opposed to it just being a <td>. Anybody have one, or know where in the W3C or WCAG resources to find one? WCAG references to "simple tables" but it doesn't actually explain what is meant by that (at least I can't locate an explanation). It also references using scope, but I can't seem to find anything that references if or when the first column HAS to be defined as a <th>.


Logan


This e-mail originates from the City of Ottawa e-mail system. Any distribution, use or copying of this e-mail or the information it contains by other than the intended recipient(s) is unauthorized. Thank you.

Le présent courriel a été expédié par le système de courriels de la Ville d'Ottawa. Toute distribution, utilisation ou reproduction du courriel ou des renseignements qui s'y trouvent par une personne autre que son destinataire prévu est interdite. Je vous remercie de votre collaboration.

From: Brian Lovely
Date: Wed, Apr 06 2016 10:20AM
Subject: Re: th scope=row
← Previous message | Next message →

You mean when a table uses both column and row headers? WebAIM.org <http://webaim.org/>; has an article on accessible tables: http://webaim.org/techniques/tables/data <http://webaim.org/techniques/tables/data>;

Brian Lovely
= EMAIL ADDRESS REMOVED =



> On Apr 6, 2016, at 12:09 PM, Trafford, Logan < = EMAIL ADDRESS REMOVED = > wrote:
>
> I'm documenting steps for non-technical content creators who have some limited control over table creation.
>
> I'm looking for a clear explanation of when to define a first column cell as a <th> with scope="row" as opposed to it just being a <td>. Anybody have one, or know where in the W3C or WCAG resources to find one? WCAG references to "simple tables" but it doesn't actually explain what is meant by that (at least I can't locate an explanation). It also references using scope, but I can't seem to find anything that references if or when the first column HAS to be defined as a <th>.
>
>
> Logan
>
>
> This e-mail originates from the City of Ottawa e-mail system. Any distribution, use or copying of this e-mail or the information it contains by other than the intended recipient(s) is unauthorized. Thank you.
>
> Le présent courriel a été expédié par le système de courriels de la Ville d'Ottawa. Toute distribution, utilisation ou reproduction du courriel ou des renseignements qui s'y trouvent par une personne autre que son destinataire prévu est interdite. Je vous remercie de votre collaboration.
> > > >

From: Birkir R. Gunnarsson
Date: Wed, Apr 06 2016 10:20AM
Subject: Re: th scope=row
← Previous message | Next message →

Logan

I approach this more based on content than WCAG criteria.
I ask myself, "do I need to know the value of the leftmost cell in
this row (or any cell), in order to fully understand the cell I am
looking at)?
E.g. if your table is a task list that consists of "days of the week"
column headers, then you do not need to hear the value of the leftmost
column to fill in infor for any of the other columns.
You don't need to hear the tasks in the Sunday column (assuming it is
the lefmost column) in context of the tasks listed in the Thursday
column.

But if your table consists of the column headers "name, email, phone
number", then you need to know the name of the person in order to
fully understand the email or phone number cells. Making the name
cells into row headers communicates this relationship and enables
assistive technologies such as screen readers to announce these in
context.

A few other rules of thumb:
For two-column tables (or name, value pairs), I do not require row
headers, users can easily switch between columns (I recommend it as
good practice but definitely do not require it).

If you have a simple data table (with header cells in first row and/or
first column), you do not need to specify the scope attribute. Jaws 14
and older had a very annoying bug where it assumed all th cels where
column headers, so it would announce the first 20 cells in the first
column for cell 21 unless they had scope="row", but I think all more
recent screen reader versions since handle this correctly.

I could go on about complex tables, but I think, or at least hope,
this gets you started with this question. :)
Cheers
-Birkir



On 4/6/16, Trafford, Logan < = EMAIL ADDRESS REMOVED = > wrote:
> I'm documenting steps for non-technical content creators who have some
> limited control over table creation.
>
> I'm looking for a clear explanation of when to define a first column cell as
> a <th> with scope="row" as opposed to it just being a <td>. Anybody have
> one, or know where in the W3C or WCAG resources to find one? WCAG
> references to "simple tables" but it doesn't actually explain what is meant
> by that (at least I can't locate an explanation). It also references using
> scope, but I can't seem to find anything that references if or when the
> first column HAS to be defined as a <th>.
>
>
> Logan
>
>
> This e-mail originates from the City of Ottawa e-mail system. Any
> distribution, use or copying of this e-mail or the information it contains
> by other than the intended recipient(s) is unauthorized. Thank you.
>
> Le présent courriel a été expédié par le système de courriels de la Ville
> d'Ottawa. Toute distribution, utilisation ou reproduction du courriel ou des
> renseignements qui s'y trouvent par une personne autre que son destinataire
> prévu est interdite. Je vous remercie de votre collaboration.
> > > > >


--
Work hard. Have fun. Make history.

From: Brian Lovely
Date: Wed, Apr 06 2016 10:21AM
Subject: Re: th scope=row
← Previous message | Next message →

…there's also this tutorial from the W3C WAI: https://www.w3.org/WAI/tutorials/tables/ <https://www.w3.org/WAI/tutorials/tables/>

Brian Lovely
= EMAIL ADDRESS REMOVED =



> On Apr 6, 2016, at 12:09 PM, Trafford, Logan < = EMAIL ADDRESS REMOVED = > wrote:
>
> I'm documenting steps for non-technical content creators who have some limited control over table creation.
>
> I'm looking for a clear explanation of when to define a first column cell as a <th> with scope="row" as opposed to it just being a <td>. Anybody have one, or know where in the W3C or WCAG resources to find one? WCAG references to "simple tables" but it doesn't actually explain what is meant by that (at least I can't locate an explanation). It also references using scope, but I can't seem to find anything that references if or when the first column HAS to be defined as a <th>.
>
>
> Logan
>
>
> This e-mail originates from the City of Ottawa e-mail system. Any distribution, use or copying of this e-mail or the information it contains by other than the intended recipient(s) is unauthorized. Thank you.
>
> Le présent courriel a été expédié par le système de courriels de la Ville d'Ottawa. Toute distribution, utilisation ou reproduction du courriel ou des renseignements qui s'y trouvent par une personne autre que son destinataire prévu est interdite. Je vous remercie de votre collaboration.
> > > >

From: Brian Lovely
Date: Wed, Apr 06 2016 10:34AM
Subject: Re: th scope=row
← Previous message | Next message →

Logan

Birkir is spot on here, but what I don't know is if you mean a table where each cell has two headers (row and column) that are necessary to understand the context of the information in the cell. For instance, a task list with column headers "Fred, Mary, Sam, Jane" and row headers "Monday, Tuesday, etc.", then you would need the data from both row and column headers in order to know that a task was assigned to say, Fred to perform on Monday.


Brian Lovely
= EMAIL ADDRESS REMOVED =



> On Apr 6, 2016, at 12:20 PM, Birkir R. Gunnarsson < = EMAIL ADDRESS REMOVED = > wrote:
>
> Logan
>
> I approach this more based on content than WCAG criteria.
> I ask myself, "do I need to know the value of the leftmost cell in
> this row (or any cell), in order to fully understand the cell I am
> looking at)?
> E.g. if your table is a task list that consists of "days of the week"
> column headers, then you do not need to hear the value of the leftmost
> column to fill in infor for any of the other columns.
> You don't need to hear the tasks in the Sunday column (assuming it is
> the lefmost column) in context of the tasks listed in the Thursday
> column.
>
> But if your table consists of the column headers "name, email, phone
> number", then you need to know the name of the person in order to
> fully understand the email or phone number cells. Making the name
> cells into row headers communicates this relationship and enables
> assistive technologies such as screen readers to announce these in
> context.
>
> A few other rules of thumb:
> For two-column tables (or name, value pairs), I do not require row
> headers, users can easily switch between columns (I recommend it as
> good practice but definitely do not require it).
>
> If you have a simple data table (with header cells in first row and/or
> first column), you do not need to specify the scope attribute. Jaws 14
> and older had a very annoying bug where it assumed all th cels where
> column headers, so it would announce the first 20 cells in the first
> column for cell 21 unless they had scope="row", but I think all more
> recent screen reader versions since handle this correctly.
>
> I could go on about complex tables, but I think, or at least hope,
> this gets you started with this question. :)
> Cheers
> -Birkir
>
>
>
> On 4/6/16, Trafford, Logan < = EMAIL ADDRESS REMOVED = > wrote:
>> I'm documenting steps for non-technical content creators who have some
>> limited control over table creation.
>>
>> I'm looking for a clear explanation of when to define a first column cell as
>> a <th> with scope="row" as opposed to it just being a <td>. Anybody have
>> one, or know where in the W3C or WCAG resources to find one? WCAG
>> references to "simple tables" but it doesn't actually explain what is meant
>> by that (at least I can't locate an explanation). It also references using
>> scope, but I can't seem to find anything that references if or when the
>> first column HAS to be defined as a <th>.
>>
>>
>> Logan
>>
>>
>> This e-mail originates from the City of Ottawa e-mail system. Any
>> distribution, use or copying of this e-mail or the information it contains
>> by other than the intended recipient(s) is unauthorized. Thank you.
>>
>> Le présent courriel a été expédié par le système de courriels de la Ville
>> d'Ottawa. Toute distribution, utilisation ou reproduction du courriel ou des
>> renseignements qui s'y trouvent par une personne autre que son destinataire
>> prévu est interdite. Je vous remercie de votre collaboration.
>> >> >> >> >>
>
>
> --
> Work hard. Have fun. Make history.
> > > >

From: dawn
Date: Wed, Apr 06 2016 10:43AM
Subject: Re: th scope=row
← Previous message | Next message →

You should always have a th with scope 'row' somewhere per row, but it doesn't have to be in the first column. It could be the second, third, etc. It is just a more common design approach that it is in the first column.

The best advice I can give you is to look at the row and work out what would give you the right heading for that row, and set scope="row" on that.

Imagine you had a table of prices for a list products in different countries, and the first column is something not very human-readable like a ID number, and the second column is the names of the products, third onwards were the different countries' prices. You would definitely want the human-readable product name to be used as the heading for that row, sighted users would implicitly work that out but software can't, so that is what gets the th scope=row.

Webaim has some very good articles http://webaim.org/techniques/tables/data and more specifically http://webaim.org/techniques/tables/data#th might help


-------- Original Message --------
> From: "Trafford, Logan" < = EMAIL ADDRESS REMOVED = >
> Sent: 06 April 2016 17:09
> To: "WebAIM Discussion List" < = EMAIL ADDRESS REMOVED = >
> Subject: [WebAIM] th scope=row
>
> I'm documenting steps for non-technical content creators who have some limited control over table creation. I'm looking for a clear explanation of when to define a first column cell as a <th> with scope="row" as opposed to it just being a <td>. Anybody have one, or know where in the W3C or WCAG resources to find one? WCAG references to "simple tables" but it doesn't actually explain what is meant by that (at least I can't locate an explanation). It also references using scope, but I can't seem to find anything that references if or when the first column HAS to be defined as a <th>. Logan This e-mail originates from the City of Ottawa e-mail system. Any distribution, use or copying of this e-mail or the information it contains by other than the intended recipient(s) is unauthorized. Thank you. Le présent courriel a été expédié par le système de courriels de la Ville d'Ottawa. Toute distribution, utilisation ou reproduction du courriel ou des renseignements qui s'y trouvent par une personne autre que son destinataire prévu est interdite. Je vous remercie de votre collaboration.

From: Trafford, Logan
Date: Wed, Apr 06 2016 10:47AM
Subject: Re: th scope=row
← Previous message | Next message →

Thanks all.

Birkir provided me the missing piece (about two columns) to what I had previously surmised and written.

From: Chagnon | PubCom
Date: Wed, Apr 06 2016 11:01AM
Subject: Re: th scope=row
← Previous message | Next message →

Birkir wrote: "I approach this more based on content than WCAG criteria.
I ask myself, "do I need to know the value of the leftmost cell in this row (or any cell), in order to fully understand the cell I am looking at)?"

Thanks, Birkir. That's one of the best pieces of advice I've seen about making accessible tables.
The WCAG and PDF/UA standards can't provide that type of experiential guidance. No standards can.

Envision what people with disabilities will need to know so that they can more easily understand the data.

—Bevi Chagnon

From: Birkir R. Gunnarsson
Date: Wed, Apr 06 2016 12:03PM
Subject: Re: th scope=row
← Previous message | Next message →

Technique H63:
https://www.w3.org/TR/WCAG20-TECHS/H63.html
basically states that scope="row" or scope="col" is required on cells
if they are not in the first column/row of a table (see note 1 about
simple data tables).
They re also required when header cells span multiple columns/rows,
but that is a whole other kettle of peskiterrian delights we should
not go into on this thread unless it is relevant.

WCAG Techniques are not normative, but this one fits best with my
experience accessibility testing and it seems logical.
If you designate all cels in the second column as row headers, you
kind of need to use scope="row" to tell assistive technologies that.
Keep in mind that any cell(s) to the left of the row header cells will
not be associated with them, at least a.t. does not communicate that
info.

-B


On 4/6/16, Chagnon | PubCom < = EMAIL ADDRESS REMOVED = > wrote:
> Birkir wrote: "I approach this more based on content than WCAG criteria.
> I ask myself, "do I need to know the value of the leftmost cell in this row
> (or any cell), in order to fully understand the cell I am looking at)?"
>
> Thanks, Birkir. That's one of the best pieces of advice I've seen about
> making accessible tables.
> The WCAG and PDF/UA standards can't provide that type of experiential
> guidance. No standards can.
>
> Envision what people with disabilities will need to know so that they can
> more easily understand the data.
>
> —Bevi Chagnon
>
>
> > > > >


--
Work hard. Have fun. Make history.

From: Trafford, Logan
Date: Wed, Apr 06 2016 12:08PM
Subject: Re: th scope=row
← Previous message | Next message →

Certainly don't need to discuss the "peskiterrian delights" on my account. At least not in relation to my original question.

Thanks,
Logan.

From: Cliff Tyllick
Date: Wed, Apr 06 2016 12:48PM
Subject: Re: th scope=row
← Previous message | Next message →

"Keep in mind that any cell(s) to the left of the row header cells will not be associated with them, at least a.t. does not communicate that info."

In my experience, data cells to the left of the row headers also confuse the hell out of actual humans. That AT can remove some of that confusion for people who use it is great, but the net result is that the usual situation is reversed: The content is now more accessible to people who can't see it.

And think of the poor person who magnifies the screen and uses a screen reader. They'll see Arbitrary Reference Number in column 1 while the screen reader announces the contents of the cell in a column that isn't on their field of view.

Bottom line: Organize tabular data for the reader. Put the information they know in column 1 and the information they're looking for on that item or topic in the columns to the right.

Some time ago I suggested to an engineer (sorry if you're one, but you probably don't fit the stereotype so well as he did) that he reorganize a table of product codes with the name of the product in column 1. That way, I explained, people completing the form could look for the name of their item in column 1 and then look across that row to find the 5-digit code they needed to enter in the form.

"Then all the codes will be out of order," he said.

"How will they find out what the code they just entered means?"

How, indeed.

If there is an exception, you'll probably recognize it when you encounter it.

Cliff Tyllick
Accessibility Coordinator
Texas Department of Aging and Disability Services

Sent from my iPhone
Although its spellcheck often saves me, all goofs in sent messages are its fault.

> On Apr 6, 2016, at 1:03 PM, Birkir R. Gunnarsson < = EMAIL ADDRESS REMOVED = > wrote:
>
> Technique H63:
> https://www.w3.org/TR/WCAG20-TECHS/H63.html
> basically states that scope="row" or scope="col" is required on cells
> if they are not in the first column/row of a table (see note 1 about
> simple data tables).
> They re also required when header cells span multiple columns/rows,
> but that is a whole other kettle of peskiterrian delights we should
> not go into on this thread unless it is relevant.
>
> WCAG Techniques are not normative, but this one fits best with my
> experience accessibility testing and it seems logical.
> If you designate all cels in the second column as row headers, you
> kind of need to use scope="row" to tell assistive technologies that.
> Keep in mind that any cell(s) to the left of the row header cells will
> not be associated with them, at least a.t. does not communicate that
> info.
>
> -B
>
>
>> On 4/6/16, Chagnon | PubCom < = EMAIL ADDRESS REMOVED = > wrote:
>> Birkir wrote: "I approach this more based on content than WCAG criteria.
>> I ask myself, "do I need to know the value of the leftmost cell in this row
>> (or any cell), in order to fully understand the cell I am looking at)?"
>>
>> Thanks, Birkir. That's one of the best pieces of advice I've seen about
>> making accessible tables.
>> The WCAG and PDF/UA standards can't provide that type of experiential
>> guidance. No standards can.
>>
>> Envision what people with disabilities will need to know so that they can
>> more easily understand the data.
>>
>> —Bevi Chagnon
>>
>>
>> >> >> >> >
>
> --
> Work hard. Have fun. Make history.
> > > >

From: _mallory
Date: Wed, Apr 06 2016 2:35PM
Subject: Re: th scope=row
← Previous message | Next message →

I can totally sympathise if the guy was a DBA, you're used to teh ID
being in the first column, lawlz. :P

_mallory

On Wed, Apr 06, 2016 at 01:48:02PM -0500, Cliff Tyllick wrote:
> "Keep in mind that any cell(s) to the left of the row header cells will not be associated with them, at least a.t. does not communicate that info."
>
> In my experience, data cells to the left of the row headers also confuse the hell out of actual humans. That AT can remove some of that confusion for people who use it is great, but the net result is that the usual situation is reversed: The content is now more accessible to people who can't see it.
>
> And think of the poor person who magnifies the screen and uses a screen reader. They'll see Arbitrary Reference Number in column 1 while the screen reader announces the contents of the cell in a column that isn't on their field of view.
>
> Bottom line: Organize tabular data for the reader. Put the information they know in column 1 and the information they're looking for on that item or topic in the columns to the right.
>
> Some time ago I suggested to an engineer (sorry if you're one, but you probably don't fit the stereotype so well as he did) that he reorganize a table of product codes with the name of the product in column 1. That way, I explained, people completing the form could look for the name of their item in column 1 and then look across that row to find the 5-digit code they needed to enter in the form.
>
> "Then all the codes will be out of order," he said.
>
> "How will they find out what the code they just entered means?"
>
> How, indeed.
>
> If there is an exception, you'll probably recognize it when you encounter it.
>
> Cliff Tyllick
> Accessibility Coordinator
> Texas Department of Aging and Disability Services
>
> Sent from my iPhone
> Although its spellcheck often saves me, all goofs in sent messages are its fault.
>
> > On Apr 6, 2016, at 1:03 PM, Birkir R. Gunnarsson < = EMAIL ADDRESS REMOVED = > wrote:
> >
> > Technique H63:
> > https://www.w3.org/TR/WCAG20-TECHS/H63.html
> > basically states that scope="row" or scope="col" is required on cells
> > if they are not in the first column/row of a table (see note 1 about
> > simple data tables).
> > They re also required when header cells span multiple columns/rows,
> > but that is a whole other kettle of peskiterrian delights we should
> > not go into on this thread unless it is relevant.
> >
> > WCAG Techniques are not normative, but this one fits best with my
> > experience accessibility testing and it seems logical.
> > If you designate all cels in the second column as row headers, you
> > kind of need to use scope="row" to tell assistive technologies that.
> > Keep in mind that any cell(s) to the left of the row header cells will
> > not be associated with them, at least a.t. does not communicate that
> > info.
> >
> > -B
> >
> >
> >> On 4/6/16, Chagnon | PubCom < = EMAIL ADDRESS REMOVED = > wrote:
> >> Birkir wrote: "I approach this more based on content than WCAG criteria.
> >> I ask myself, "do I need to know the value of the leftmost cell in this row
> >> (or any cell), in order to fully understand the cell I am looking at)?"
> >>
> >> Thanks, Birkir. That's one of the best pieces of advice I've seen about
> >> making accessible tables.
> >> The WCAG and PDF/UA standards can't provide that type of experiential
> >> guidance. No standards can.
> >>
> >> Envision what people with disabilities will need to know so that they can
> >> more easily understand the data.
> >>
> >> —Bevi Chagnon
> >>
> >>
> >> > >> > >> > >> > >
> >
> > --
> > Work hard. Have fun. Make history.
> > > > > > > > > > > >

From: Jonathan Avila
Date: Thu, Apr 07 2016 6:49AM
Subject: Re: th scope=row
← Previous message | No next message

> basically states that scope="row" or scope="col" is required on cells if they are not in the first column/row of a table

I agree with Birkir and have also cited this technique as reference to why WCAG does not require scope on th elements when they are in the first row or column. I know some experts in the field are failing TH without scope when the TH is in the first column or row.

Also, I would say that not all tables need row headers at all. That is a row header is only needed as when you say that cell labels the other content in the row. If there is no one cell that is proper for acting a header then it would seem then the table doesn't have row headers. Take for example a table with address, city, state, and zip as columns -- no one cell acts as a row header for the others and thus no row header is needed or should be provided.

Jonathan

Jonathan Avila
Chief Accessibility Officer
SSB BART Group
= EMAIL ADDRESS REMOVED =
703.637.8957 (Office)
Visit us online: Website | Twitter | Facebook | Linkedin | Blog
Check out our Digital Accessibility Webinars!