From a2aae41e1b8af81759eac6f8ea4ba9c7a9650af6 Mon Sep 17 00:00:00 2001 From: Ricardo Ferrolho Date: Thu, 30 May 2024 10:00:33 +0100 Subject: [PATCH] Add aria-disabled attributes --- src/components/DateInput.vue | 1 + src/components/Datepicker.vue | 5 +++-- src/components/PickerDay.vue | 2 ++ src/components/PickerMonth.vue | 2 ++ src/components/PickerYear.vue | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/DateInput.vue b/src/components/DateInput.vue index 6f8dccd3..29d53345 100644 --- a/src/components/DateInput.vue +++ b/src/components/DateInput.vue @@ -27,6 +27,7 @@ :placeholder="placeholder" :clear-button="clearButton" :disabled="disabled || null" + :aria-disabled="disabled || null" :required="required" :readonly="!typeable" autocomplete="off" diff --git a/src/components/Datepicker.vue b/src/components/Datepicker.vue index e99bfabd..00efb679 100644 --- a/src/components/Datepicker.vue +++ b/src/components/Datepicker.vue @@ -22,7 +22,8 @@ :calendar-button="calendarButton" :calendar-button-icon="calendarButtonIcon" :calendar-button-icon-content="calendarButtonIconContent" - :disabled="disabled" + :disabled="disabled || null" + :aria-disabled="disabled || null" :required="required" :bootstrap-styling="bootstrapStyling" :use-utc="useUtc" @@ -236,7 +237,7 @@ export default { emits: [ 'changedMonth', 'changedYear', - 'cleared', + 'cleared', 'closed', 'highlight-date', 'selected', diff --git a/src/components/PickerDay.vue b/src/components/PickerDay.vue index 749110d7..c69b6ebb 100644 --- a/src/components/PickerDay.vue +++ b/src/components/PickerDay.vue @@ -21,6 +21,7 @@ class="prev" :aria-label="isRtl ? 'Next Month' : 'Previous Month'" :disabled="isLeftNavDisabled || null" + :aria-disabled="isLeftNavDisabled || null" @click="isRtl ? nextMonth() : previousMonth()" @keydown.space.enter.prevent="isRtl ? nextMonth() : previousMonth()" @keydown="$emit('keydown', $event)" @@ -56,6 +57,7 @@ class="next" :aria-label="isRtl ? 'Previous Month' : 'Next Month'" :disabled="isRightNavDisabled || null" + :aria-disabled="isRightNavDisabled || null" @click="isRtl ? previousMonth() : nextMonth()" @keydown.space.enter.prevent="isRtl ? previousMonth() : nextMonth()" @keydown="$emit('keydown', $event)" diff --git a/src/components/PickerMonth.vue b/src/components/PickerMonth.vue index e0849adf..a4c8233a 100644 --- a/src/components/PickerMonth.vue +++ b/src/components/PickerMonth.vue @@ -20,6 +20,7 @@ type="button" class="prev" :disabled="isLeftNavDisabled || null" + :aria-disabled="isLeftNavDisabled || null" :aria-label="isRtl ? 'Next Year' : 'Previous Year'" @click="isRtl ? nextYear() : previousYear()" @keydown.space.enter.prevent="isRtl ? nextYear() : previousYear()" @@ -44,6 +45,7 @@ class="next" :aria-label="isRtl ? 'Previous Year' : 'Next Year'" :disabled="isRightNavDisabled || null" + :aria-disabled="isRightNavDisabled || null" @click="isRtl ? previousYear() : nextYear()" @keydown.space.enter.prevent="isRtl ? previousYear() : nextYear()" @keydown="$emit('keydown', $event)" diff --git a/src/components/PickerYear.vue b/src/components/PickerYear.vue index 53e7000a..a3650af5 100644 --- a/src/components/PickerYear.vue +++ b/src/components/PickerYear.vue @@ -20,6 +20,7 @@ type="button" class="prev" :disabled="isLeftNavDisabled || null" + :aria-disabled="isLeftNavDisabled || null" :aria-label="isRtl ? 'Next Decade' : 'Previous Decade'" @click="isRtl ? nextDecade() : previousDecade()" @keydown.space.enter.prevent="isRtl ? nextDecade() : previousDecade()" @@ -39,6 +40,7 @@ class="next" :aria-label="isRtl ? 'Previous Decade' : 'Next Decade'" :disabled="isRightNavDisabled || null" + :aria-disabled="isRightNavDisabled || null" @click="isRtl ? previousDecade() : nextDecade()" @keydown="$emit('keydown', $event)" >