Accessible Layered Table
Question posted by: NickName
(Guest)
on
August 25th, 2006 06:05 PM
"Accessible" means accessible by visually impaired persons.
Be "Layered table", I mean something like the following:
<table>
<tr>
<th></th>
<th id=n>Name</th>
<th id=a>Address</th>
<th id=p>Phone</th>
</tr>
<tr>
<th colspan="4" scope="rowgroup" id=nt>North</th>
</tr>
<tr>
<td></td>
<td headers="n 1 nt">Joe Dane</td>
<td>123 St</td>
<td>123-456-7890</td>
</tr>
<tr>
<th colspan="4" scope="rowgroup" id=st>South</th>
</tr>
<tr>
<td></td>
<td headers="n 1 st">Mary Jones</td>
<td>456 St</td>
<td>222-456-7890</td>
</tr>
</table>
Yes, it would work, however, I find it very clumsy in the sense that it
so time consuing adding headers attribute to each row. Do you have a
better way? tia.
9
Answers Posted
The posted TABLE may have a bug, I've edited it as follows:
<table border="1">
<tr>
<th></th>
<th id=n>Name</th>
<th id=a>Address</th>
<th id=p>Phone</th>
</tr>
<tr>
<th scope="rowgroup" id=nt abbr="left">North</th>
<td colspan="3"></td>
</tr>
<tr>
<td></td>
<td headers="n 1 nt">Joe Dane</td>
<td>123 St</td>
<td>123-456-7890</td>
</tr>
<tr>
<th scope="rowgroup" id=st>South</th>
<td colspan="3"></td>
</tr>
<tr>
<td></td>
<td headers="n 1 st">Mary Jones</td>
<td>456 St</td>
<td>222-456-7890</td>
</tr>
</table>
NickName wrote:
Quote:
Originally Posted by
"Accessible" means accessible by visually impaired persons.
Be "Layered table", I mean something like the following:
>
<table>
<tr>
<th></th>
<th id=n>Name</th>
<th id=a>Address</th>
<th id=p>Phone</th>
</tr>
>
<tr>
<th colspan="4" scope="rowgroup" id=nt>North</th>
</tr>
<tr>
<td></td>
<td headers="n 1 nt">Joe Dane</td>
<td>123 St</td>
<td>123-456-7890</td>
</tr>
>
<tr>
<th colspan="4" scope="rowgroup" id=st>South</th>
</tr>
<tr>
<td></td>
<td headers="n 1 st">Mary Jones</td>
<td>456 St</td>
<td>222-456-7890</td>
</tr>
>
</table>
>
Yes, it would work, however, I find it very clumsy in the sense that it
so time consuing adding headers attribute to each row. Do you have a
better way? tia.
"NickName" <dadada@rock.comwrites:
Quote:
Originally Posted by
The posted TABLE may have a bug, I've edited it as follows:
Still does have a few, I think. Why not just put the row header on the
same line as the row? You've also got some slightly odd values for the
header attributes and abbr.
<tr>
<th scope="row" id="nt">North</th>
<td headers="n nt">Joe Dane</td>
<td headers="a nt">123 St</td>
<td headers="p nt">123-456-7890</td>
</tr>
Quote:
Originally Posted by
Yes, it would work, however, I find it very clumsy in the sense that it
so time consuing adding headers attribute to each row. Do you have a
better way? tia.
Better way? Generate the table using a script that reads the data from
a data file or database table. You can do this either by preprocessing
or with server-side scripting, depending on how often the data in the
table is likely to change and what you have available.
--
Chris
"Why not just put the row header on the
same line as the row? "
Do you mean something like this:
<tr headers="n 1 nt">
<td></td>
<td>Joe Dane</td>
....
instead of my previous
<tr>
<td></td>
<td headers="n 1 nt">Joe Dane</td>
....
That won't work (as far as JAWS is concerned in idenfifying both the
Column header and Row header.
On the data file and db table, interestingly enough, I did that for the
basics, that is,
adding <tr><td... </td></tretc. html tag in my sql output, and got
the basic HTML file from that. Obviously, I'm not the only one doing
that, however, I did not go further, let's see ...
Chris Morris wrote:
Quote:
Originally Posted by
"NickName" <dadada@rock.comwrites:
Quote:
Originally Posted by
The posted TABLE may have a bug, I've edited it as follows:
>
Still does have a few, I think. Why not just put the row header on the
same line as the row? You've also got some slightly odd values for the
header attributes and abbr.
>
<tr>
<th scope="row" id="nt">North</th>
<td headers="n nt">Joe Dane</td>
<td headers="a nt">123 St</td>
<td headers="p nt">123-456-7890</td>
</tr>
>
Quote:
Originally Posted by
Yes, it would work, however, I find it very clumsy in the sense that it
so time consuing adding headers attribute to each row. Do you have a
better way? tia.
>
Better way? Generate the table using a script that reads the data from
a data file or database table. You can do this either by preprocessing
or with server-side scripting, depending on how often the data in the
table is likely to change and what you have available.
>
--
Chris
NickName wrote:
Quote:
Originally Posted by
"Accessible" means accessible by visually impaired persons.
Be "Layered table", I mean something like the following:
>
<table>
<tr>
<th></th>
<th id=n>Name</th>
<th id=a>Address</th>
<th id=p>Phone</th>
</tr>
>
<tr>
<th colspan="4" scope="rowgroup" id=nt>North</th>
</tr>
<tr>
<td></td>
<td headers="n 1 nt">Joe Dane</td>
<td>123 St</td>
<td>123-456-7890</td>
</tr>
>
<tr>
<th colspan="4" scope="rowgroup" id=st>South</th>
</tr>
<tr>
<td></td>
<td headers="n 1 st">Mary Jones</td>
<td>456 St</td>
<td>222-456-7890</td>
</tr>
>
</table>
What's the empty column on the left for?
Quote:
Originally Posted by
>
Yes, it would work, however, I find it very clumsy in the sense that it
so time consuing adding headers attribute to each row. Do you have a
better way? tia.
I'd suggest just not doing it this way. Stick the North and South on the
same row as the related data, in the left column. Even from the
sighted person's perspective, I don't see the benefit from arranging the
data this way.
NickName wrote:
Quote:
Originally Posted by
The posted TABLE may have a bug, I've edited it as follows:
>
Which doesn't change my suggestion: put the North and South on the same
row as the data.
Harlan Messinger wrote:
Quote:
Originally Posted by
NickName wrote:
Quote:
Originally Posted by
>The posted TABLE may have a bug, I've edited it as follows:
>
Which doesn't change my suggestion: put the North and South on the
same row as the data.
Or use a (in this sample) a three-column table with a colspan=3 for
North and South, and eliminate the left column. This may give a cleaner
appearance, imo.
--
-bts
-Motorcycles defy gravity; cars just suck.
Beauregard T. Shagnasty wrote:
Quote:
Originally Posted by
Harlan Messinger wrote:
>
Quote:
Originally Posted by
>NickName wrote:
Quote:
Originally Posted by
>>The posted TABLE may have a bug, I've edited it as follows:
>Which doesn't change my suggestion: put the North and South on the
>same row as the data.
>
Or use a (in this sample) a three-column table with a colspan=3 for
North and South, and eliminate the left column. This may give a cleaner
appearance, imo.
>
That gives the same arrangement as in the original message, minus the
empty left column, and leaves the nuisance of having to name the headers
explicitly.
Harlan Messinger wrote:
Quote:
Originally Posted by
Beauregard T. Shagnasty wrote:
Quote:
Originally Posted by
>Harlan Messinger wrote:
>>
Quote:
Originally Posted by
>>NickName wrote:
>>>The posted TABLE may have a bug, I've edited it as follows:
>>>
>>Which doesn't change my suggestion: put the North and South on the
>>same row as the data.
>>
>Or use a (in this sample) a three-column table with a colspan=3 for
>North and South, and eliminate the left column. This may give a
>cleaner appearance, imo.
>>
That gives the same arrangement as in the original message, minus the
empty left column, and leaves the nuisance of having to name the
headers explicitly.
I didn't say it was perfect. <g But as was mentioned, a script is the
best way to generate this type of page.
--
-bts
-Motorcycles defy gravity; cars just suck.
"a script is the
best way to generate this type of page.
"
Agree. That's the approach I took, at least, mostly automated for the
task.
As for putting "NORTH" and "SOUTH" on the same row, no, business
rule(BR) can't allow that, under NORTH, there are multiple rows and
same for SOUTH, and BR also dictates to keep this format.
Thanks for your inputs, all.
Beauregard T. Shagnasty wrote:
Quote:
Originally Posted by
Harlan Messinger wrote:
>
Quote:
Originally Posted by
Beauregard T. Shagnasty wrote:
Quote:
Originally Posted by
Harlan Messinger wrote:
>
>NickName wrote:
>>The posted TABLE may have a bug, I've edited it as follows:
>>
>Which doesn't change my suggestion: put the North and South on the
>same row as the data.
>
Or use a (in this sample) a three-column table with a colspan=3 for
North and South, and eliminate the left column. This may give a
cleaner appearance, imo.
>
That gives the same arrangement as in the original message, minus the
empty left column, and leaves the nuisance of having to name the
headers explicitly.
>
I didn't say it was perfect. <g But as was mentioned, a script is the
best way to generate this type of page.
>
--
-bts
-Motorcycles defy gravity; cars just suck.
|
|
|
What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 197,013 network members.
Top Community Contributors
|