From 3e21f6bb4fd5b2cc9263eb2d11861d69b294dcc7 Mon Sep 17 00:00:00 2001
From: "kazzer@ub.uni-leipzig.de" <kazzer@uni-leipzig.de>
Date: Wed, 15 Jun 2022 15:21:03 +0200
Subject: [PATCH] refs #21619 finc:vf6 slightly improves myaccount menu item
 look

---
 themes/finc/scss/_customVariables.scss       |  4 +++
 themes/finc/scss/compiled.scss               | 28 +++++++++++++++++++-
 themes/finc/templates/myresearch/holds.phtml |  8 +++---
 3 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/themes/finc/scss/_customVariables.scss b/themes/finc/scss/_customVariables.scss
index 6124798b435..8decbf465c9 100644
--- a/themes/finc/scss/_customVariables.scss
+++ b/themes/finc/scss/_customVariables.scss
@@ -62,6 +62,7 @@ $textdecoration-anchor: none !default;
 // needs to be overriden in catalogues if visited color does not fit - AP
 $a-visited-color: $steel !default;
 $a-visited-color-alerts: $jet !default;
+$a-visited-color-active-facets: $a-visited-color-alerts !default;
 
 //// FORM FEEDBACK states colors and, by default, alerts colors (i.e. alerts are
 //// defined like so '$alert-success-bg: $state-success-bg;')
@@ -213,6 +214,9 @@ $breadcrumb-color: $btn-primary-color !default;
 //// Link color for breadcrumb .active
 $breadcrumb-active-color: $btn-primary-color !default;
 
+$sidebar-facet-active-hover-color: $btn-primary-color !default;
+$sidebar-facet-active-color: $black !default;
+
 //// Sidebar item hover effect (doesn't exist in VF out-of-the-box); active is for selected facets
 $sidebar-item-hover-bg: transparentize($brand-secondary, .9) !default;
 $sidebar-item-active-hover-bg: transparentize($brand-primary, .1) !default;
diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss
index 77d229a3f89..97fe1b1dafc 100644
--- a/themes/finc/scss/compiled.scss
+++ b/themes/finc/scss/compiled.scss
@@ -665,6 +665,17 @@ a:not(.btn):not(.text) {
         color: $a-visited-color-alerts;
       }
     }
+
+    &.active {
+      .facet & {
+        color: $a-visited-color-active-facets;
+
+        &:focus,
+        &:hover {
+          color: $sidebar-facet-active-hover-color;
+        }
+      }
+    }
   }
 }
 
@@ -2996,13 +3007,28 @@ body:not(.offcanvas) .sidebar {
   &.ok,
   &.overdue {
     .myresearch-menu & {
-      color: $white;
+      color: $sidebar-facet-active-hover-color;
+      display: inline-table;
+      font-size: 90%;
       // unset height attribute from .facet .badge {} definition for better looks
       max-height: unset;
       padding: 3px 7px;
     }
   }
 
+  &.ok {
+    .myresearch-menu .active .status & {
+      background-color: $brand-success;
+    }
+  }
+
+  &.overdue {
+    .myresearch-menu .active .status & {
+      background-color: $brand-danger;
+    }
+  }
+
+
   ////// light color on dark, when active (Facets + My Account) - we need the parent for specificity
   .facet.active > &,
   .sidebar a.active > & {
diff --git a/themes/finc/templates/myresearch/holds.phtml b/themes/finc/templates/myresearch/holds.phtml
index 853eeeb0ce6..f35c5a4999d 100644
--- a/themes/finc/templates/myresearch/holds.phtml
+++ b/themes/finc/templates/myresearch/holds.phtml
@@ -155,17 +155,17 @@
             <?php endif; ?>
             <br />
 
-            <?php /* finc uses <p> and role for alerts */ ?>
+            <?php /* finc uses <p> and aria for alerts */ ?>
             <?php if (isset($this->cancelResults['items'])): ?>
               <?php foreach ($this->cancelResults['items'] as $itemId => $cancelResult): ?>
                 <?php if ($itemId == $ilsDetails['item_id'] && $cancelResult['success'] == false): ?>
-                  <p class="alert alert-danger" role="alert"><?=$this->transEsc($cancelResult['status']) ?><?php if ($cancelResult['sysMessage']) echo ' : ' . $this->transEsc($cancelResult['sysMessage']); ?></p>
+                  <p class="alert alert-danger" aria-live="polite"><?=$this->transEsc($cancelResult['status']) ?><?php if ($cancelResult['sysMessage']) echo ' : ' . $this->transEsc($cancelResult['sysMessage']); ?></p>
                 <?php endif; ?>
               <?php endforeach; ?>
             <?php endif; ?>
 
             <?php if (isset($ilsDetails['available']) && $ilsDetails['available'] == true): ?>
-              <p class="text-success">
+              <p class="text-success" aria-live="polite">
                 <?php if (!empty($ilsDetails['last_pickup_date'])): ?>
                   <?=$this->transEsc('hold_available_until', ['%%date%%' => $ilsDetails['last_pickup_date']]) ?>
                 <?php else: ?>
@@ -173,7 +173,7 @@
                 <?php endif; ?>
               </p>
             <?php elseif (isset($ilsDetails['in_transit']) && $ilsDetails['in_transit']): ?>
-              <p class="text-success"><?=$this->transEsc('request_in_transit') . (is_string($ilsDetails['in_transit']) ? ': ' . $this->transEsc('institution_' . $ilsDetails['in_transit'], [], $ilsDetails['in_transit']) : '') ?></p>
+              <p class="text-success" aria-live="polite"><?=$this->transEsc('request_in_transit') . (is_string($ilsDetails['in_transit']) ? ': ' . $this->transEsc('institution_' . $ilsDetails['in_transit'], [], $ilsDetails['in_transit']) : '') ?></p>
             <?php elseif (isset($ilsDetails['position'])): ?>
               <p><strong><?=$this->transEsc("hold_queue_position") ?>:</strong> <?=$this->escapeHtml($ilsDetails['position']) ?></p>
             <?php endif; ?>
-- 
GitLab