E-mail List Archives
Thread: enter key to check radio button?
Number of posts in this thread: 8 (In chronological order)
From: Mike Warner
Date: Thu, Apr 21 2022 11:37AM
Subject: enter key to check radio button?
No previous message | Next message →
Hi all,
we have a client who was saying that we should also allow the enter key to
check a radio button and not to let that enter key submit the form on
the page. They said that we should be prepared for however a keyboard user
may try to check the button. I explained that spacebar is the standard key
for that and sent the W3C page that talks about it. Has anyone else been
asked to accept the enter key to check a radio button? Is it a reasonable
request?
Thanks,
Mike
Mike Warner
Director of IT Services
MindEdge, Inc.
From: TJ McElroy
Date: Thu, Apr 21 2022 12:31PM
Subject: Re: enter key to check radio button?
← Previous message | Next message →
Hi Mike,
I do think that it is a reasonable request to have the enter key check a
button,
however it should also be able to submit the form.
Your user does have a point, that you should allow for many different
ways to use the form
Not to read to much into your question, but if your user does not want
the enter key to submit the form, what key do they suggest?
TJ
On 4/21/2022 1:37 PM, Mike Warner wrote:
> Hi all,
>
> we have a client who was saying that we should also allow the enter key to
> check a radio button and not to let that enter key submit the form on
> the page. They said that we should be prepared for however a keyboard user
> may try to check the button. I explained that spacebar is the standard key
> for that and sent the W3C page that talks about it. Has anyone else been
> asked to accept the enter key to check a radio button? Is it a reasonable
> request?
>
> Thanks,
> Mike
>
> Mike Warner
> Director of IT Services
> MindEdge, Inc.
> > > List archives athttp://webaim.org/discussion/archives
> --
6270 Corporate Drive
Indianapolis, IN 46278
bosma.org
<http://bosma.org/>
*Facebook <https://www.facebook.com/bosmaenterprises>
/ Twitter <https://twitter.com/Bosmaenterprise>* / *Linkedin*
<https://www.linkedin.com/company/306575?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A306575%2Cidx%3A2-1-2%2CtarId%3A1477402422293%2Ctas%3Abosma%20enterhttp://>
Bosma
Enterprises office is closed Monday May 30th, for Memorial Day
Holiday.
From: Patrick H. Lauke
Date: Thu, Apr 21 2022 12:56PM
Subject: Re: enter key to check radio button?
← Previous message | Next message →
On 21/04/2022 19:31, TJ McElroy wrote:
> Not to read to much into your question, but if your user does not want
> the enter key to submit the form, what key do they suggest?
They probably want it to submit when focus is on the submit button, not
on the radio buttons.
P
--
Patrick H. Lauke
https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke
From: Mike Warner
Date: Thu, Apr 21 2022 12:58PM
Subject: Re: enter key to check radio button?
← Previous message | Next message →
Thanks, TJ. I don't know which key they want to submit the form. (I sent a
follow-up email to ask) Since consistency is the rule of accessibility, it
seems that this could cause more confusion than it prevents. For example,
keyboard-only users who expect to submit forms using the enter key,
because that's how it works everywhere else. I can add an event listener
to the radio buttons (and checkboxes) to prevent the default action of the
enter key, allowing it to check the box/button, but would that be confusing
to some users?
Mike
Mike Warner
Director of IT Services
MindEdge, Inc.
On Thu, Apr 21, 2022 at 2:32 PM TJ McElroy < = EMAIL ADDRESS REMOVED = > wrote:
> Hi Mike,
>
> I do think that it is a reasonable request to have the enter key check a
> button,
> however it should also be able to submit the form.
>
> Your user does have a point, that you should allow for many different ways
> to use the form
>
>
> Not to read to much into your question, but if your user does not want the
> enter key to submit the form, what key do they suggest?
>
> TJ
>
>
> On 4/21/2022 1:37 PM, Mike Warner wrote:
>
> Hi all,
>
> we have a client who was saying that we should also allow the enter key to
> check a radio button and not to let that enter key submit the form on
> the page. They said that we should be prepared for however a keyboard user
> may try to check the button. I explained that spacebar is the standard key
> for that and sent the W3C page that talks about it. Has anyone else been
> asked to accept the enter key to check a radio button? Is it a reasonable
> request?
>
> Thanks,
> Mike
>
> Mike Warner
> Director of IT Services
> MindEdge, Inc.
> > > > >
>
>
>
> 6270 Corporate Drive
> Indianapolis, IN 46278
>
> bosma.org
>
> *Facebook <https://www.facebook.com/bosmaenterprises> / Twitter
> <https://twitter.com/Bosmaenterprise>* / *Linkedin*
> <https://www.linkedin.com/company/306575?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A306575%2Cidx%3A2-1-2%2CtarId%3A1477402422293%2Ctas%3Abosma%20enterhttp://>
> Bosma Enterprises office is closed Monday May 30th, for Memorial Day
> Holiday.
>
From: David Farough
Date: Thu, Apr 21 2022 2:31PM
Subject: Re: enter key to check radio button?
← Previous message | Next message →
I think that verifying that focus is on the submit button makes sense before automatically submitting the form.
A screen reader user will need to hit enter in order to trigger focus mode in order to type into an edit field for example.
Automatically submitting the form regardless of the current focus would be annoying to say the least!
From: Vaibhav Saraf
Date: Thu, Apr 21 2022 2:50PM
Subject: Re: enter key to check radio button?
← Previous message | Next message →
Hi David,
I can tell from my experience both as a sighted user and later as a screen
reader user that Submit on Enter doesn't work the same way for the screen
readers. NVDA and JAWS, for instance catch the onclick event on hitting
Space and Enter, hence you will observe that a radio button or checkbox is
operable with Enter on a screen reader even though it is not operable with
the same key without the screen reader on.
Hi Mike,
My experience is very much limited as compared to the experts present on
the list, I'll just share with you what you observed so far during user
interactions which I did. Most of the users tend to go with the default
keys, like Space for radios and checkboxes, Alt + down arrow for a
dropdown, etc., with ofcourse a few exceptions.
My personal opinion would be to implement the user ask if it is an
Enterprise application meant for a small audience including the user. If
otherwise, I would agree with you that accessibility lies in consistency.
Thanks,
Vaibhav
On Thu, 21 Apr 2022 at 16:32, David Farough < = EMAIL ADDRESS REMOVED = >
wrote:
> I think that verifying that focus is on the submit button makes sense
> before automatically submitting the form.
> A screen reader user will need to hit enter in order to trigger focus mode
> in order to type into an edit field for example.
> Automatically submitting the form regardless of the current focus would be
> annoying to say the least!
>
>
From: Birkir R. Gunnarsson
Date: Thu, Apr 21 2022 3:56PM
Subject: Re: enter key to check radio button?
← Previous message | Next message →
WCAG 3.2.2 )oninput) does not allow for submitting forms by changing
the setting of a user interface component (i.e. typing into a text
input, checking a checkbox or selecting a radio button), not without
prior warning at least.
There is a bit of a tradition that pressing enter with focus on a text
input submits forms, though it can cause inadvertent submissions for
users who are trying to create a new line.
In my experience, I've gone with the following:
If the form is a single edit field, like a search (with or without a
search button), pressing enter with focus in that field can trigger
the button function (search function).
If you have anything more complex than that, (e.g. multiple input
fields or a field with other controls), you need a separate submit
button. Enter key should only submit the form with focus on that
button (not anywhere else on the form).
The expected pattern to check radio buttons or checkboxes is to press
spacebar with focus on that input (with radio buttons pressing arrow
keys up/down also navigates to and selects the adjacent radio button).
Screen reader users are able to use either the spacebar or the enter
key on most check and select controls, because in browse mode, a
screen reader generates a click event when one of those two keys are
pressed, not a keyboard event, keyboard only users are not used to
that.
On 4/21/22, Vaibhav Saraf < = EMAIL ADDRESS REMOVED = > wrote:
> Hi David,
>
> I can tell from my experience both as a sighted user and later as a screen
> reader user that Submit on Enter doesn't work the same way for the screen
> readers. NVDA and JAWS, for instance catch the onclick event on hitting
> Space and Enter, hence you will observe that a radio button or checkbox is
> operable with Enter on a screen reader even though it is not operable with
> the same key without the screen reader on.
>
> Hi Mike,
>
> My experience is very much limited as compared to the experts present on
> the list, I'll just share with you what you observed so far during user
> interactions which I did. Most of the users tend to go with the default
> keys, like Space for radios and checkboxes, Alt + down arrow for a
> dropdown, etc., with ofcourse a few exceptions.
>
> My personal opinion would be to implement the user ask if it is an
> Enterprise application meant for a small audience including the user. If
> otherwise, I would agree with you that accessibility lies in consistency.
>
> Thanks,
> Vaibhav
>
>
>
>
>
> On Thu, 21 Apr 2022 at 16:32, David Farough < = EMAIL ADDRESS REMOVED = >
> wrote:
>
>> I think that verifying that focus is on the submit button makes sense
>> before automatically submitting the form.
>> A screen reader user will need to hit enter in order to trigger focus mode
>> in order to type into an edit field for example.
>> Automatically submitting the form regardless of the current focus would be
>> annoying to say the least!
>>
>>
From: Mike Warner
Date: Sat, Apr 23 2022 12:52PM
Subject: Re: enter key to check radio button?
← Previous message | No next message
Thank you all for your responses! The forms are individual multiple choice
questions in our online courses. It was said that a screen reader allows
the use of enter as well as the spacebar to check a radio button, I found
that it also submitted the form when I tested with NVDA and JAWS. Granted,
the first hit of the enter key did just check the radio button and a second
hit submitted the form, even though the focus was still on the radio
button. I can see keyboard users with motor issues accidentally hitting
the key twice. Heck, I do it sometimes.
So, I'll add an event listener to the radio buttons and preventDefault()
for the enter key tomake it act like the space bar in that context. Then,
the user can tab to the submit buttons below the question to go to the test
home page, the next question, or the previous question using standard
button behavior.
Thanks again,
Mike
Mike Warner
Director of IT Services
MindEdge, Inc.