diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index d1063deaa1..f6849a68ab 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -155,7 +155,9 @@ } .module-message:hover .module-message__buttons, -.module-message__buttons:has([data-axo-contextmenu-state='open']) { +.module-message:is(:focus-visible, :has(:focus-visible)) + .module-message__buttons, +.module-message__buttons:has([data-axo-dropdownmenu-state='open']) { opacity: 1; } @@ -182,41 +184,32 @@ } } -@mixin module-message__buttons__button($light-icon, $dark-icon: $light-icon) { - cursor: pointer; - height: 20px; - width: 20px; +@mixin module-message__buttons__button($icon) { + color: variables.$color-gray-45; + border-radius: 9999px; - @include mixins.light-theme { - @include mixins.color-svg($light-icon, variables.$color-gray-45); - &:hover { - @include mixins.color-svg($light-icon, variables.$color-gray-90); - } + &::before { + content: ''; + display: block; + height: 20px; + width: 20px; + @include mixins.color-svg($icon, currentColor); } - @include mixins.dark-theme { - @include mixins.color-svg($dark-icon, variables.$color-gray-45); - &:hover { - @include mixins.color-svg($dark-icon, variables.$color-gray-02); - } + &:hover { + color: light-dark(variables.$color-gray-90, variables.$color-gray-02); + } + + &:focus-visible { + @include mixins.axo-focus-ring; } .module-message--targeted & { - @include mixins.light-theme { - background-color: variables.$color-gray-60; - } - @include mixins.dark-theme { - background-color: variables.$color-white; - } + color: light-dark(variables.$color-gray-60, variables.$color-white); } - .module-message:focus-visible & { - @include mixins.light-theme { - background-color: variables.$color-gray-60; - } - @include mixins.dark-theme { - background-color: variables.$color-white; - } + .module-message:focus & { + color: light-dark(variables.$color-gray-60, variables.$color-white); } } diff --git a/ts/components/conversation/TimelineMessage.dom.tsx b/ts/components/conversation/TimelineMessage.dom.tsx index 0a40c8886c..785418f969 100644 --- a/ts/components/conversation/TimelineMessage.dom.tsx +++ b/ts/components/conversation/TimelineMessage.dom.tsx @@ -527,17 +527,15 @@ function MessageMenu({ : undefined; return ( - // FIXME: Menus should be keyboard accessible - // oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/interactive-supports-focus -