Moved checkbox aria labelledby to passthru attributes

pull/345/head
cagataycivici 2020-05-13 00:25:35 +03:00
parent 0650459555
commit 76ea1d7196
4 changed files with 4 additions and 12 deletions

View File

@ -4,7 +4,6 @@ export declare class Checkbox extends Vue {
value?: null;
modelValue?: null;
binary?: boolean;
ariaLabelledBy?: string;
$emit(eventName: 'click', event: Event): this;
$emit(eventName: 'input', value: any): this;
$emit(eventName: 'change', event: Event): this;

View File

@ -1,7 +1,7 @@
<template>
<div class="p-checkbox p-component" @click="onClick($event)">
<div class="p-hidden-accessible">
<input ref="input" type="checkbox" :checked="checked" :value="value" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" :aria-labelledby="ariaLabelledBy">
<input ref="input" type="checkbox" :checked="checked" :value="value" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)">
</div>
<div ref="box" :class="['p-checkbox-box', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="checked">
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
@ -17,8 +17,7 @@ export default {
props: {
value: null,
modelValue: null,
binary: Boolean,
ariaLabelledBy: null
binary: Boolean
},
model: {
prop: 'modelValue',

View File

@ -1,8 +1,8 @@
import Vue from 'vue';
export declare class RadioButton extends Vue {
value: any;
modelValue: any;
value?: any;
modelValue?: any;
$emit(eventName: 'click', event: Event): this;
$emit(eventName: 'input', value: any): this;
$emit(eventName: 'change', event: Event): this;

View File

@ -59,12 +59,6 @@ export default {
<td>boolean</td>
<td>false</td>
<td>Allows to select a boolean value instead of multiple values.</td>
</tr>
<tr>
<td>ariaLabelledBy</td>
<td>string</td>
<td>null</td>
<td>Establishes relationships between the component and label(s) where its value should be one or more element IDs.</td>
</tr>
</tbody>
</table>