- From: Kornel Lesiński <kornel@geekhood.net>
- Date: Sun, 28 Mar 2010 13:41:30 +0100
- To: public-html@w3.org
As far as I'm aware there are no solid use-cases for reset buttons. I have never seen them used correctly. I encounter improper uses of these elements regularly. They are poorly implemented in browsers and their functionality is very limited. There are good, simple alternatives for them. Therefore, I propose to make <input type=reset> and <button type=reset> non-conforming. It might also be worthwhile to let browsers hide such buttons (as if they had display:none). Most often cited case for reset is that there might be a form that needs to be filled in many times with completely different data by the same user (without page refresh, and without need for JavaScript support). This is extremely rare. It only really matters when server responds to the submission with HTTP status 204, however that is often undesireable, as this doesn't allow to indicate submission result to the user. In typical scenarios forms cause page to be reloaded from the server, and server may simply send a new, empty form to the user if that is needed. Authors could also use JavaScript – which gives better control over what is reset and to what state – and <a href=""> or another submit button as JS-less alternative. Users willing to clear form usually can refresh the page or navigate away and back to it. When server-side validation error occurs, it's considered good practice to pre-fill form with values that user has already typed. In such case <input type=reset> will not reset form to its real initial state, only to intermediate state after reload, which doesn't suit aforementioned use case, and at best is a very poor form of undo without redo (and unnecessary, because browser's undo function could do the same, but better). Reset is not well implemented: browsers don't allow users to undo reset action, and don't ask for confirmation. Unless page author adds such functionality (and I've never seen it done), reset clears entered data immediately and irreversibly. This serious implementation flaw coupled with page authors putting reset in wrong place (next to submit, rather than as first element in the form[1]) and in forms where reset is absolutely not needed, lowers usability of forms and causes data loss[2]. [1] http://www.cs.tut.fi/~jkorpela/forms/imagereset.html [2] "Reset / Cancel Button Considered Harmful" http://www.useit.com/alertbox/20000416.html -- regards, Kornel Lesiński
Received on Sunday, 28 March 2010 12:42:16 UTC