Table header id use

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt Broughton

    Table header id use

    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">b egin date</th>
    <th class="c204" id="td4" abbr="ends">end date</th>
    <th class="c207" id="td5">locati on</th>
    </tr>

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

    <!-- Second Table -->
    <table>
    <tbody>
    <tr>
    <td class="c208" headers="td1">d ata data data</td>
    <td class="c208" headers="td2">d ata data/td>
    <td class="c209" headers="td3">d ata</td>
    <td class="c209" headers="td4">d ata</td>
    <td class="c210" headers="td5">d ata</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.
  • Brian

    #2
    Re: Table header id use

    Matt Broughton wrote:[color=blue]
    > 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?[/color]

    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.
    [color=blue]
    > <!-- 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">b egin date</th>
    > <th class="c204" id="td4" abbr="ends">end date</th>
    > <th class="c207" id="td5">locati on</th>
    > </tr>
    >
    > <tr>
    > <td class="c208" headers="td1">d ata data data</td>
    > <td class="c208" headers="td2">d ata data/td>
    > <td class="c209" headers="td3">d ata</td>
    > <td class="c209" headers="td4">d ata</td>
    > <td class="c210" headers="td5">d ata</td>
    > </tr>
    > </tbody></table>
    >
    > <!-- Second Table -->
    > <table>
    > <tbody>[/color]

    don't start a second table here.

    </tbody>

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

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

    Comment

    • Matt Broughton

      #3
      Re: Table header id use

      In article <AEaGb.27326$VB 2.63486@attbi_s 51>,
      Brian <usenet2@juliet remblay.com.inv alid-remove-this-part> wrote:
      [color=blue]
      > Matt Broughton wrote:[color=green]
      > > 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?[/color]
      >
      > 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.[/color]

      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.

      Comment

      Working...