How to prevent form submission with the Enter or Return key

More
04 May 2016 20:52 - 04 May 2016 20:55 #1 by Demis [Fox-Labs]
If you focus a textbox field and hit the enter key, the form will be submitted.
This behaviour is consistent across all browsers and is known as implicit submission, and Fox Contact does not offer an option to prevent it.
So why is this so important?


Accessibility

Implicit submission is vital to assistive technologies and impaired users that cannot use a mouse at all.
The HTML5 specification strongly encourages implicit submission:

"There are pages on the Web that are only usable if there is a way to implicitly submit forms, so user agents [browsers] are strongly encouraged to support this."



User Experience

"TAB" and "Shift+TAB" are the conventional keys to move the keyboard focus forwards and backwards between fields, while the Enter (or Return) key submits the form.
Many users have an expectation that these conventions will just work. Interfering with this leads to a negative user experience for these users.

Please Log in or Create an account to join the conversation.