WebAIM - Web Accessibility In Mind

E-mail List Archives

Radio buttons using input tag, or aria radiogroup role?


From: AutoMagicMike
Date: Apr 25, 2017 2:32PM

Hi everyone.

I've seen developers starting to use the aria roles "radiogroup" and
"radio" as an alternative to
a plain old HTML5 <input> element.

for example using an input tag inside a <fieldset> <legend> -
<input type="radio" name="radio_stations" id="txt" value="radio1" checked>
<label for="radio1">radio1</label>

and radiogroup example at

<div role="radio"

Both solutions look good and appear to work well with my screen reader
browser combinations.

My understanding is that the solutions which are semantic should be used in
preference to those that are not, and
solutions that are not reliant on JavaScript should be used in preference
to are.
That's two strikes against the aria solution.

Are there any advantages to using the aria approach? better support in
assistive technologies ? mobile devices?

If not, while I understand that both are technically valid the plain old
<input> looks like a better practice.