Skip to content

Commit

Permalink
feat(form-radio): ARIA - Add IDs to individual radios (#663)
Browse files Browse the repository at this point in the history
If ID supplied on component, generate IDs for each radio input
  • Loading branch information
tmorehouse committed Jul 7, 2017
1 parent 6919cc5 commit 1de785e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/components/form-radio.vue
Expand Up @@ -6,9 +6,9 @@
:aria-invalid="ariaInvalid"
>
<label :class="[checkboxClass, custom?'custom-radio':null]"
v-for="option in formOptions"
v-for="(option, idx) in formOptions"
>
<input :id="option.id || null"
<input :id="id ? (id + '__BV_radio_' + idx) : null"
:class="custom?'custom-control-input':null"
ref="inputs"
type="radio"
Expand Down

0 comments on commit 1de785e

Please sign in to comment.