Skip to content

Commit

Permalink
Merge pull request #808 from Sahil-Sinha-11/Issue/806/arialabelledProp
Browse files Browse the repository at this point in the history
added arialabelled Prop for kSwitch
  • Loading branch information
AlexVelezLl authored Oct 28, 2024
2 parents 4f0cc47 + 3b4a1a1 commit ce970a4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/KSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
type="checkbox"
dir="auto"

:aria-labelledby="ariaLabelledBy"
:checked.prop="isChecked"
:disabled="disabled"
:name="name"
Expand Down Expand Up @@ -41,6 +42,14 @@
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
*/
ariaLabelledBy: {
type: String,
default: null,
},
/**
* Current value of the switch state: on or off
*/
Expand Down

0 comments on commit ce970a4

Please sign in to comment.