WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: do i need to have default submit button for every form?

for

From: Jukka K. Korpela
Date: Jan 2, 2007 2:50AM


On Tue, 2 Jan 2007, Christian Heilmann wrote:

>> Do I need to have a default submit button for every form in the application?
>
> How else would you submit a form without JavaScript or hitting enter
> and only send the first button?

By clicking on some other submit button, I presume. The question seems to
imply the presence of several submit buttons. That's always a problem,
since browser behavior is not well-defined then. The safe way is to have
one submit button only, or (sometimes) several submit buttons with
identical meaning, and to use other controls to make choices _before_
clicking on the button, not _when_ clicking on a button.

But on second thought, it might also use the phrase "a default submit
button" to refer to a button that is created by a browser for an <input
type="submit" ...> element by default. That is, "default" would mean
"common", "normal".

Then my guess is that the question is related to using a form for
_navigation_. In such approaches, it is common to omit the submit button,
because navigation is supposed to take place when selecting an option from
a dropdown list. Of course, that would create a serious obstacle for
browsing without JavaScript. You could, though, use JavaScript to hide the
submit button. But all the problems of using dropdown menus for navigation
- a long list indeed - would remain.

> If you are worried about submit buttons being "ugly", replace them
> with JavaScript:

Alternatively, worry about accessibility and usability, not your own
esthetic dislikes.

But I think that we need a more detailed question. There are dozens of
good answers that could be souped up, but only by accident would any of
them answer the specific question, unless we can see the specific question
(preferably illustrated with a URL).

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/