From b2252bb184d7ce45f1866d4a8225fb2a2016d2d5 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 | 1 + src/components/Menu/utils.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index 92f5066255c..413ebf86026 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" :force-menu="true" :name="actionEntry.label" :data-text-action-entry="actionEntry.key" diff --git a/src/components/Menu/utils.js b/src/components/Menu/utils.js index 4410aca6892..10a1b034d5f 100644 --- a/src/components/Menu/utils.js +++ b/src/components/Menu/utils.js @@ -75,6 +75,7 @@ const getActionState = (actionEntry, $editor) => { disabled: isDisabled(actionEntry, $editor), class: getEntryClasses(actionEntry, active), active, + 'aria-selected': active, } }