WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: enter key to check radio button?

for

From: Mike Warner
Date: Apr 23, 2022 12:52PM


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.