From 9de903f867d03cb9286808b7c0127b08e999f832 Mon Sep 17 00:00:00 2001 From: tykayn Date: Mon, 21 Mar 2022 12:26:45 +0100 Subject: [PATCH] :gears: RGAA skip links shown on keyboard nav --- src/app/app-routing.module.ts | 7 +++++- src/app/app.module.ts | 10 -------- .../steps/step-five/step-five.component.html | 4 ++-- .../steps/step-four/step-four.component.html | 2 +- .../steps/step-one/step-one.component.html | 2 +- .../step-seven/step-seven.component.html | 2 +- .../steps/step-six/step-six.component.html | 2 +- .../step-three/step-three.component.html | 2 +- .../steps/step-two/step-two.component.html | 2 +- .../nav-steps/nav-steps.component.html | 3 ++- .../stepper/stepper.component.html | 1 + .../stepper/stepper.component.ts | 2 ++ .../rgaa/skip-links/skip-links.component.html | 14 +++++++++++ .../rgaa/skip-links/skip-links.component.scss | 21 ++++++++++++++++ .../skip-links/skip-links.component.spec.ts | 24 +++++++++++++++++++ .../rgaa/skip-links/skip-links.component.ts | 14 +++++++++++ src/app/shared/shared.module.ts | 5 ++-- src/assets/i18n/en.json | 6 ++++- src/assets/i18n/fr.json | 6 ++++- 19 files changed, 105 insertions(+), 24 deletions(-) create mode 100644 src/app/features/shared/components/rgaa/skip-links/skip-links.component.html create mode 100644 src/app/features/shared/components/rgaa/skip-links/skip-links.component.scss create mode 100644 src/app/features/shared/components/rgaa/skip-links/skip-links.component.spec.ts create mode 100644 src/app/features/shared/components/rgaa/skip-links/skip-links.component.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4a0e9f19..d4f4d1bf 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -3,7 +3,12 @@ import { RouterModule } from '@angular/router'; import { routes } from './routes-framadate'; @NgModule({ - imports: [RouterModule.forRoot(routes, { useHash: true })], + imports: [ + RouterModule.forRoot(routes, { + useHash: true, + anchorScrolling: 'enabled', + }), + ], exports: [RouterModule], }) export class AppRoutingModule {} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 545d81c6..0b256d14 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -29,19 +29,9 @@ import { CipheringComponent } from './features/shared/components/ui/static-pages import { ErrorsListComponent } from './features/shared/components/ui/form/errors-list/errors-list.component'; import { KeyboardShortcutsModule } from 'ng-keyboard-shortcuts'; import { AdministrationModule } from './features/administration/administration.module'; -import { EditComponent } from './features/consultation/edit/edit.component'; import { ChoiceButtonDinumComponent } from './features/shared/components/choice-button-dinum/choice-button-dinum.component'; import { StaticPagesComponent } from './features/shared/static-pages/static-pages.component'; -// register languages files for translation -// import localeEn from '@angular/common/locales/en'; -// import localeFr from '@angular/common/locales/fr'; -// import localeEs from '@angular/common/locales/es'; -// // code for locale are listed by the ISO-639 -// registerLocaleData(localeFr, 'fr-FR'); -// registerLocaleData(localeEn, 'en-EN'); -// registerLocaleData(localeEs, 'ca-ES'); - export class MyMissingTranslationHandler implements MissingTranslationHandler { public handle(params: MissingTranslationHandlerParams): string { return `MISSING TRANSLATION FOR [${params.key}]`; diff --git a/src/app/features/administration/form/steps/step-five/step-five.component.html b/src/app/features/administration/form/steps/step-five/step-five.component.html index 164325b8..ea1c055d 100644 --- a/src/app/features/administration/form/steps/step-five/step-five.component.html +++ b/src/app/features/administration/form/steps/step-five/step-five.component.html @@ -1,10 +1,10 @@ - +
-

+

{{ 'advanced.title' | translate }}

diff --git a/src/app/features/administration/form/steps/step-four/step-four.component.html b/src/app/features/administration/form/steps/step-four/step-four.component.html index 08ec013e..3f558e0b 100644 --- a/src/app/features/administration/form/steps/step-four/step-four.component.html +++ b/src/app/features/administration/form/steps/step-four/step-four.component.html @@ -4,7 +4,7 @@

-

+

{{ 'hours.title' | translate }}

diff --git a/src/app/features/administration/form/steps/step-one/step-one.component.html b/src/app/features/administration/form/steps/step-one/step-one.component.html index 55070fe2..91080143 100644 --- a/src/app/features/administration/form/steps/step-one/step-one.component.html +++ b/src/app/features/administration/form/steps/step-one/step-one.component.html @@ -2,7 +2,7 @@
-

+

{{ 'creation.choose_title' | translate }}

diff --git a/src/app/features/administration/form/steps/step-seven/step-seven.component.html b/src/app/features/administration/form/steps/step-seven/step-seven.component.html index 78b94e2f..322e2863 100644 --- a/src/app/features/administration/form/steps/step-seven/step-seven.component.html +++ b/src/app/features/administration/form/steps/step-seven/step-seven.component.html @@ -1,6 +1,6 @@
-

+

{{ 'resume.title' | translate }}

diff --git a/src/app/features/administration/form/steps/step-six/step-six.component.html b/src/app/features/administration/form/steps/step-six/step-six.component.html index 2853b974..cbd17b65 100644 --- a/src/app/features/administration/form/steps/step-six/step-six.component.html +++ b/src/app/features/administration/form/steps/step-six/step-six.component.html @@ -2,7 +2,7 @@

-

+

{{ 'owner.title' | translate }}

-

+

{{ 'dates.title' | translate }}

diff --git a/src/app/features/administration/form/steps/step-two/step-two.component.html b/src/app/features/administration/form/steps/step-two/step-two.component.html index 0b42e717..3b2dc2c7 100644 --- a/src/app/features/administration/form/steps/step-two/step-two.component.html +++ b/src/app/features/administration/form/steps/step-two/step-two.component.html @@ -3,7 +3,7 @@
-

+

{{ 'creation.want' | translate }}

diff --git a/src/app/features/administration/nav-steps/nav-steps.component.html b/src/app/features/administration/nav-steps/nav-steps.component.html index 6a2441f8..ca9c452d 100644 --- a/src/app/features/administration/nav-steps/nav-steps.component.html +++ b/src/app/features/administration/nav-steps/nav-steps.component.html @@ -2,15 +2,16 @@
-