From 40223f308533f05672392b0fe640ef0c038f55e1 Mon Sep 17 00:00:00 2001 From: Joe McGrath Date: Thu, 8 Sep 2022 12:37:18 +0900 Subject: [PATCH] feat(buttons): add accessibility prop for aria label --- components/interactables/Button/Button.html | 1 + components/interactables/Button/Button.vue | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/components/interactables/Button/Button.html b/components/interactables/Button/Button.html index 61b090b254..ccbf63bec5 100644 --- a/components/interactables/Button/Button.html +++ b/components/interactables/Button/Button.html @@ -9,6 +9,7 @@ @mousemove.stop="handleMouseMove" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave" + :aria-label="label || text" >
diff --git a/components/interactables/Button/Button.vue b/components/interactables/Button/Button.vue index a30c3b5dcc..7791de18b6 100644 --- a/components/interactables/Button/Button.vue +++ b/components/interactables/Button/Button.vue @@ -35,6 +35,11 @@ export default Vue.extend({ type: Boolean, default: false, }, + // aria label for accessibility + label: { + type: String, + default: '', + }, }, data() { return {