W3C home > Mailing lists > Public > public-html@w3.org > May 2007

HTML forms

From: Schalk Neethling <schalk@alliedbridge.com>
Date: Thu, 03 May 2007 00:06:28 +0200
Message-ID: <46390B64.7070000@alliedbridge.com>
To: public-html@w3.org

Greetings everyone,

I have noticed a lot of discussion about the different form 
implementations that are being proposed and I am sure they all have 
their merit and place however, after discussing some of the aspects of 
coding forms in HTML with a colleague I can surely all agree that this 
is one of the areas we all love to to hate. The ways we currently have 
to go about making forms look functional an usable is just not the way 
we want it to be.

We have to do all kinds of hacks and none of these are semantic 
solutions to get forms to display the way we want them to. I here 
propose a simple solution. The majority of users actually prefer having 
forms laid out as follows:

name:
[  form element ]
surname:
[ form element]

This makes connecting the label to the appropriate field very easy on 
the eye as well as a host of other benefits like being able to add 
validation errors to the <label> tag without affecting layout(in general):
name:
[ name]
surname: !you must provide a surname!
[ form element ]

So what do I propose? Make the <label> and form element tags block level 
elements so that form elements by default break to the next line instead 
of having to use the current hacks or using the <br /> tag to break to 
the next line.

I believe this will make default form layout a lot more effective and 
semantic while still allowing alternate layout of forms using CSS.

Look forward to your feedback.

-- 
Kind Regards
Schalk Neethling
CO-President
The South African Web Standards and Accessibility Group
Received on Wednesday, 2 May 2007 22:06:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:58 GMT