From e1afbfec13d446f53dbe79f4179fbd584a14c43d Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 5 Dec 2023 21:36:54 +0100 Subject: [PATCH] fix(a11y): contrast for active menubar buttons Dropdown menus (headings and callouts) are still low contrast. Signed-off-by: Max --- src/components/Menu/ActionEntry.scss | 23 ----------------------- src/components/Menu/ActionList.vue | 3 +++ src/components/Menu/ActionSingle.vue | 5 ++++- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/src/components/Menu/ActionEntry.scss b/src/components/Menu/ActionEntry.scss index d85e0ce036a..553282f4a58 100644 --- a/src/components/Menu/ActionEntry.scss +++ b/src/components/Menu/ActionEntry.scss @@ -1,12 +1,3 @@ -%text__is-active-item-btn { - opacity: 1; - background-color: var(--color-primary-element-light); - border-radius: 50%; - .material-design-icon > svg { - fill: var(--color-primary-element); - } -} - .text-menubar, .v-popper__inner { button.entry-action__button { height: 44px; @@ -49,20 +40,6 @@ box-shadow: var(--color-primary-element); } - &.is-active { - @extend %text__is-active-item-btn; - } - } - - .entry-action.is-active:not(.entry-action-item) { - @extend %text__is-active-item-btn; - } - - .entry-action.entry-action-item { - &.is-active { - background-color: var(--color-primary-element-light); - border-radius: var(--border-radius-large); - } } .button-vue { diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index d566aa32c3d..b6bbcbab797 100644 --- a/src/components/Menu/ActionList.vue +++ b/src/components/Menu/ActionList.vue @@ -27,6 +27,8 @@ v-bind="state" :container="menuIDSelector" :aria-label="actionEntry.label" + :aria-pressed="state.active" + :type="state.active ? 'primary': 'tertiary'" :aria-activedescendant="currentChild ? `${$menuID}-child-${currentChild.key}` : null" :force-menu="true" :name="actionEntry.label" @@ -39,6 +41,7 @@