Skip to content

Commit 4545b53

Browse files
Fixed Edit Item Bitstream showing empty buttons when css is turned off & replaced authentication dropdown menu link with button
- Also fixed box-shadows not working the same way for all footer buttons/links
1 parent ff6dff7 commit 4545b53

4 files changed

Lines changed: 28 additions & 7 deletions

File tree

src/app/footer/footer.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ <h5 class="text-uppercase">Footer Content</h5>
6969
</button>
7070
</li>
7171
<li *ngIf="showPrivacyPolicy">
72-
<a class="text-white"
72+
<a class="btn text-white"
7373
routerLink="info/privacy">{{ 'footer.link.privacy-policy' | translate}}</a>
7474
</li>
7575
<li *ngIf="showEndUserAgreement">
76-
<a class="text-white"
76+
<a class="btn text-white"
7777
routerLink="info/end-user-agreement">{{ 'footer.link.end-user-agreement' | translate}}</a>
7878
</li>
7979
<li *ngIf="showSendFeedback$ | async">
80-
<a class="text-white"
80+
<a class="btn text-white"
8181
routerLink="info/feedback">{{ 'footer.link.feedback' | translate}}</a>
8282
</li>
8383
</ul>

src/app/footer/footer.component.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@
3030
padding: 0 calc(var(--bs-spacer) / 2);
3131
color: inherit;
3232
font-size: .875em;
33+
34+
&:focus {
35+
box-shadow: none;
36+
text-decoration: underline;
37+
}
38+
39+
&:focus-visible {
40+
box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.5);
41+
}
3342
}
3443

3544
&:not(:last-child) {

src/app/shared/auth-nav-menu/auth-nav-menu.component.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<li *ngIf="!(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item"
33
(click)="$event.stopPropagation();">
44
<div ngbDropdown #loginDrop display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
5-
<a href="javascript:void(0);" class="dropdownLogin px-0.5" [attr.aria-label]="'nav.login' |translate"
5+
<button class="btn btn-link dropdownLogin px-0.5" [attr.aria-label]="'nav.login' |translate"
66
(click)="$event.preventDefault()" [attr.data-test]="'login-menu' | dsBrowserOnly"
7-
ngbDropdownToggle>{{ 'nav.login' | translate }}</a>
7+
ngbDropdownToggle>
8+
{{ 'nav.login' | translate }}
9+
</button>
810
<div class="loginDropdownMenu" [ngClass]="{'pl-3 pr-3': (loading | async)}" ngbDropdownMenu
911
[attr.aria-label]="'nav.login' | translate">
1012
<ds-themed-log-in
@@ -19,8 +21,9 @@
1921
</li>
2022
<li *ngIf="(isAuthenticated | async) && !(isXsOrSm$ | async) && (showAuth | async)" class="nav-item">
2123
<div ngbDropdown display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
22-
<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>
23-
<i class="fas fa-user-circle fa-lg fa-fw"></i></a>
24+
<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>
25+
<i class="fas fa-user-circle fa-lg fa-fw"></i>
26+
</button>
2427
<div class="logoutDropdownMenu" ngbDropdownMenu [attr.aria-label]="'nav.user-profile-menu-and-logout' |translate">
2528
<ds-themed-user-menu></ds-themed-user-menu>
2629
</div>

src/app/shared/auth-nav-menu/auth-nav-menu.component.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,12 @@
1919
color: var(--ds-header-icon-color-hover);
2020
}
2121
}
22+
23+
.dropdownLogin, .dropdownLogout {
24+
&:not(:focus-visible).active,
25+
&:not(:focus-visible):active,
26+
&:not(:focus-visible).active:focus,
27+
&:not(:focus-visible):active:focus {
28+
box-shadow: unset;
29+
}
30+
}

0 commit comments

Comments
 (0)