WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: RE: Tables for layout

for

Number of posts in this thread: 8 (In chronological order)

From: Jukka Korpela
Date: Wed, Mar 20 2002 5:14AM
Subject: RE: Tables for layout
No previous message | Next message →

Sharon Daniels wrote:

> If you are using a table for layout, are you supposed to have
> a table header at all?

No. As you mentioned, the recommendation tells us _not_ to use e.g. <th> at
all when the table is for layout only.

> Say you just had one table that had 3 cells. One for email
> address, one for name, and one for a submit button. Isn't it
> appropriate to not have a table header on that kind of table?

If the only purpose of a table is layout, then the primary recommendation is
to use style sheets instead; this isn't _yet_ always a realistic policy. The
secondary recommendation is that layout tables should not contain markup
like <th>. The point is that such a table cannot logically contain headers.
On the practical side, <th> markup could confuse software intended to make
data tables accessible to different groups of users or in different
situations. We don't want a program read a layout table as if it were
structural, just because an author used <th> for bolding and centering.

But is your table purely for layout? It seems to group logically related
elements together. On the other hand, it doesn't sound like a complete
table. Shouldn't it rather be something like the following (inside a <form>
element of course):

<table>
<tr><th>Name:</th> <td><input type="name"></td> </tr>
<tr><th>E-mail address:</th> <td><input type="email"></td> </tr>
<tr><td rowspan="2"><input type="submit"></td> </tr>
</table>

In this case, the <th> elements really act as sort-of headers for their
rows. And it really isn't a "layout table", but a data table: it is
logically a matrix. In fact, a logically oriented author would use <th> _in
spite of_ its common visual presentation! (He probably intends to say
something like th { text-align:left; } in his style sheet in an attempt to
make the presentation better.)

There's of course lot of markup that could, and perhaps should, be added.
Maybe
<table summary="The first column contains field names. The second
column contains the input fields themselves. The last row
contains a submit button only."

Or you might consider using an approach that does not use a table. It is not
always _necessary_ to use table markup even if you have some data that can
be regarded as tabular. But it's surely _possible_ and one logical
alternative quite often inside forms. Some more complicated examples:
http://www.cs.tut.fi/~jkorpela/forms/tables.html

--
Jukka Korpela
TIEKE Tietoyhteiskunnan kehitt

From: Sharon Daniels
Date: Wed, Mar 20 2002 6:08AM
Subject: Re: Tables for layout
← Previous message | Next message →

So if you are laying out a form, it is considered a data table?

----- Original Message -----
From: "Jukka Korpela" < = EMAIL ADDRESS REMOVED = >
To: < = EMAIL ADDRESS REMOVED = >
Sent: Wednesday, March 20, 2002 7:14 AM
Subject: RE: Tables for layout


> Sharon Daniels wrote:
>
> > If you are using a table for layout, are you supposed to have
> > a table header at all?
>
> No. As you mentioned, the recommendation tells us _not_ to use e.g. <th>
at
> all when the table is for layout only.
>
> > Say you just had one table that had 3 cells. One for email
> > address, one for name, and one for a submit button. Isn't it
> > appropriate to not have a table header on that kind of table?
>
> If the only purpose of a table is layout, then the primary recommendation
is
> to use style sheets instead; this isn't _yet_ always a realistic policy.
The
> secondary recommendation is that layout tables should not contain markup
> like <th>. The point is that such a table cannot logically contain
headers.
> On the practical side, <th> markup could confuse software intended to make
> data tables accessible to different groups of users or in different
> situations. We don't want a program read a layout table as if it were
> structural, just because an author used <th> for bolding and centering.
>
> But is your table purely for layout? It seems to group logically related
> elements together. On the other hand, it doesn't sound like a complete
> table. Shouldn't it rather be something like the following (inside a
<form>
> element of course):
>
> <table>
> <tr><th>Name:</th> <td><input type="name"></td> </tr>
> <tr><th>E-mail address:</th> <td><input type="email"></td> </tr>
> <tr><td rowspan="2"><input type="submit"></td> </tr>
> </table>
>
> In this case, the <th> elements really act as sort-of headers for their
> rows. And it really isn't a "layout table", but a data table: it is
> logically a matrix. In fact, a logically oriented author would use <th>
_in
> spite of_ its common visual presentation! (He probably intends to say
> something like th { text-align:left; } in his style sheet in an attempt to
> make the presentation better.)
>
> There's of course lot of markup that could, and perhaps should, be added.
> Maybe
> <table summary="The first column contains field names. The second
> column contains the input fields themselves. The last row
> contains a submit button only."
>
> Or you might consider using an approach that does not use a table. It is
not
> always _necessary_ to use table markup even if you have some data that can
> be regarded as tabular. But it's surely _possible_ and one logical
> alternative quite often inside forms. Some more complicated examples:
> http://www.cs.tut.fi/~jkorpela/forms/tables.html
>
> --
> Jukka Korpela
> TIEKE Tietoyhteiskunnan kehitt

From: Carol Foster
Date: Wed, Mar 20 2002 7:48AM
Subject: Label tags and Netscape 4.08
← Previous message | Next message →

Hello,

A consultant who is working with us to design an accessible form just ran into a
problem that he thinks may be an incompatibility with Netscape 4.08 and label
tags -- has anyone run into anything like this? And if so, how was it handled?

Here are more details: NS 4.08 hangs up when accessing the page he designed.
It has valid HTML 4.01 transitional code. When the label tags are taken out, or
when only one set of label tags are left in, the page works. The page is
generated, so the current plan for a workaround is to check for NS 4.0x and to
generate a page without labels for that case. We will also encourage the folks
at the Univ. that are on this project to upgrade from NS 4.08!

Thanks,
Carol

--
Carol Foster, Web Developer
Internet Publishing Group, Information Technology Services
University of Massachusetts, President's Office
phone: (413) 587-2130
fax: (413) 587-2148
mailto: = EMAIL ADDRESS REMOVED =
http://www.umass-its.net/ipg
--



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/

From: Tim Harshbarger
Date: Wed, Mar 20 2002 1:10PM
Subject: RE: Tables for layout
← Previous message | Next message →

Here is a thought. -- all tables used for forms are presentational, not
structural.

You first have to figure out what structural mark-up best describes the
content. In this case, the content is part of a form, not a table. Form
element tags already provide ways for explicitly associating labels with
form elements. So, you really do not need a table in order to mark-up the
structural relationship between labels and fields. However, you might need
a table to help you display visually the relationship between labels and
fields, since the browser's interpretation of the form mark-up may not make
the relationships obvious enough for most users.

SO, if this is right, the answer is the table is only presentational.
However, that presentation will be essential in assisting some of your users
in filling out the form correctly.

Tim

From: Jim Thatcher
Date: Wed, Mar 20 2002 1:15PM
Subject: RE: Tables for layout
← Previous message | Next message →

That is a good question, Sharon. Generally, the answer is no, a table laying
out a form is not a data table.

The issue for data tables is whether or not the row and column of the
entries is carrying information. If it is, then it is a data table. There is
a very simple example of that at
http://jimthatcher.com/webcourse8.htm#webcourse8.6, where the columns are
headed "tax payer" and "spouse" and the rows have headings "w2 gross" and
"dividends." The table entries are just edit fields to input the appropriate
dollar ammounts.

In this case the form elements are in a data table and the headings should
be appropriately coded (TH would be best). The problem with this example is
that assistive technology has a "forms reading mode" and a "table reading
mode" and and they don't mix well. When you are filling out the form you are
likely to be in the forms mode. This is also a situation where the LABEL
element doesn't work because the same text is contributing to more than one
input element. I think that the solution here is to use title attributes on
the input elements and those will be recognized by the major screen readers.

Jim
Check out information on the forthcoming "Constructing Accessible Web Sites"
at http://jimthatcher.com.

From: Tim Harshbarger
Date: Wed, Mar 20 2002 1:16PM
Subject: RE: Tables for layout
← Previous message | Next message →

That is one of the drawbacks of using the LABEL tag. -- its not particularly
helpful in cases where either you need to associate multiple labels with a
single field or a single label with multiple fields. In the first case,
there isn't a way to do it. In the second case, the user has no good way of
knowing which field (sharing the same label) he or she is in.

I know I have used Jim's suggestion of implementing the TITLE attribute. I
had one situation where some developers were trying to create a specialized
calculator that would allow the user to set up multiple scenarios. For
instance, the whole first row was labelled "amount," but each column was
given a label like "Option A," "Option B," etc. Whether or not the user has
a disability, he or she needs to know that the first field is asking
specifically for the amount for Option A. The LABEL tag does not allow for
that. Instead, we incorporated a TITLE attribute something along the lines
of "Option A Amount."

Tim

From: Anitra Pavka
Date: Wed, Mar 20 2002 9:16AM
Subject: Re: Label tags and Netscape 4.08
← Previous message | Next message →

Carol Foster wrote:

> A consultant who is working with us to design an accessible form just ran into a
> problem that he thinks may be an incompatibility with Netscape 4.08 and label
> tags -- has anyone run into anything like this?

I have created many forms that had label tags and haven't had any problems when
tested in NS 4.08 on Windows 98 and 2000.

> Here are more details: NS 4.08 hangs up when accessing the page he designed.
> It has valid HTML 4.01 transitional code. When the label tags are taken out, or
> when only one set of label tags are left in, the page works.

Sadly, even valid code can cause problems in NS 4.08. For example, it may crash
if you use span tags inside of a paragraph tag. (This is a good way to add in CSS
classes.) It's valid code, but crashes this version of Netscape .
Is the page available online? We might be able to help more if we can take a
look at the source code.


-- Anitra Pavka
Web Designer & Accessibility Advocate
Accessibility Weblog-> http://www.anitrapavka.com



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/

From: jebs webs
Date: Thu, Mar 21 2002 11:52AM
Subject: Installation Directions
← Previous message | No next message

I have a somewhat philosophical question for the group...

Suppose one is writing a set of directions for some procedure, say
downloading and installing a piece of software.

To meet the accessibility standards, are they required to provide a version
that would include several versions, that is installation using a mouse and
installation using keystrokes???

All comments and thoughts welcome.

John E. Brandt
Augusta, ME 04330

= EMAIL ADDRESS REMOVED =
home.earthlink.net/~jbrandt04330






----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/