ember-radio-button icon indicating copy to clipboard operation
ember-radio-button copied to clipboard

`aria-checked` not being set on `master` branch

Open barryofguilder opened this issue 2 years ago • 2 comments

I upgrade my Ember app to use the latest commit on the master branch of ember-radio-button to remove all the deprecation warnings. It seems that the latest code on the master branch no longer sets the aria-checked attribute.

{{! component usage }}
<RadioButton @value='yes' @groupValue='yes' @name='response' />

{{! `master` branch rendered HTML }}
<input name="response" type="radio" value="yes">

{{! version 2.0.1 rendered HTML }}
<input aria-checked="true" name="response" type="radio" value="yes">

I've reproduced this issue with both an Ember 3.28 app as well as a 4.1 app.

barryofguilder avatar Feb 24 '22 14:02 barryofguilder

I created PR https://github.com/yapplabs/ember-radio-button/pull/115 to add the test assertions to show that they are currently failing to set the aria-checked attribute.

barryofguilder avatar Feb 24 '22 14:02 barryofguilder

I'm wondering if when using the radio button without the yielded content, it should be setting the @checked argument of the component rather than the checked HTML attribute of the underlying input field.

See: https://github.com/yapplabs/ember-radio-button/blob/74036d5cade335c19d4d61439c6ea7d90eee288c/addon/components/radio-button.hbs#L30

barryofguilder avatar Mar 04 '22 15:03 barryofguilder

This is fixed in 3.0.0-beta.1 via https://github.com/yapplabs/ember-radio-button/pull/141

raycohen avatar Dec 07 '22 03:12 raycohen