diff --git a/themes/finc/scss/_customVariables.scss b/themes/finc/scss/_customVariables.scss index 6124798b435603b6e67d6ec0c167ec8beaed653c..8decbf465c9a619da5f338629910fac5b7df87fe 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 77d229a3f89175068aad123f9c5206e21cfc1ebb..97fe1b1dafcfbb2f50493eb74bbc970538b62570 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 853eeeb0ce6cb54682cf0e674414d7f172467693..f35c5a4999d500b2faaf7239547edafb173e6fff 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; ?>