Click to See Complete Forum and Search --> : accessible tables in a form


phiddchin
10-14-2004, 07:03 AM
I'm trying to redesign my website based on a css layout because i've been advised that it's the best way forward to get rid of tables for accessibilty issues.

Anyways I've recently been told by someone that it's OK to use a table in a form in a css layout base website.

Is this true?

DaveSW
10-14-2004, 08:29 AM
You can do it either way. CSS is my preferred way to do it.

This link provides a useful reference for accessible forms in Tables:
http://www.webaim.org/techniques/forms/

If you prefer CSS: Check out the accessible form builder at http://www.accessify.com/tools-and-wizards/accessible-form-builder.asp?type=css for some ideas on the css.

Edit: another good link: http://www.seotoolbox.com/html-issues/forms.html

Tim158
10-14-2004, 08:38 AM
That depends on how accessible you want your website.

Accessible websites can contain some tables as long as they are marked up correctly.

You can use <caption> to give your table / form a title and <th> to give headings to your table columns like field name, field value.

The W3C don't seem to use tables in forms. You can also use the <label> element.

David Harrison
10-14-2004, 09:09 AM
Tables should be used for tabular data only. Therefore unless you have tabular data, don't use a table. A typical form might look like this:<form action="nextpage.asp" method="post">

<fieldset>
<legend>Fieldset Title</legend>

<label for="firstFieldID">Name:</label>
<input type="text" name="firstFieldName" id="firstFieldID">

<label for="secondFieldID">Favourite Colour:</label>
<input type="text" name="secondFieldName" id="secondFieldID">

</fieldset>

</form>If you have a lot of form fields in a list, then you might also like to think about using either an unordered (or ordered) list to mark them up. A little like I've done here (http://www.fsg-uk.com/rjsystems/help.php).

Robert Wellock
10-15-2004, 07:17 AM
I suppose that's an interesting way of doing the layout with a list though if actually it makes any more sense is debatable since it will read list x items; item 1, label, input, list item 2, label input, etc. Whereas each item is its own island in reality.

David Harrison
10-15-2004, 09:28 AM
It is a form with a list of inputs no?

Would you prefer <div> tags?

Robert Wellock
10-18-2004, 01:40 PM
It's probably not unfortunately but it has been that long ago that I've used JAWS. I can follow your logic but you have to think to checkboxes and beyond each label is still an island. Probally a failing of HTML.