Add aria labelled by

pull/146/head
cagataycivici 2020-01-13 13:01:29 +03:00
parent 07dbf2528c
commit 18dffa5a89
3 changed files with 12 additions and 1 deletions

View File

@ -9,5 +9,6 @@ export declare class ColorPicker extends Vue {
tabindex?: string;
autoZIndex?: boolean;
baseZIndex?: number;
ariaLabelledBy?: string;
$emit(eventName: 'input', value: any): this;
}

View File

@ -1,7 +1,7 @@
<template>
<div :class="containerClass">
<input ref="input" type="text" :class="inputClass" readonly="readonly" :tabindex="tabindex" :disabled="disabled"
@click="onInputClick" @keydown="onInputKeydown" v-if="!inline"/>
@click="onInputClick" @keydown="onInputKeydown" v-if="!inline" :aria-labelledby="ariaLabelledBy"/>
<transition name="p-input-overlay" @enter="onOverlayEnter" @leave="onOverlayLeave">
<div ref="picker" :class="pickerClass" v-if="inline ? true : overlayVisible">
<div class="p-colorpicker-content">
@ -55,6 +55,10 @@ export default {
baseZIndex: {
type: Number,
default: 0
},
ariaLabelledBy: {
type: String,
default: null
}
},
data() {

View File

@ -90,6 +90,12 @@ export default {
<td>true</td>
<td>Whether to automatically manage layering.</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>
</div>