diff --git a/src/app/accessibility/accessibility-settings.service.ts b/src/app/accessibility/accessibility-settings.service.ts index 97c4e479aa..c9d8a38a6d 100644 --- a/src/app/accessibility/accessibility-settings.service.ts +++ b/src/app/accessibility/accessibility-settings.service.ts @@ -1,6 +1,7 @@ import { Inject, Injectable, + Optional, } from '@angular/core'; import cloneDeep from 'lodash/cloneDeep'; import { @@ -88,7 +89,7 @@ export class AccessibilitySettingsService { protected cookieService: CookieService, protected authService: AuthService, protected ePersonService: EPersonDataService, - protected orejimeService: OrejimeService, + @Optional() protected orejimeService: OrejimeService, @Inject(APP_CONFIG) protected appConfig: AppConfig, ) { } @@ -242,6 +243,10 @@ export class AccessibilitySettingsService { * Emits 'failed' when setting in a cookie failed due to the cookie not being accepted, 'cookie' when it succeeded. */ setSettingsInCookie(settings: AccessibilitySettings): Observable<'cookie' | 'failed'> { + if (hasNoValue(this.orejimeService)) { + return of('failed'); + } + return this.orejimeService.getSavedPreferences().pipe( map(preferences => preferences.accessibility), map((accessibilityCookieAccepted: boolean) => { diff --git a/src/app/footer/footer.component.html b/src/app/footer/footer.component.html index f715945e3c..e4937aa6e3 100644 --- a/src/app/footer/footer.component.html +++ b/src/app/footer/footer.component.html @@ -68,6 +68,10 @@ {{ 'footer.link.cookies' | translate}} +
  • + {{ 'footer.link.accessibility' | translate }} +
  • {{ 'footer.link.privacy-policy' | translate}} @@ -80,10 +84,6 @@ {{ 'footer.link.feedback' | translate}}
  • -
  • - {{ 'footer.link.accessibility' | translate }} -
  • diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index a6c68df611..bc8e494a28 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -2146,7 +2146,7 @@ "info.accessibility-settings.liveRegionTimeOut.label": "ARIA Live region time out (in seconds)", - "info.accessibility-settings.liveRegionTimeOut.hint": "The duration after which a message in the ARIA live region disappears. ARIA live regions are not visible on the page, but proivde announcements of notifications (or other actions) to screen readers.", + "info.accessibility-settings.liveRegionTimeOut.hint": "The duration after which a message in the ARIA live region disappears. ARIA live regions are not visible on the page, but provide announcements of notifications (or other actions) to screen readers.", "info.accessibility-settings.liveRegionTimeOut.invalid": "Live region time out must be greater than 0",