Skip to content

Commit

Permalink
Fixed Edit Item Bitstream showing empty buttons when css is turned of…
Browse files Browse the repository at this point in the history
…f & replaced authentication dropdown menu link with button

- Also fixed box-shadows not working the same way for all footer buttons/links
  • Loading branch information
alexandrevryghem committed Dec 6, 2023
1 parent ff6dff7 commit 4545b53
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ <h5 class="text-uppercase">Footer Content</h5>
</button>
</li>
<li *ngIf="showPrivacyPolicy">
<a class="text-white"
<a class="btn text-white"
routerLink="info/privacy">{{ 'footer.link.privacy-policy' | translate}}</a>
</li>
<li *ngIf="showEndUserAgreement">
<a class="text-white"
<a class="btn text-white"
routerLink="info/end-user-agreement">{{ 'footer.link.end-user-agreement' | translate}}</a>
</li>
<li *ngIf="showSendFeedback$ | async">
<a class="text-white"
<a class="btn text-white"
routerLink="info/feedback">{{ 'footer.link.feedback' | translate}}</a>
</li>
</ul>
Expand Down
9 changes: 9 additions & 0 deletions src/app/footer/footer.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
padding: 0 calc(var(--bs-spacer) / 2);
color: inherit;
font-size: .875em;

&:focus {
box-shadow: none;
text-decoration: underline;
}

&:focus-visible {
box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.5);
}
}

&:not(:last-child) {
Expand Down
11 changes: 7 additions & 4 deletions src/app/shared/auth-nav-menu/auth-nav-menu.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<li *ngIf="!(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item"
(click)="$event.stopPropagation();">
<div ngbDropdown #loginDrop display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
<a href="javascript:void(0);" class="dropdownLogin px-0.5" [attr.aria-label]="'nav.login' |translate"
<button class="btn btn-link dropdownLogin px-0.5" [attr.aria-label]="'nav.login' |translate"
(click)="$event.preventDefault()" [attr.data-test]="'login-menu' | dsBrowserOnly"
ngbDropdownToggle>{{ 'nav.login' | translate }}</a>
ngbDropdownToggle>
{{ 'nav.login' | translate }}
</button>
<div class="loginDropdownMenu" [ngClass]="{'pl-3 pr-3': (loading | async)}" ngbDropdownMenu
[attr.aria-label]="'nav.login' | translate">
<ds-themed-log-in
Expand All @@ -19,8 +21,9 @@
</li>
<li *ngIf="(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item">
<div ngbDropdown display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
<a href="javascript:void(0);" role="button" [attr.aria-label]="'nav.user-profile-menu-and-logout' |translate" (click)="$event.preventDefault()" [title]="'nav.user-profile-menu-and-logout' | translate" class="dropdownLogout px-1" [attr.data-test]="'user-menu' | dsBrowserOnly" ngbDropdownToggle>
<i class="fas fa-user-circle fa-lg fa-fw"></i></a>
<button role="button" [attr.aria-label]="'nav.user-profile-menu-and-logout' |translate" (click)="$event.preventDefault()" [title]="'nav.user-profile-menu-and-logout' | translate" class="btn btn-link dropdownLogout px-1" [attr.data-test]="'user-menu' | dsBrowserOnly" ngbDropdownToggle>
<i class="fas fa-user-circle fa-lg fa-fw"></i>
</button>
<div class="logoutDropdownMenu" ngbDropdownMenu [attr.aria-label]="'nav.user-profile-menu-and-logout' |translate">
<ds-themed-user-menu></ds-themed-user-menu>
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/app/shared/auth-nav-menu/auth-nav-menu.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@
color: var(--ds-header-icon-color-hover);
}
}

.dropdownLogin, .dropdownLogout {
&:not(:focus-visible).active,
&:not(:focus-visible):active,
&:not(:focus-visible).active:focus,
&:not(:focus-visible):active:focus {
box-shadow: unset;
}
}

0 comments on commit 4545b53

Please sign in to comment.