Re: Accessibility in XHTML 2.0 Draft - Tables

Seth,
  Firstly, see the tables module for the content models [1], then read on.

Seth Honeycutt wrote:

><td>
>	<section>
>	<p></p>
>	</section>
></td>
>
This is valid, but maybe unnecessary, since a table is for structuring 
tables of data,  not whole documents and sections.  <td> can hold any 
Heading, Block or Inline element (see "Flow"[2])

>If you would like to include things like the cell border, cell padding,
>or other table properties when that section is displayed by itself you
>would include the table data element within the <section>, like this:
>
><section>
><td>
>	<p></p>
></td>
></section>
>
<tr> can only hold <th> or <td>, not <section>

>If you would like to include an entire row of cells in a <section> you
>could do something like this:
>
><section>
><tr>
>	<td>
>	</td>
>	<td>
>	</td>
></tr>
></section>
>
This is what <thead>, <tfoot> and <tbody> are for!  <tbody> can be 
repeated as many times as you need for each different section.
<table>
    <thead></thead>
    <tfoot></tfoot>
    <tbody></tbody>
    <tbody></tbody>
    <!-- More if needed -->
</table>

>If you want to include only a few cells of a row you might do something
>like this:
>
><tr>
><section>
>	<td>
>	</td>
>	<td>
>	</td>
></section>
>	<td>
>	</td>
></tr>
>
>Including a column of cells in a section would be a little bit trickier
>since the code for those vertical cells are spaced out between rows
>(even though when they are displayed on the screen they are right next
>to each other but just vertically instead of horizontally like a row). 
>  
>
See <col/> and <colgroup>, or try nested tables.

>Perhaps you could just use the same value in the 'id' attribute for any
>one <section> that is partially defined in more than one part of the
>code.
>
<snip/>

>For instance, maybe something like this could work:
>
><table>
><tbody>
><tr>
><section id="sameid">
>	<td>
>	</td>
></section>
>	<td>
>	</td>
></tr>
><tr>
><section id="sameid">
>	<td>
>	</td>
></section>
>	<td>
>	</td>
></tr>
></tbody>
></table>
>
The id of an element must be unique within a document.[3] therefore, 
this is not possible.

[1] http://www.w3.org/TR/xhtml2/mod-tables.html#s_tablesmodule
[2] http://www.w3.org/TR/xhtml2/mod-block-text.html#s_block-textmodule
[3] http://www.w3.org/TR/xhtml2/mod-attribute-collections.html#col_Core

Received on Monday, 3 November 2003 09:35:02 UTC