Skip to content

Commit

Permalink
Merge pull request #798 from shivam-daksh/fix-KIconButton-props
Browse files Browse the repository at this point in the history
Improve accessibility by using tooltip as fallback for ariaLabel in KIconButton
  • Loading branch information
LianaHarris360 authored Oct 9, 2024
2 parents 64d35d3 + 16fc781 commit 0168464
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/buttons-and-links/KIconButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:appearance="appearance"
:appearanceOverrides="appearanceOverrides"
:type="buttonType"
:aria-label="ariaLabel"
:aria-label="computedAriaLabel"
text=""
v-on="$listeners"
>
Expand Down Expand Up @@ -139,6 +139,9 @@
return { ...sizes, top: '7px' };
}
},
computedAriaLabel() {
return this.ariaLabel || this.tooltip;
},
},
};
Expand Down

0 comments on commit 0168464

Please sign in to comment.