Skip to content

Commit 47d9485

Browse files
committed
fix: clearInput aria-label set on wrong element (fixes #942)
1 parent f436174 commit 47d9485

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/VueDatePicker/components/DatepickerInput.vue

+3-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
@keydown="handleKeyPress($event, true)"
4747
@paste="handlePaste"
4848
/>
49-
<div :aria-label="defaultedAriaLabels?.clearInput" @click="emit('toggle')">
49+
<div @click="emit('toggle')">
5050
<span v-if="$slots['input-icon'] && !hideInputIcon" class="dp__input_icon" @click="emit('toggle')"
5151
><slot name="input-icon"
5252
/></span>
@@ -57,14 +57,13 @@
5757
@click="emit('toggle')"
5858
/>
5959
</div>
60-
<span
61-
v-if="$slots['clear-icon'] && inputValue && clearable && !disabled && !readonly"
62-
class="dp--clear-btn"
60+
<span v-if="$slots['clear-icon'] && inputValue && clearable && !disabled && !readonly" class="dp--clear-btn"
6361
><slot name="clear-icon" :clear="onClear"
6462
/></span>
6563
<button
6664
v-if="clearable && !$slots['clear-icon'] && inputValue && !disabled && !readonly"
6765
ref="clearBtnRef"
66+
:aria-label="defaultedAriaLabels?.clearInput"
6867
class="dp--clear-btn"
6968
type="button"
7069
@blur="clearBtnFocused = false"

0 commit comments

Comments
 (0)