Refactor Accessibility for RadioButton
parent
6f7c92f708
commit
6f73a3350a
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div :class="containerClass" @click="onClick($event)">
|
||||
<div class="p-hidden-accessible">
|
||||
<input ref="input" type="radio" :id="inputId" :checked="checked" :value="value" @focus="onFocus" @blur="onBlur" v-bind="inputProps">
|
||||
<input ref="input" type="radio" :id="inputId" :name="name" :checked="checked" :disabled="disabled" :value="value" @focus="onFocus" @blur="onBlur" v-bind="inputProps">
|
||||
</div>
|
||||
<div ref="box" :class="['p-radiobutton-box', {'p-highlight': checked, 'p-disabled': disabled, 'p-focus': focused}]">
|
||||
<div class="p-radiobutton-icon"></div>
|
||||
|
@ -29,7 +29,11 @@ export default {
|
|||
inputProps: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -52,7 +52,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.selectedCategory = this.categories[1];
|
||||
this.selectedCategory = this.categories[1].name;
|
||||
},
|
||||
components: {
|
||||
'RadioButtonDoc': RadioButtonDoc
|
||||
|
|
|
@ -249,7 +249,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.selectedCategory = this.categories[1];
|
||||
this.selectedCategory = this.categories[1].name;
|
||||
}
|
||||
}
|
||||
<\\/script>
|
||||
|
@ -298,7 +298,7 @@ export default {
|
|||
{name: 'Production', key: 'P'},
|
||||
{name: 'Research', key: 'R'}
|
||||
]);
|
||||
const selectedCategory = ref(categories.value[1]);
|
||||
const selectedCategory = ref(categories.value[1].name);
|
||||
|
||||
return { city, categories, selectedCategory }
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ export default {
|
|||
{name: 'Production', key: 'P'},
|
||||
{name: 'Research', key: 'R'}
|
||||
]);
|
||||
const selectedCategory = ref(categories.value[1]);
|
||||
const selectedCategory = ref(categories.value[1].name);
|
||||
|
||||
return { city, categories, selectedCategory }
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue