Skip to content

Commit cfaf9a7

Browse files
committed
Set tab index onChange
1 parent 7f1f661 commit cfaf9a7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

addon/components/radio-group.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,10 @@ export default class RadioGroupComponent extends Component {
173173

174174
_setActiveOption(option) {
175175
if (option) {
176+
option.element.focus();
176177
this.activeOption = option;
177178
this.activeValue = option.value;
178-
option.element.focus();
179+
this.setTabIndex();
179180
this.onChange(option.value);
180181
}
181182
}

addon/components/radio-group/-option.hbs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{! template-lint-disable no-positive-tabindex}}
21
<div
32
id={{this.id}}
43
ariaLabel={{@value}}
@@ -13,5 +12,4 @@
1312
...attributes
1413
>
1514
{{yield}}
16-
</div>
17-
{{! template-lint-enable no-positive-tabindex}}
15+
</div>

0 commit comments

Comments
 (0)