From 15ae86a33eace3fbb355e12ac980e7cfe5a8c9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 20 Oct 2023 09:52:09 +0200 Subject: [PATCH] fix(menubar): Add aria-selected and aria-activedescendant to menu bar items (fix #3911) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/Menu/ActionList.vue | 2 ++ src/components/Menu/utils.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index 92f5066255c..30e60522bf2 100644 --- a/src/components/Menu/ActionList.vue +++ b/src/components/Menu/ActionList.vue @@ -27,6 +27,7 @@ v-bind="state" :container="menuIDSelector" :aria-label="actionEntry.label" + :aria-activedescendant="currentChild ? `${$menuID}-child-${currentChild.key}` : null" :force-menu="true" :name="actionEntry.label" :data-text-action-entry="actionEntry.key" @@ -37,6 +38,7 @@ { disabled: isDisabled(actionEntry, $editor), class: getEntryClasses(actionEntry, active), active, + 'aria-selected': active, } }