diff --git a/lib/KDropdownMenu.vue b/lib/KDropdownMenu.vue
index 426619456..83c59ae30 100644
--- a/lib/KDropdownMenu.vue
+++ b/lib/KDropdownMenu.vue
@@ -141,6 +141,8 @@
},
mounted() {
this.trigger = this.$el.parentElement;
+ this.trigger.setAttribute('aria-haspopup', 'menu');
+ this.trigger.setAttribute('aria-expanded', false);
},
beforeDestroy() {
window.removeEventListener('keydown', this.handleOpenMenuNavigation, true);
@@ -152,6 +154,7 @@
await this.$nextTick();
this.setFocus();
window.addEventListener('keydown', this.handleOpenMenuNavigation, true);
+ this.trigger.setAttribute('aria-expanded', true);
},
setFocus() {
this.$refs.menu.$el.querySelector('li').focus();
@@ -169,7 +172,7 @@
this.lastFocusElement.focus();
}
}
-
+ this.trigger.setAttribute('aria-expanded', false);
window.removeEventListener('keyup', this.handleKeyUp, true);
},
getNextFocusableSibling(focusedElement) {
diff --git a/lib/buttons-and-links/KIconButton.vue b/lib/buttons-and-links/KIconButton.vue
index 79cb50bf1..0d1d5814d 100644
--- a/lib/buttons-and-links/KIconButton.vue
+++ b/lib/buttons-and-links/KIconButton.vue
@@ -26,7 +26,9 @@
:style="iconStyles"
/>
-
+
+
+