[thelist] Accessibility and Proper Tabular Data Markup or Overkill?
Jono
ox4dboy at comcast.net
Fri Jan 21 10:28:48 CST 2005
Thanks for the link Chris. My reasoning for using the id/headers
pairing is for the added flexibility it allows for styling. I forgot
to remove the align="right" and <b></b> before positing. It looks like
some of the examples on the page in that link use the scope attribute
in addition to id.
So doing this would be just as well...
<table summary="This table...">
<tr>
<th scope="row">Name</th>
<td>Mr. So Andso</td>
</tr>
<tr>...</tr>
<tr>...</tr>
</table>
...as this:
<table summary="This table...">
<tr>
<th scope="row" id="name">Name</th>
<td>Mr. So Andso</td>
</tr>
<tr>...</tr>
<tr>...</tr>
</table>
Being that this information is so simple, and borderline tabular ( I'm
not sure it is really ) I am wondering if I should use a styled
definition list instead?
Like so:
<dl>
<dt>Name:</dt>
<dd>Mr. So Andso</dd>
<dt>Office:</dt>
<dd>Office name here</dd>
<dt>Phone:</dt>
<dd>555.555.5785</dd>
</dl>
What do you think; is this any more right or wrong than using a table,
as in the examples above? One problem I see is that it is going to be
more difficult to get the information to display in a table-like
fashion, which leads me to believe that a table is still best in this
situation?
Maybe I cold do this:
<dl>
<dt>Name:</dt>
<dd>Mr. So Andso</dd>
</dl>
<dl>
<dt>Office:</dt>
<dd>Office name here</dd>
</dl>
And then position the <dt>s & <dl>s with { position: absolute } to each
<dl> which would be set to { position: relative }? This seems like a
lot of trouble. Just thinking out loud, and still undecided. For now
it looks like the table approach is the way to go. Time is certainly
of concern... as always.
On Jan 20, 2005, at 6:13 PM, Christian Heilmann wrote:
>> <table summary="This table...">
>> <tr>
>> <th id="name" align="right"><b>Name</b></th>
>> <td headers="name" >Mr. So Andso</td>
>> </tr>
>> <tr>...</.tr>
>> <tr>...</tr>
>> </table>
>>
>> Since tabular data is read, in rows - from left to right by default,
>> and since there are only two columns of data, is the above example
>> correct, overkill, or just plain wrong? I'm trying to get the hang
>> of accessible tables, so any quick help or tips is appreciated.
>
>
> Well, you can use the scope attribute instead of id/headers pairs,
> that'll make things a lot easier.
> Also, don't add visual attributes like align and b to the TH, simply
> set it in the CSS
>
> TH {text-align:right;} (browsers adds bold text by default)
>
> More info on the correct markup and how to style it.
> http://www.icant.co.uk/forreview/tables/*
>
> HTH
> Chris
More information about the thelist
mailing list