E-mail List Archives
Thread: Form submission via enter key?
Number of posts in this thread: 13 (In chronological order)
From: Nathalie Sequeira
Date: Tue, Nov 05 2013 12:21AM
Subject: Form submission via enter key?
No previous message | Next message →
Hello,
I have been requested by a client to make a complex form submittable via
the enter key.
The form contains a text input as well as checkboxes which, when
focussed, do allow this behaviour.
The form however also contains dropdowns which when focused do not allow
this behaviour.
Also, when there are search results on the page, there is a second form
that allows selecting titles for ordering.
Here's a link to the page so you can see at a glance what I'm talking
about: http://www.volkslied.at/lieder/noten-TVM/suche.php
I have been reading around on the web and am a bit on the fence as to
the desirability of this "enter key feature" in general.
While in a simple search form that has only one text input I feel the
enter-key submission is OK,
I have actually begun considering disabling enter-key submittability
alltogether via Javascript for the complex form, so behaviour is
consistent throughout the form. And yes, this actually touches more on
usability (whereby bad usability does also influence effective
accessibility IMHO).
Are there other accessibility-related issues to be taken into account in
a scenario where a complex form can be submitted via enter key (esp.
keyboard navigation or screen reader key functions)?
Thank you for any thoughts on this!!
Nathalie
From: Detlev Fischer
Date: Tue, Nov 05 2013 12:46AM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
Hello Natalie
I think submission via the enter key should only work once the "passende Stücke finden" input is focused (that focus indication itself could be stronger, and it might also help if the input looks more like a submit button, but that is a minor point). I don't think many users would want to dispatch the search in other ways - or if they do, there is at least a trade-off in that other users who press enter accidentally would lose the page and get results they did not knowingly specify.
Best, Detlev
--
Detlev Fischer
testkreis c/o feld.wald.wiese
Thedestr. 2, 22767 Hamburg
Mobil +49 (0)1577 170 73 84
Tel +49 (0)40 439 10 68-3
Fax +49 (0)40 439 10 68-5
http://www.testkreis.de
Beratung, Tests und Schulungen für barrierefreie Websites
Nathalie Sequeira schrieb am 05.11.2013:
> Hello,
>
> I have been requested by a client to make a complex form submittable via
> the enter key.
>
> The form contains a text input as well as checkboxes which, when
> focussed, do allow this behaviour.
> The form however also contains dropdowns which when focused do not allow
> this behaviour.
> Also, when there are search results on the page, there is a second form
> that allows selecting titles for ordering.
> Here's a link to the page so you can see at a glance what I'm
> talking
> about: http://www.volkslied.at/lieder/noten-TVM/suche.php
>
> I have been reading around on the web and am a bit on the fence as to
> the desirability of this "enter key feature" in general.
>
> While in a simple search form that has only one text input I feel the
> enter-key submission is OK,
> I have actually begun considering disabling enter-key submittability
> alltogether via Javascript for the complex form, so behaviour is
> consistent throughout the form. And yes, this actually touches more on
> usability (whereby bad usability does also influence effective
> accessibility IMHO).
>
> Are there other accessibility-related issues to be taken into account in
> a scenario where a complex form can be submitted via enter key (esp.
> keyboard navigation or screen reader key functions)?
>
> Thank you for any thoughts on this!!
> Nathalie
>
> > > >
From: Patrick H. Lauke
Date: Tue, Nov 05 2013 1:35AM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
On 05/11/2013 07:46, Detlev Fischer wrote:
> I think submission via the enter key should only work once the "passende Stücke finden" input is focused (that focus indication itself could be stronger, and it might also help if the input looks more like a submit button, but that is a minor point). I don't think many users would want to dispatch the search in other ways - or if they do, there is at least a trade-off in that other users who press enter accidentally would lose the page and get results they did not knowingly specify.
Yup. In short: don't change the default behavior that users have come to
learn/expect. It will only result in user frustration, confusion, and
unintentional submissions.
P
--
Patrick H. Lauke
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com | http://flickr.com/photos/redux/
twitter: @patrick_h_lauke | skype: patrick_h_lauke
From: Birkir R. Gunnarsson
Date: Tue, Nov 05 2013 4:51PM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
Agreed.
I think inadvertent submitions of forms in incomplete or missing
information because of an accidental enter key press far outweigh the
possible benefits of saving yourself approximately one tabkey press.
Jaws users, for instance, can use enter to get in and out of forms
mode, well into forms mode for forms field actually.
One could easily get into a situation where user does not have focus
on the input field, presses enter, and submits the input, having to
start again from scratch.
I think overriding default user expectation is a bad thing on the web,
and bad for accessibility. I like my webpages to be predictable.
If parts of the form are optional and the client is hellbent on
minimial keyboard interaction, you might be able to plac a submit
button after the mandatory parts of the form, leaving the optional
fields later in the focus order (that is not always good reading
order, but if it makes sense in your context that's fine).
Cheers
-Birkir
On 11/5/13, Patrick H. Lauke < = EMAIL ADDRESS REMOVED = > wrote:
> On 05/11/2013 07:46, Detlev Fischer wrote:
>> I think submission via the enter key should only work once the "passende
>> Stücke finden" input is focused (that focus indication itself could be
>> stronger, and it might also help if the input looks more like a submit
>> button, but that is a minor point). I don't think many users would want to
>> dispatch the search in other ways - or if they do, there is at least a
>> trade-off in that other users who press enter accidentally would lose the
>> page and get results they did not knowingly specify.
>
> Yup. In short: don't change the default behavior that users have come to
> learn/expect. It will only result in user frustration, confusion, and
> unintentional submissions.
>
> P
> --
> Patrick H. Lauke
> > re·dux (adj.): brought back; returned. used postpositively
> [latin : re-, re- + dux, leader; see duke.]
>
> www.splintered.co.uk | www.photographia.co.uk
> http://redux.deviantart.com | http://flickr.com/photos/redux/
> > twitter: @patrick_h_lauke | skype: patrick_h_lauke
> > > > >
From: Nathalie Sequeira
Date: Tue, Nov 05 2013 11:12PM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
Thank you all very much for your feedback!
I am quite reassured now that submission via enter key needs to be
disabled altogether in this case, even where default HTML behaviour
would allow it.
Then, the form can only be submitted via the submit button (the exact
opposite of what the client wants - haha, it's going to be fun selling
that to them ;D ).
I am also thinking of collapsing the fieldset with instrument checkboxes
by default (which will also help declutter the form), so one needn't tab
through all those options to get to the submit button.
Thanks also Detlev for the heads up regarding button states, I will look
into that too.
Cheers!
Nathalie
From: Patrick H. Lauke
Date: Wed, Nov 06 2013 5:09AM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
On 06/11/2013 06:12, Nathalie Sequeira wrote:
> I am quite reassured now that submission via enter key needs to be
> disabled altogether in this case, even where default HTML behaviour
> would allow it.
> Then, the form can only be submitted via the submit button (the exact
> opposite of what the client wants - haha, it's going to be fun selling
> that to them ;D ).
I don't believe that's what we said though? I thought the short version
of our various responses was: leave enter key behavior alone, let
browsers do what they do by default, as that's what users expect?
P
--
Patrick H. Lauke
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com | http://flickr.com/photos/redux/
twitter: @patrick_h_lauke | skype: patrick_h_lauke
From: Paul J. Adam
Date: Wed, Nov 06 2013 7:40AM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
The default behavior is to use the ENTER key when focused inside any of the form inputs, this fires the onSubmit event. No reason to change that. What you should not be doing, and a bug Ive seen before, is allowing an ENTER key event to submit the form when they are NOT focused inside an input.
So ENTER should only work to Submit the form when focused inside one of the forms inputs.
Paul J. Adam
Accessibility Evangelist
www.deque.com
On Nov 6, 2013, at 12:12 AM, Nathalie Sequeira < = EMAIL ADDRESS REMOVED = > wrote:
> Thank you all very much for your feedback!
>
> I am quite reassured now that submission via enter key needs to be
> disabled altogether in this case, even where default HTML behaviour
> would allow it.
> Then, the form can only be submitted via the submit button (the exact
> opposite of what the client wants - haha, it's going to be fun selling
> that to them ;D ).
>
> I am also thinking of collapsing the fieldset with instrument checkboxes
> by default (which will also help declutter the form), so one needn't tab
> through all those options to get to the submit button.
>
> Thanks also Detlev for the heads up regarding button states, I will look
> into that too.
>
> Cheers!
> Nathalie
>
> > >
From: Corbett, James
Date: Wed, Nov 06 2013 7:45AM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
Hi:
Would you really want that to happen? If you had ten edit fields and you allowed the enter key to evoke a submission on the first field, there would be obvious issues. I realize that client side and or server side validation would or could intercept such behaviour but it would be a poor design from the word go....
Jim
From: Paul J. Adam
Date: Wed, Nov 06 2013 7:52AM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
If thats the standard behavior of web forms then why break the norm? And yes like you said when I do my form validation if they press enter key on the first input it would then send their focus to the first invalid input and read the error message automatically. So they could keep pressing ENTER all they want until every field is filled out correctly. Validation should handle any cases of the user accidentally pressing the enter key too soon.
On Nov 6, 2013, at 8:45 AM, Corbett, James < = EMAIL ADDRESS REMOVED = > wrote:
> Hi:
>
> Would you really want that to happen? If you had ten edit fields and you allowed the enter key to evoke a submission on the first field, there would be obvious issues. I realize that client side and or server side validation would or could intercept such behaviour but it would be a poor design from the word go....
>
> Jim
>
>
From: Nathalie Sequeira
Date: Wed, Nov 06 2013 9:54AM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
Well Paul, I could agree on this for a form that has required fields
that will be checked for completeness, or for a simple search box.
However, in my specific case we are talking of a more complex search
form that
a) has no required fields at all, so there will be no validation in the
way you mean (in fact, if you just send the empty form you will get a
complete list of all entries listed up by category hierarchy).
and
b) has text and checkbox inputs -which when focussed will submit the
form by default- AND selects -which won't do this by default.
So either way I had an inconsistency of the form's behaviour going on
there:
depending on where you were in the form, it would submit itself when
hitting enter -- or not.
And it irritated my client, leading them to suggest something I wasn't
comfortable at all with (i.e. submit via enter anytime).
The longer I think on it, the more I lean towards the view that indeed
default behaviour doesn't necessarily always equal expected behaviour,
let alone desirable behaviour.
There's a submit button, so why not use it, after having selected all
desired search criteria in an orderly manner?
Please show me where I am wrong if that is the case!
It is precisely for that reason that I posed this question to the list :)
Cheers,
Nathalie
Am 06.11.2013 15:52, schrieb Paul J. Adam:
> If that's the standard behavior of web forms then why break the norm? And yes like you said when I do my form validation if they press enter key on the first input it would then send their focus to the first invalid input and read the error message automatically. So they could keep pressing ENTER all they want until every field is filled out correctly. Validation should handle any cases of the user accidentally pressing the enter key too soon.
>
> On Nov 6, 2013, at 8:45 AM, Corbett, James < = EMAIL ADDRESS REMOVED = > wrote:
>
>> Hi:
>>
>> Would you really want that to happen? If you had ten edit fields and you allowed the enter key to evoke a submission on the first field, there would be obvious issues. I realize that client side and or server side validation would or could intercept such behaviour but it would be a poor design from the word go....
>>
>> Jim
>>
>>
From: Nathalie Sequeira
Date: Wed, Nov 06 2013 9:59AM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
Am 06.11.2013 13:09, schrieb Patrick H. Lauke:
> I don't believe that's what we said though? I thought the short
> version of our various responses was: leave enter key behavior alone,
> let browsers do what they do by default, as that's what users expect? P
Oh sorry, I misunderstood you then,
I thought you were agreeing with Detlev who was favouring the submit
button as the most solid way of submitting the form in question,
and that your reference to deflecting from defaults was geared at being
able to submit via enter key ;)
Cheers
Nathalie
From: Paul J. Adam
Date: Wed, Nov 06 2013 1:47PM
Subject: Re: Form submission via enter key?
← Previous message | Next message →
Hi Nathalie,
I just dont see a good reason to go against the standard convention and behavior for all forms in the web. If you press enter inside an input it submits the form. Simple as that, dont press enter if you dont want to submit.
It would be easier get browser developers to change their form submission implementation rather than try to get every developer in the world to do something different with their web forms.
I think the answer is: the default behavior is the correct behavior.
Paul J. Adam
Accessibility Evangelist
www.deque.com
On Nov 6, 2013, at 10:54 AM, Nathalie Sequeira < = EMAIL ADDRESS REMOVED = > wrote:
> Well Paul, I could agree on this for a form that has required fields
> that will be checked for completeness, or for a simple search box.
>
> However, in my specific case we are talking of a more complex search
> form that
> a) has no required fields at all, so there will be no validation in the
> way you mean (in fact, if you just send the empty form you will get a
> complete list of all entries listed up by category hierarchy).
> and
> b) has text and checkbox inputs -which when focussed will submit the
> form by default- AND selects -which won't do this by default.
>
> So either way I had an inconsistency of the form's behaviour going on
> there:
> depending on where you were in the form, it would submit itself when
> hitting enter -- or not.
> And it irritated my client, leading them to suggest something I wasn't
> comfortable at all with (i.e. submit via enter anytime).
>
> The longer I think on it, the more I lean towards the view that indeed
> default behaviour doesn't necessarily always equal expected behaviour,
> let alone desirable behaviour.
> There's a submit button, so why not use it, after having selected all
> desired search criteria in an orderly manner?
>
> Please show me where I am wrong if that is the case!
> It is precisely for that reason that I posed this question to the list :)
>
> Cheers,
> Nathalie
>
> Am 06.11.2013 15:52, schrieb Paul J. Adam:
>> If thats the standard behavior of web forms then why break the norm? And yes like you said when I do my form validation if they press enter key on the first input it would then send their focus to the first invalid input and read the error message automatically. So they could keep pressing ENTER all they want until every field is filled out correctly. Validation should handle any cases of the user accidentally pressing the enter key too soon.
>>
>> On Nov 6, 2013, at 8:45 AM, Corbett, James < = EMAIL ADDRESS REMOVED = > wrote:
>>
>>> Hi:
>>>
>>> Would you really want that to happen? If you had ten edit fields and you allowed the enter key to evoke a submission on the first field, there would be obvious issues. I realize that client side and or server side validation would or could intercept such behaviour but it would be a poor design from the word go....
>>>
>>> Jim
>>>
>>>
From: Corbett, James
Date: Wed, Nov 06 2013 1:56PM
Subject: Re: Form submission via enter key?
← Previous message | No next message
Hi:
Another issue is the fact that if there is a button before the submit, it will be evoked instead which if you are relying on the default behavior may not be what you are looking for as well.
Jim