From e3fcee0cb8edcb1b4e2decad96bd53da601365e6 Mon Sep 17 00:00:00 2001 From: Sahil-Sinha-11 Date: Sat, 26 Oct 2024 00:24:55 +0530 Subject: [PATCH 1/3] added arialabelled Prop for kSwitch --- lib/KSwitch.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/KSwitch.vue b/lib/KSwitch.vue index 7921e7444..b85d0b21c 100644 --- a/lib/KSwitch.vue +++ b/lib/KSwitch.vue @@ -10,6 +10,7 @@ type="checkbox" dir="auto" + :aria-labelledby="ariaLabelledBy" :checked.prop="isChecked" :disabled="disabled" :name="name" @@ -41,6 +42,13 @@ export default { name: 'KSwitch', props: { + /** + *arialabelledBy used for complex layout + */ + ariaLabelledBy: { + type: String, + default: null, + }, /** * Current value of the switch state: on or off */ From 77c407df08e5db84c1720499d711f81896296336 Mon Sep 17 00:00:00 2001 From: Sahil-Sinha-11 Date: Mon, 28 Oct 2024 21:53:13 +0530 Subject: [PATCH 2/3] edited comment for arialabelled prop --- lib/KSwitch.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/KSwitch.vue b/lib/KSwitch.vue index b85d0b21c..739d860b4 100644 --- a/lib/KSwitch.vue +++ b/lib/KSwitch.vue @@ -42,8 +42,9 @@ export default { name: 'KSwitch', props: { - /** - *arialabelledBy used for complex layout + /* + * Specifies the ID of an element that labels this switch component. + * Useful for accessibility to provide a label through an external element when `label` is empty */ ariaLabelledBy: { type: String, From 3b4a1a1599b96955a6d78d9c904b6e68099e65bc Mon Sep 17 00:00:00 2001 From: Sahil-Sinha-11 Date: Tue, 29 Oct 2024 00:04:33 +0530 Subject: [PATCH 3/3] ran lint fix --- lib/KSwitch.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/KSwitch.vue b/lib/KSwitch.vue index 739d860b4..005642225 100644 --- a/lib/KSwitch.vue +++ b/lib/KSwitch.vue @@ -42,7 +42,7 @@ export default { name: 'KSwitch', props: { - /* + /* * Specifies the ID of an element that labels this switch component. * Useful for accessibility to provide a label through an external element when `label` is empty */