By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,630 Members | 1,427 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,630 IT Pros & Developers. It's quick & easy.

Table header id use

P: n/a
I have questions regarding the use of the "id" attribute in table
headers where there are multiple contiguous tables.
<http://my.vbe.com/~mbrought/test_tables/events.html>

Is it permissible and/or good practice to cite the header id from a
previous table where the header information is the same? More
importantly, will screen readers pick up the proper header information
from the previous table?

The basic format is:

<!-- First Table -->
<table>
<tbody>
<tr>
<th class="c202" id="td1">event</th>
<th class="c203" id="td2" abbr="sponsor">sponsoring org.</th>
<th class="c204" id="td3" abbr="begins">begin date</th>
<th class="c204" id="td4" abbr="ends">end date</th>
<th class="c207" id="td5">location</th>
</tr>

<tr>
<td class="c208" headers="td1">data data data</td>
<td class="c208" headers="td2">data data/td>
<td class="c209" headers="td3">data</td>
<td class="c209" headers="td4">data</td>
<td class="c210" headers="td5">data</td>
</tr>
</tbody></table>

<!-- Second Table -->
<table>
<tbody>
<tr>
<td class="c208" headers="td1">data data data</td>
<td class="c208" headers="td2">data data/td>
<td class="c209" headers="td3">data</td>
<td class="c209" headers="td4">data</td>
<td class="c210" headers="td5">data</td>
</tr>
</tbody></table>

This is still a work in progress. Any other comments are welcome. I
would also appreciate knowing if there are any rendering problems with
various browsers.

--
Matt Broughton
Only relatives are absolute.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Matt Broughton wrote:
I have questions regarding the use of the "id" attribute in table
headers where there are multiple contiguous tables.
<http://my.vbe.com/~mbrought/test_tables/events.html>

Is it permissible and/or good practice to cite the header id from a
previous table where the header information is the same?
Did you read the spec? It's too late for me to look it up, but I
doubt that this is a robust solution. If you make it a large table
instead of 2 small ones, you can simply use the scope attribute for
the th elements.
<!-- First Table -->
<table>
<tbody>
<tr>
<th class="c202" id="td1">event</th>
<th class="c203" id="td2" abbr="sponsor">sponsoring org.</th>
<th class="c204" id="td3" abbr="begins">begin date</th>
<th class="c204" id="td4" abbr="ends">end date</th>
<th class="c207" id="td5">location</th>
</tr>

<tr>
<td class="c208" headers="td1">data data data</td>
<td class="c208" headers="td2">data data/td>
<td class="c209" headers="td3">data</td>
<td class="c209" headers="td4">data</td>
<td class="c210" headers="td5">data</td>
</tr>
</tbody></table>

<!-- Second Table -->
<table>
<tbody>


don't start a second table here.

</tbody>

<tbody>
<!-- etc. -->

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2

P: n/a
In article <AEaGb.27326$VB2.63486@attbi_s51>,
Brian <us*****@julietremblay.com.invalid-remove-this-part> wrote:
Matt Broughton wrote:
I have questions regarding the use of the "id" attribute in table
headers where there are multiple contiguous tables.
<http://my.vbe.com/~mbrought/test_tables/events.html>

Is it permissible and/or good practice to cite the header id from a
previous table where the header information is the same?


Did you read the spec? It's too late for me to look it up, but I
doubt that this is a robust solution. If you make it a large table
instead of 2 small ones, you can simply use the scope attribute for
the th elements.


Doh!! I had read the spec quite a few times before and I missed the
obvious. It clearly states that the id and class attributes are
document wide identifiers. Sometimes a new day and fresh eyes work
wonders.

I also reread the sections on headers and scope. I will change over to
scope. It seems to fit my simple table structure well.

Thank you.

--
Matt Broughton
Only relatives are absolute.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.