Skip to content

Commit

Permalink
fix: clearInput aria-label set on wrong element (fixes #942)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Jul 18, 2024
1 parent f436174 commit 47d9485
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/VueDatePicker/components/DatepickerInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
@keydown="handleKeyPress($event, true)"
@paste="handlePaste"
/>
<div :aria-label="defaultedAriaLabels?.clearInput" @click="emit('toggle')">
<div @click="emit('toggle')">
<span v-if="$slots['input-icon'] && !hideInputIcon" class="dp__input_icon" @click="emit('toggle')"
><slot name="input-icon"
/></span>
Expand All @@ -57,14 +57,13 @@
@click="emit('toggle')"
/>
</div>
<span
v-if="$slots['clear-icon'] && inputValue && clearable && !disabled && !readonly"
class="dp--clear-btn"
<span v-if="$slots['clear-icon'] && inputValue && clearable && !disabled && !readonly" class="dp--clear-btn"
><slot name="clear-icon" :clear="onClear"
/></span>
<button
v-if="clearable && !$slots['clear-icon'] && inputValue && !disabled && !readonly"
ref="clearBtnRef"
:aria-label="defaultedAriaLabels?.clearInput"
class="dp--clear-btn"
type="button"
@blur="clearBtnFocused = false"
Expand Down

0 comments on commit 47d9485

Please sign in to comment.