From 3a450d7c2b58f7725cc77db8d6d56b4da9ff7492 Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Mon, 8 Feb 2021 11:20:45 -0500 Subject: [PATCH 01/22] Change span to button to allow element to have focus --- src/components/DateInput.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DateInput.vue b/src/components/DateInput.vue index 8803b493..1fb998c1 100644 --- a/src/components/DateInput.vue +++ b/src/components/DateInput.vue @@ -2,7 +2,7 @@
- Date: Mon, 8 Feb 2021 11:22:08 -0500 Subject: [PATCH 02/22] Adds dynamic open/close datepicker aria-label --- src/components/DateInput.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/DateInput.vue b/src/components/DateInput.vue index 1fb998c1..d181ab7b 100644 --- a/src/components/DateInput.vue +++ b/src/components/DateInput.vue @@ -4,6 +4,7 @@
From 19e96160364e94cb86ec2d5f7a5087d8eda60e5a Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Wed, 10 Feb 2021 13:10:28 -0500 Subject: [PATCH 07/22] Adds dynamic aria-label using LocaleDateString --- src/components/PickerDay.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/PickerDay.vue b/src/components/PickerDay.vue index 4b952090..4101796c 100644 --- a/src/components/PickerDay.vue +++ b/src/components/PickerDay.vue @@ -22,6 +22,7 @@ @@ -128,6 +129,14 @@ export default { month === this.utils.getMonth(this.selectedDate) ) }, + localDateString(day) { + const options = { + year: 'numeric', + month: 'long', + } + + return new Date(day.timestamp).toLocaleDateString(undefined, options) + }, /** * Increments the year */ From 3c61064e572c8299e7ead61d77f470303d9b20cd Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Wed, 10 Feb 2021 15:04:40 -0500 Subject: [PATCH 09/22] Use month instead of day for parameter --- src/components/PickerMonth.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PickerMonth.vue b/src/components/PickerMonth.vue index e5f8c915..ec099588 100644 --- a/src/components/PickerMonth.vue +++ b/src/components/PickerMonth.vue @@ -129,13 +129,13 @@ export default { month === this.utils.getMonth(this.selectedDate) ) }, - localDateString(day) { + localDateString(month) { const options = { year: 'numeric', month: 'long', } - return new Date(day.timestamp).toLocaleDateString(undefined, options) + return new Date(month.timestamp).toLocaleDateString(undefined, options) }, /** * Increments the year From 1b586e9856605d9469ebdb47d7c608e8050eed96 Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Wed, 10 Feb 2021 15:04:54 -0500 Subject: [PATCH 10/22] Use button instead of span, adds dynamic aria-label using LocaleDateString --- src/components/PickerYear.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/PickerYear.vue b/src/components/PickerYear.vue index 108d6627..614e7cf5 100644 --- a/src/components/PickerYear.vue +++ b/src/components/PickerYear.vue @@ -13,15 +13,16 @@ - {{ year.year }} - + @@ -146,6 +147,13 @@ export default { this.selectedDate && year === this.utils.getFullYear(this.selectedDate) ) }, + localDateString(year) { + const options = { + year: 'numeric', + } + + return new Date(year.timestamp).toLocaleDateString(undefined, options) + }, /** * Increments the decade */ From ebf4fd2b2644878fa87df10d26c9bb0cbe760c6b Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Wed, 10 Feb 2021 15:13:38 -0500 Subject: [PATCH 11/22] Adds aria-expanded --- src/components/DateInput.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/DateInput.vue b/src/components/DateInput.vue index d181ab7b..6b75e85c 100644 --- a/src/components/DateInput.vue +++ b/src/components/DateInput.vue @@ -4,6 +4,7 @@