Re: th scope attribute
- From: "Jukka K. Korpela" <jkorpela@xxxxxxxxx>
- Date: Fri, 30 May 2008 13:25:57 +0300
Scripsit JD:
Is the <th> scope attribute needed for simple tables?
No, but it doesn't hurt, and it may be useful for markup documentation: anyone (like you some years later) reading the HTML source alone, even without understanding the natural language in it, will immediately see that the cell is a header for a column or for a row.
For example,
will the following be clear for a wide range of visitors?
<table>
<tr><th>Make</th><th>Year</th></tr>
<tr><td>Ford </td><td>1987</td></tr>
<tr><td>Audi </td><td>2000</td></tr>
</table>
Or should I do:
<table>
<tr><th scope="col">Make</th><th scope="col">Year</th></tr>
<tr><td>Ford </td><td>1987</td></tr>
<tr><td>Audi </td><td>2000</td></tr>
</table>
Adding the scope attribute isn't very important in a case like this, but it is good practice.
It is more important to consider the accessibility of the table as a whole. How does it relate to text? What does it really mean? A person using a speech browser will be in a more difficult situation, since he does not see the table as a whole or its visual association with anything.
Using <caption>, or maybe explanatory text before the table, or even both is generally useful for a data table. If you think that the meaning and purpose is self-evident from merely looking at the table, then you might consider using the summary="..." attribute to explain them to a user who cannot look at the table.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
.
- References:
- th scope attribute
- From: JD
- th scope attribute
- Prev by Date: Re: th scope attribute
- Next by Date: Re: th scope attribute
- Previous by thread: Re: th scope attribute
- Next by thread: Re: th scope attribute
- Index(es):
Relevant Pages
|
Loading