A11Y: Fix post control and user-menu focus styles (#13118)

A11Y: Fix post control and user-menu focus styles (#13118)

diff --git a/app/assets/stylesheets/common/base/menu-panel.scss b/app/assets/stylesheets/common/base/menu-panel.scss
index 92b6058..b94e1c0 100644
--- a/app/assets/stylesheets/common/base/menu-panel.scss
+++ b/app/assets/stylesheets/common/base/menu-panel.scss
@@ -284,12 +284,23 @@
         }
       }
 
-      &:hover,
-      &:focus {
+      &:hover {
         background-color: var(--highlight-medium);
         outline: none;
       }
 
+      &:focus-within {
+        background: var(--highlight-medium);
+        a {
+          // we don't need the link focus because we're styling the parent
+          outline: 0;
+        }
+        .btn-flat:focus {
+          // undo default btn-flat style
+          background: transparent;
+        }
+      }
+
       a {
         display: flex;
         margin: 0.25em;
diff --git a/app/assets/stylesheets/common/components/buttons.scss b/app/assets/stylesheets/common/components/buttons.scss
index 0c6fd07..82cc92e 100644
--- a/app/assets/stylesheets/common/components/buttons.scss
+++ b/app/assets/stylesheets/common/components/buttons.scss
@@ -299,10 +299,9 @@
 
   &:focus {
     outline: none;
-    background: var(--primary-medium);
-    color: var(--secondary);
+    background: var(--primary-low);
     .d-icon {
-      color: var(--primary-low);
+      color: var(--primary);
     }
   }
 }

GitHub sha: 567f9caf

This commit appears in #13118 which was approved by riking. It was merged by SamSaffron.