diff --git a/src/app/admin/components/manage-jobs/attached-users/attached-users.component.html b/src/app/admin/components/manage-jobs/attached-users/attached-users.component.html index 79877cac0ab7c1eb696546681aa1d23945ca5ed9..55e61d2fd1baa93608f24d2ba0ef271ffc816c5a 100644 --- a/src/app/admin/components/manage-jobs/attached-users/attached-users.component.html +++ b/src/app/admin/components/manage-jobs/attached-users/attached-users.component.html @@ -1,6 +1,6 @@ <div *ngIf="users.data.users && users.data.users.length !== 0"> <p *ngFor="let user of users.data.users"> - <span tabindex="0" (click)="goToManageUsers()" (keyup.enter)="goToManageUsers()"> + <span role="button" tabindex="0" (click)="goToManageUsers()" (keyup.enter)="goToManageUsers()"> {{ user.name }} {{ user.surname }} - {{ user.email }} </span> </p> diff --git a/src/app/admin/components/manage-users/manage-users.component.html b/src/app/admin/components/manage-users/manage-users.component.html index 4549c91f7be2d097398a88cf44b24f88e768bf6d..2dd43a6928cc8e3f6c05094a7cda542dde86f32b 100644 --- a/src/app/admin/components/manage-users/manage-users.component.html +++ b/src/app/admin/components/manage-users/manage-users.component.html @@ -25,7 +25,7 @@ <h3 *ngIf="unAttachedUsers" class="title inline"> Utilisateurs non rattachés ({{ unAttachedUsers.length }}) - <app-button [label]="'Exporter'" [variant]="'tertiary'" [size]="'small'" (click)="exportUsers('unattached')" /> + <app-button [label]="'Exporter'" [variant]="'tertiary'" [size]="'small'" (action)="exportUsers('unattached')" /> </h3> <ag-grid-angular @@ -44,7 +44,7 @@ <h3 *ngIf="attachedUsers" class="title inline"> Utilisateurs rattachés ({{ attachedUsers.length }}) - <app-button [label]="'Exporter'" [variant]="'tertiary'" [size]="'small'" (click)="exportUsers('attached')" /> + <app-button [label]="'Exporter'" [variant]="'tertiary'" [size]="'small'" (action)="exportUsers('attached')" /> </h3> <ag-grid-angular *ngIf="validatedJobs && validatedEmployers" diff --git a/src/app/admin/components/nav-bar/nav-bar.component.html b/src/app/admin/components/nav-bar/nav-bar.component.html index f077ae671a5984e89d00d79a23e34af492139e0d..994a22f5cf58021a64dd3b966164f8b2f825fc55 100644 --- a/src/app/admin/components/nav-bar/nav-bar.component.html +++ b/src/app/admin/components/nav-bar/nav-bar.component.html @@ -4,34 +4,34 @@ <app-button [label]="'Revendication structure'" [variant]="'secondary'" - (click)="router.navigateByUrl(routes.pendingStructures.link)" + (action)="router.navigateByUrl(routes.pendingStructures.link)" /> <app-button [label]="'Liste structures'" [variant]="'secondary'" - (click)="router.navigateByUrl(routes.structuresList.link)" + (action)="router.navigateByUrl(routes.structuresList.link)" /> <app-button [label]="'Structures supprimées'" [variant]="'secondary'" - (click)="router.navigateByUrl(routes.deletedStructures.link)" + (action)="router.navigateByUrl(routes.deletedStructures.link)" /> <app-button [label]="'Gestion des utilisateurs'" [variant]="'secondary'" - (click)="router.navigateByUrl(routes.manageUsers.link)" + (action)="router.navigateByUrl(routes.manageUsers.link)" /> <app-button [label]="'Fonctions'" [variant]="'secondary'" (click)="router.navigateByUrl(routes.jobsList.link)" /> <app-button [label]="'Employeurs'" [variant]="'secondary'" - (click)="router.navigateByUrl(routes.employersList.link)" + (action)="router.navigateByUrl(routes.employersList.link)" /> <app-button [label]="'CNFS Espace Coop'" [variant]="'secondary'" - (click)="router.navigateByUrl(routes.espaceCoopCNFS.link)" + (action)="router.navigateByUrl(routes.espaceCoopCNFS.link)" /> - <app-button [variant]="'tertiary'" [label]="'Ghost'" (click)="openGhost()" /> + <app-button [variant]="'tertiary'" [label]="'Ghost'" (action)="openGhost()" /> </nav> </header> diff --git a/src/app/annuaire/filter-modal/filter-modal.component.html b/src/app/annuaire/filter-modal/filter-modal.component.html index e25bf4cb1be1d60a38b5d0a2cc18058e9f108b65..5031c5b066464b4fa47cd546d7e4c959b3baa6ee 100644 --- a/src/app/annuaire/filter-modal/filter-modal.component.html +++ b/src/app/annuaire/filter-modal/filter-modal.component.html @@ -12,8 +12,8 @@ </div> <div class="modalFooter"> - <app-button [variant]="'secondary'" [label]="'Effacer'" (click)="clearFilters()" /> - <app-button [variant]="'primary'" [label]="'Appliquer'" (click)="onSubmitFilters()" /> + <app-button [variant]="'secondary'" [label]="'Effacer'" (action)="clearFilters()" /> + <app-button [variant]="'primary'" [label]="'Appliquer'" (action)="onSubmitFilters()" /> </div> </div> </div> diff --git a/src/app/annuaire/result-list/result-list.component.html b/src/app/annuaire/result-list/result-list.component.html index 0b198da379a9c7bf7f41324b307ef359b620d67e..f24005c54bf250848f9d6531e7264919b5fa4d76 100644 --- a/src/app/annuaire/result-list/result-list.component.html +++ b/src/app/annuaire/result-list/result-list.component.html @@ -30,7 +30,6 @@ <p class="noResult">Aucun résultat ne correspond à vos filtres</p> <p class="filtersInfo">Merci de réinitialiser ou modifier les filtres afin d'élargir votre recherche</p> <app-button - tabindex="0" [variant]="'primary'" [wide]="true" [label]="'Réinitialiser les filtres'" diff --git a/src/app/contact/contact.component.html b/src/app/contact/contact.component.html index 3f0f49a0d6b10ba0bb3bd0f6b54a6460c488b67e..0b76199a2383159518a8eeedbed01856fd89361a 100644 --- a/src/app/contact/contact.component.html +++ b/src/app/contact/contact.component.html @@ -48,7 +48,7 @@ /> <div class="buttons"> - <app-button [variant]="'secondary'" [label]="'Annuler'" [routerLink]="'/home'" /> + <app-button [variant]="'secondary'" [label]="'Annuler'" (action)="goToHome()" /> <app-button [type]="'submit'" [variant]="'primary'" diff --git a/src/app/contact/contact.component.ts b/src/app/contact/contact.component.ts index 1e1231ad352dd4c841d7d160ed808c170660ed3d..eb9b1c73cc5d10ae54c5bb424b0e9625b4baaebc 100644 --- a/src/app/contact/contact.component.ts +++ b/src/app/contact/contact.component.ts @@ -57,6 +57,10 @@ export class ContactComponent implements OnInit { return this.authService.getUserEmailDisplay(); } + public goToHome(): void { + this.router.navigateByUrl('/home'); + } + public onSubmit(): void { this.loading = true; diff --git a/src/app/form/form-view/global-components/information-step/information-step.component.html b/src/app/form/form-view/global-components/information-step/information-step.component.html index 7dd1b5176502db8014c72736cf3a1349bb8e2816..5f564df4e862c908f3df0ebe926958aebb977918 100644 --- a/src/app/form/form-view/global-components/information-step/information-step.component.html +++ b/src/app/form/form-view/global-components/information-step/information-step.component.html @@ -6,7 +6,7 @@ <h3>Un email vous a été envoyé afin de finaliser votre inscription</h3> </div> <div class="btnContainer"> - <app-button [variant]="'primary'" [wide]="true" [label]="'Terminer'" (click)="goToHome()" /> + <app-button [variant]="'primary'" [wide]="true" [label]="'Terminer'" (action)="goToHome()" /> </div> </ng-container> @@ -18,8 +18,8 @@ </div> <div class="btnContainer"> <div class="btnGroup"> - <app-button [label]="'Plus tard'" [variant]="'secondary'" (click)="goToHome()" /> - <app-button [label]="'C\'est parti !'" [variant]="'primary'" (click)="goToNextPage()" /> + <app-button [label]="'Plus tard'" [variant]="'secondary'" (action)="goToHome()" /> + <app-button [label]="'C\'est parti !'" [variant]="'primary'" (action)="goToNextPage()" /> </div> </div> </ng-container> @@ -77,7 +77,7 @@ </p> </div> <div class="btnContainer"> - <app-button [variant]="'primary'" [wide]="true" [label]="'J\'ai compris'" (click)="goBackProfile()" /> + <app-button [variant]="'primary'" [wide]="true" [label]="'J\'ai compris'" (action)="goBackProfile()" /> </div> </ng-container> @@ -90,7 +90,7 @@ <h3>Merci, les informations de votre profil ont été mises à jour</h3> </div> <div class="btnContainer"> - <app-button [variant]="'primary'" [wide]="true" [label]="'Voir mon compte'" (click)="goBackProfile()" /> + <app-button [variant]="'primary'" [wide]="true" [label]="'Voir mon compte'" (action)="goBackProfile()" /> </div> </ng-container> </div> diff --git a/src/app/form/form-view/profile-form/profile-employer-selection/profile-employer-selection.component.html b/src/app/form/form-view/profile-form/profile-employer-selection/profile-employer-selection.component.html index 2863ff1d639c71c7ad76a80b5e49178e67617def..e49b6babab9a221a558aaf33fae290db573e6469 100644 --- a/src/app/form/form-view/profile-form/profile-employer-selection/profile-employer-selection.component.html +++ b/src/app/form/form-view/profile-form/profile-employer-selection/profile-employer-selection.component.html @@ -17,14 +17,15 @@ /> <div class="scroll"> <div *ngIf="!isAlreadySearching" class="autocomplete-items"> - <p + <div *ngFor="let employer of employers" + role="button" tabindex="0" (click)="selectedResult(employer)" (keyup.enter)="selectedResult(employer)" > - {{ employer.name }} - </p> + <p>{{ employer.name }}</p> + </div> </div> </div> </div> diff --git a/src/app/form/form-view/profile-form/profile-structure-choice/profile-structure-choice.component.html b/src/app/form/form-view/profile-form/profile-structure-choice/profile-structure-choice.component.html index 872fe459bf5c864333b6c3cdf3d1f703f839f00b..9536fdca728092bc2ad1385fb1a6b017e37d0a85 100644 --- a/src/app/form/form-view/profile-form/profile-structure-choice/profile-structure-choice.component.html +++ b/src/app/form/form-view/profile-form/profile-structure-choice/profile-structure-choice.component.html @@ -20,6 +20,7 @@ <div class="structure-list"> <div *ngFor="let structure of structures" + role="button" tabindex="0" class="form-list" [ngClass]="{ diff --git a/src/app/form/form-view/structure-form/structure-equipments/structure-equipments.component.html b/src/app/form/form-view/structure-form/structure-equipments/structure-equipments.component.html index 4b5e67465cdf980e1606475431388d2558707b10..15bfe7d66e2dba182af8e3247db40ab249a229d7 100644 --- a/src/app/form/form-view/structure-form/structure-equipments/structure-equipments.component.html +++ b/src/app/form/form-view/structure-form/structure-equipments/structure-equipments.component.html @@ -18,7 +18,7 @@ [iconColor]="'currentColor'" [size]="'medium'" [disabled]="structureForm.value.nbComputers === 0" - (click)="changeValueHandler(equipment.module.id, -1)" + (action)="changeValueHandler(equipment.module.id, -1)" /> <input type="number" @@ -39,7 +39,7 @@ [iconColor]="'currentColor'" [size]="'medium'" [disabled]="structureForm.value.nbPrinters === 0" - (click)="changeValueHandler(equipment.module.id, -1)" + (action)="changeValueHandler(equipment.module.id, -1)" /> <input type="number" @@ -60,7 +60,7 @@ [iconColor]="'currentColor'" [size]="'medium'" [disabled]="structureForm.value.nbScanners === 0" - (click)="changeValueHandler(equipment.module.id, -1)" + (action)="changeValueHandler(equipment.module.id, -1)" /> <input type="number" @@ -79,7 +79,7 @@ [iconName]="'plus'" [iconColor]="'currentColor'" [size]="'medium'" - (click)="changeValueHandler(equipment.module.id, 1)" + (action)="changeValueHandler(equipment.module.id, 1)" /> </div> </div> diff --git a/src/app/form/orientation-form-view/global-components/structure-orientator/structure-orientator.component.html b/src/app/form/orientation-form-view/global-components/structure-orientator/structure-orientator.component.html index bd8c104fda9468e77d1ea38466418e27d4bac686..02c32a75404e6523c26c485994964e6834ce70ee 100644 --- a/src/app/form/orientation-form-view/global-components/structure-orientator/structure-orientator.component.html +++ b/src/app/form/orientation-form-view/global-components/structure-orientator/structure-orientator.component.html @@ -13,7 +13,7 @@ <div class="structures-section"> <p>Sélectionnez la structure de votre choix</p> - <div class="list-structures"> + <div role="list" class="list-structures"> <app-card *ngFor="let structure of structuresLinked" role="listitem" diff --git a/src/app/form/orientation-form-view/online-demarch/appointment/make-appointment/make-appointment.component.html b/src/app/form/orientation-form-view/online-demarch/appointment/make-appointment/make-appointment.component.html index 8b843e7ae17f1d831813a39ae66276ef71fe7aba..bb1cb5d3aefe0e43238ef551feee7c12969ec3ca 100644 --- a/src/app/form/orientation-form-view/online-demarch/appointment/make-appointment/make-appointment.component.html +++ b/src/app/form/orientation-form-view/online-demarch/appointment/make-appointment/make-appointment.component.html @@ -14,7 +14,7 @@ </div> <div class="picker-section"> <p>Sélectionnez un·e accompagnant·e numérique</p> - <div class="list-choices"> + <div role="list" class="list-choices"> <app-member-card *ngFor="let owner of owners" role="listitem" @@ -43,7 +43,7 @@ <div class="picker-section"> <p>Sélectionnez la structure de votre choix</p> - <div class="list-choices"> + <div role="list" class="list-choices"> <app-card *ngFor="let structure of structures" role="listitem" diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html index abf1a45d7772f3aa59cb0e66f167d5117435f128..8d2327992589581373b9bdab900ffce49adedc60 100644 --- a/src/app/header/header.component.html +++ b/src/app/header/header.component.html @@ -12,7 +12,14 @@ (keyup.enter)="openMenu()" /> </div> - <div class="logo clickable" aria-label="Retour accueil" role="button" routerLink="/home" tabindex="0"> + <div + class="logo clickable" + aria-label="Retour accueil" + role="button" + tabindex="0" + (click)="goToHome()" + (keyup.enter)="goToHome()" + > <img *ngIf="displayLogo(); else customTitle" class="logo-grand-lyon" @@ -219,8 +226,8 @@ <span class="name">{{ displayFullName }}</span> </div> <div class="profileMenuButtons"> - <app-button [variant]="'primaryBlack'" [label]="'Voir mon compte'" [size]="'small'" (click)="goToProfile()" /> - <app-button [label]="'Se déconnecter'" [variant]="'secondary'" [size]="'small'" (action)="logout()" /> + <app-button [variant]="'primaryBlack'" [label]="'Voir mon compte'" [size]="'small'" (action)="goToProfile()" /> + <app-button [variant]="'secondary'" [label]="'Se déconnecter'" [size]="'small'" (action)="logout()" /> </div> </div> </div> diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts index ce2af666559242027df3598bbf4127a69638d6d5..2c3ae29c336cf178cc55f827cdc2864707536042 100644 --- a/src/app/header/header.component.ts +++ b/src/app/header/header.component.ts @@ -54,6 +54,9 @@ export class HeaderComponent { public isActive(route: string): 'page' | '' { return this.router.url === route ? 'page' : ''; } + public goToHome(): void { + this.router.navigateByUrl('/home'); + } public goToProfile(): void { this.showProfileMenu = false; this.router.navigateByUrl('/profile'); diff --git a/src/app/newsletter-subscription/newsletter-subscription.component.html b/src/app/newsletter-subscription/newsletter-subscription.component.html index 202cb0faea4812278ae3b9f31e408f8c25d3b25e..ca7ff6703f9cfb71412c144ded66894d7475357c 100644 --- a/src/app/newsletter-subscription/newsletter-subscription.component.html +++ b/src/app/newsletter-subscription/newsletter-subscription.component.html @@ -17,7 +17,7 @@ <div class="actions"> <div class="buttons"> - <app-button [variant]="'secondary'" [label]="'Annuler'" [routerLink]="'/home'" /> + <app-button [variant]="'secondary'" [label]="'Annuler'" (action)="goToHome()" /> <app-button [variant]="'primary'" [label]="subscriptionMod ? 'S\'inscrire' : 'Se désinscrire'" diff --git a/src/app/newsletter-subscription/newsletter-subscription.component.ts b/src/app/newsletter-subscription/newsletter-subscription.component.ts index a069f34a35f58660f4f386fcd0fbb744af076d35..28c75a2ffc2db6ab7c740bb61a02bb7ce735a38a 100644 --- a/src/app/newsletter-subscription/newsletter-subscription.component.ts +++ b/src/app/newsletter-subscription/newsletter-subscription.component.ts @@ -88,4 +88,8 @@ export class NewsletterSubscriptionComponent implements OnInit { }); } } + + public goToHome(): void { + this.router.navigateByUrl('/home'); + } } diff --git a/src/app/post/components/post-card/post-card.component.html b/src/app/post/components/post-card/post-card.component.html index 85341967a8250ebe15d87fdb58456136c5fcf002..338b769c4e06bd51e183ab6c29c24e87fba057c4 100644 --- a/src/app/post/components/post-card/post-card.component.html +++ b/src/app/post/components/post-card/post-card.component.html @@ -1,11 +1,4 @@ -<div - *ngIf="post" - class="post" - tabindex="0" - role="listitem" - (click)="showDetails(post)" - (keyup.enter)="showDetails(post)" -> +<div *ngIf="post" class="post" tabindex="0" role="button" (click)="showDetails(post)" (keyup.enter)="showDetails(post)"> <div class="imageContainer"> <img *ngIf="post.feature_image" alt="{{ post.feature_image_alt }}" [src]="post.feature_image" /> <img diff --git a/src/app/post/components/post-header/post-header.component.html b/src/app/post/components/post-header/post-header.component.html index 153e928fba9097b8a05c596b2fd523273dc85dbf..b264a381fc8f763206e67c5f00a4d19c91101a26 100644 --- a/src/app/post/components/post-header/post-header.component.html +++ b/src/app/post/components/post-header/post-header.component.html @@ -4,19 +4,21 @@ <h2>du réseau d’inclusion numérique</h2> </header> - <div class="navigation"> - <nav> - <span + <nav> + <div role="tablist" class="navigation"> + <div *ngFor="let tag of tags.others" class="tag" + role="tab" tabindex="0" - role="listitem" [ngClass]="{ active: tag.slug === mainActiveTag.slug || tag.name === mainActiveTag.slug }" (click)="activateTag(tag)" (keydown.enter)="activateTag(tag)" > - {{ tag.name }} - </span> - </nav> - </div> + <span> + {{ tag.name }} + </span> + </div> + </div> + </nav> </div> diff --git a/src/app/post/components/post-header/post-header.component.scss b/src/app/post/components/post-header/post-header.component.scss index ec582e639d17319af21b847a688e63b6d7e103a2..8961971d4d50eea50fdb79afee6a5233c6d55289 100644 --- a/src/app/post/components/post-header/post-header.component.scss +++ b/src/app/post/components/post-header/post-header.component.scss @@ -14,17 +14,18 @@ header { } } -.navigation { +nav { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid $grey-4; - nav { + .navigation { display: flex; overflow-x: auto; white-space: nowrap; + .tag { cursor: pointer; user-select: none; diff --git a/src/app/post/components/post-list/post-list.component.html b/src/app/post/components/post-list/post-list.component.html index 18758c913f79a44b44f38bc49cbf424b3fc46a73..ab1b98b6502881ad36923a51628fdfef7c421969 100644 --- a/src/app/post/components/post-list/post-list.component.html +++ b/src/app/post/components/post-list/post-list.component.html @@ -5,7 +5,7 @@ </div> <div class="posts-container" role="list"> - <app-post-card *ngFor="let news of allPosts" class="col" [post]="news" /> + <app-post-card *ngFor="let news of allPosts" role="listitem" class="col" [post]="news" /> </div> <div *ngIf="isLoading" class="loader" aria-busy="true"> @@ -18,6 +18,6 @@ [variant]="'primaryBlack'" [label]="'Voir plus d\'actualités'" [wide]="true" - (click)="loadMore()" + (action)="loadMore()" /> </div> diff --git a/src/app/profile/edit/edit.component.html b/src/app/profile/edit/edit.component.html index 0ea7c9266055703b471d54990f91e6279c762d14..40109df17207a027a83d0169c4569232418a7d44 100644 --- a/src/app/profile/edit/edit.component.html +++ b/src/app/profile/edit/edit.component.html @@ -136,14 +136,15 @@ <div class="structureResults"> <div *ngIf="!isAlreadySearching" class="autocomplete-items"> - <p + <div *ngFor="let employer of employers" + role="button" tabindex="0" (click)="selectEmployer(employer)" (keyup.enter)="selectEmployer(employer)" > - {{ employer.name }} - </p> + <p>{{ employer.name }}</p> + </div> </div> </div> </div> diff --git a/src/app/profile/personal-offer-edition/personal-offer-edition.component.html b/src/app/profile/personal-offer-edition/personal-offer-edition.component.html index 45995a07e5cbb2b26d40de93bff63c96b6b4ef46..895ea56f9053b3207c76fbc3233a70c7872bfccb 100644 --- a/src/app/profile/personal-offer-edition/personal-offer-edition.component.html +++ b/src/app/profile/personal-offer-edition/personal-offer-edition.component.html @@ -29,6 +29,7 @@ <div class="navigation"> <span tabindex="0" + role="button" [ngClass]="{ tab: true, selected: currentTab === tabsEnum.onlineProcedures }" (click)="navigateTo(tabsEnum.onlineProcedures)" (keyup.enter)="navigateTo(tabsEnum.onlineProcedures)" @@ -37,6 +38,7 @@ </span> <span tabindex="0" + role="button" [ngClass]="{ tab: true, selected: currentTab === tabsEnum.digitalSkills }" (click)="navigateTo(tabsEnum.digitalSkills)" (keyup.enter)="navigateTo(tabsEnum.digitalSkills)" diff --git a/src/app/profile/profile-structure/personal-offer/personal-offer.component.html b/src/app/profile/profile-structure/personal-offer/personal-offer.component.html index c5c545d163d6fb92f0a15047c5ebdff87d07f253..4a2d4c50c6e00ce04e45d030f661a8c4f0344b18 100644 --- a/src/app/profile/profile-structure/personal-offer/personal-offer.component.html +++ b/src/app/profile/profile-structure/personal-offer/personal-offer.component.html @@ -4,21 +4,20 @@ <app-button *ngIf="!isPublic" class="hide-on-mobile" - [state]="{ structureName: this.structureName }" - routerLink="./edit-personal-offer/{{ this.personalOffer._id }}" [variant]="'secondary'" [label]="'Modifier mon offre'" [iconName]="'edit'" [size]="'small'" [wide]="true" + (action)="goToEditPersonalOffer()" /> <app-icon-button *ngIf="!isPublic" ariaLabel="Modifier mon offre" class="hide-on-desktop" - routerLink="./edit-personal-offer/{{ this.personalOffer._id }}" [variant]="'secondary'" [iconName]="'edit'" + (action)="goToEditPersonalOffer()" /> </div> <div class="content"> diff --git a/src/app/profile/profile-structure/personal-offer/personal-offer.component.ts b/src/app/profile/profile-structure/personal-offer/personal-offer.component.ts index 9c6a10a7a1467c623569269fd52a702eda72e916..526d64fc4c253615e50a32b770a1d0a33721137b 100644 --- a/src/app/profile/profile-structure/personal-offer/personal-offer.component.ts +++ b/src/app/profile/profile-structure/personal-offer/personal-offer.component.ts @@ -1,4 +1,5 @@ import { Component, Input } from '@angular/core'; +import { Router } from '@angular/router'; import { PersonalOffer } from './../../../models/personalOffer.model'; @Component({ @@ -10,4 +11,12 @@ export class PersonalOfferComponent { @Input() public personalOffer: PersonalOffer; @Input() public isPublic: boolean; @Input() public structureName?: string; + + constructor(private router: Router) {} + + public goToEditPersonalOffer(): void { + this.router.navigateByUrl(`/profile/edit-personal-offer/${this.personalOffer._id}`, { + state: { structureName: this.structureName }, + }); + } } diff --git a/src/app/profile/profile-structure/profile-structure.component.html b/src/app/profile/profile-structure/profile-structure.component.html index d32bc5cbfc6bb34968e62a6e90a2b88293f2be12..99411c79a4c04a508669d5e660b2ff906e258c7f 100644 --- a/src/app/profile/profile-structure/profile-structure.component.html +++ b/src/app/profile/profile-structure/profile-structure.component.html @@ -33,7 +33,7 @@ [variant]="'secondary'" [label]="'Annuler la demande'" [size]="'small'" - (click)="handleCancelJoin(structure._id); $event.stopPropagation()" + (action)="handleCancelJoin(structure._id); $event.stopPropagation()" /> </div> </div> @@ -45,46 +45,36 @@ <div class="sectionButtons"> <app-button class="hide-on-mobile" - routerLink="./" - tabindex="none" - [routerLinkActive]="'active'" [variant]="'secondary'" [label]="'Voir la structure'" [iconFolder]="'form'" [iconName]="'visibility'" [size]="'small'" - [queryParams]="{ id: structure._id }" + (action)="goToDetail()" /> <app-icon-button ariaLabel="Voir la structure" class="hide-on-desktop" - routerLink="./" - tabindex="none" - [routerLinkActive]="'active'" [variant]="'secondary'" [iconFolder]="'form'" [iconName]="'visibility'" - [queryParams]="{ id: structure._id }" + (action)="goToDetail()" /> <app-button *ngIf="!isPublic && !isPending" class="hide-on-mobile" - tabindex="none" - routerLink="./edit-structure/{{ structure._id }}" - [routerLinkActive]="'active'" [variant]="isValid() ? 'primaryBlack' : 'primaryWarning'" [label]="'Modifier la structure'" [size]="'small'" + (action)="goToEditStructure()" /> <app-icon-button *ngIf="!isPublic && !isPending" ariaLabel="Modifier la structure" class="hide-on-desktop" - tabindex="none" - routerLink="./edit-structure/{{ structure._id }}" - [routerLinkActive]="'active'" [variant]="isValid() ? 'primaryBlack' : 'primaryWarning'" [iconName]="'edit'" + (action)="goToEditStructure()" /> </div> </div> @@ -116,23 +106,20 @@ <app-button *ngIf="!isPublic && !isPending" class="hide-on-mobile" - routerLink="./structure-members-management/{{ structure._id }}" - [routerLinkActive]="'active'" [variant]="'primaryBlack'" [label]="'Gérer les membres'" [iconName]="'edit'" [size]="'small'" [wide]="true" + (action)="goToStructureMembersManagement()" /> <app-icon-button *ngIf="!isPublic && !isPending" ariaLabel="Gérer les membres" class="hide-on-desktop" - routerLink="./structure-members-management/{{ structure._id }}" - [routerLinkActive]="'active'" [variant]="'secondary'" [iconName]="'edit'" - [queryParams]="{ id: structure._id }" + (action)="goToStructureMembersManagement()" /> </div> <div *ngIf="membersWithJobWithPO.length > 0" class="sectionContent members"> @@ -154,7 +141,6 @@ class="call-to-action" > <app-button - [routerLinkActive]="'active'" [variant]="'primaryBlack'" [label]="'Ajouter une offre'" [iconName]="'plus'" diff --git a/src/app/profile/profile-structure/profile-structure.component.ts b/src/app/profile/profile-structure/profile-structure.component.ts index 47d9a0a49f14673d8ffafc6dbf6524acd353893c..cf36739743df94a66b9d38dfa07f8082253f4118 100644 --- a/src/app/profile/profile-structure/profile-structure.component.ts +++ b/src/app/profile/profile-structure/profile-structure.component.ts @@ -1,8 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { FormGroup } from '@angular/forms'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { DateTime } from 'luxon'; -import { structureFormStep } from '../../form/form-view/structure-form/structureFormStep.enum'; import { Structure } from '../../models/structure.model'; import { StructureWithOwners } from '../../models/structureWithOwners.model'; import { CollapseType } from '../../shared/components/collapse/collapse.type'; @@ -34,6 +33,7 @@ export class ProfileStructureComponent implements OnInit { public personalOffer: PersonalOffer; constructor( + private route: ActivatedRoute, private router: Router, private userService: UserService, private searchService: SearchService, @@ -78,12 +78,21 @@ export class ProfileStructureComponent implements OnInit { public goBack(): void { history.back(); } - public goToEdit(step: structureFormStep): void { - this.router.navigate(['/form/structure', this.structureWithOwners.structure._id, structureFormStep[step]]); + public goToHome(): void { + this.router.navigateByUrl('/home'); + } + public goToDetail(): void { + this.router.navigate(['/profile'], { queryParams: { id: this.structure._id } }); } public goToOffer(): void { this.router.navigate(['/form/personaloffer'], { state: { structure: this.structure } }); } + public goToEditStructure(): void { + this.router.navigateByUrl(`/profile/edit-structure/${this.structure._id}`); + } + public goToStructureMembersManagement(): void { + this.router.navigateByUrl(`/profile/structure-members-management/${this.structure._id}`); + } public isValid(): boolean { return this.structureForm.valid; } diff --git a/src/app/profile/profile.component.html b/src/app/profile/profile.component.html index 5e7c91a9f9daefab481ca89f0bd4858ed68734d5..60b1b15c177a84a0aae23e812b9adbec9a28dfd8 100644 --- a/src/app/profile/profile.component.html +++ b/src/app/profile/profile.component.html @@ -9,37 +9,30 @@ <app-button *ngIf="isPublic && userProfile.withAppointment" class="hide-on-mobile rdv" - tabindex="none" - [routerLink]="['/orientation']" - [state]="{ rdvUser: userProfile }" - [routerLinkActive]="'active'" [variant]="'primaryBlack'" [label]="'Demander un RDV'" [iconName]="'calendar'" [size]="'small'" [wide]="true" + (action)="goToOrientation()" /> <app-button *ngIf="!isPublic" class="hide-on-mobile" - tabindex="none" - routerLink="/profile/edit" - [routerLinkActive]="'active'" [variant]="'primaryBlack'" [label]="'Modifier mon profil'" [iconName]="'edit'" [size]="'small'" [wide]="true" + (action)="goToProfileEdit()" /> <app-icon-button *ngIf="!isPublic" ariaLabel="Modifier mon profil" class="hide-on-desktop" - tabindex="none" - routerLink="/profile/edit" - [routerLinkActive]="'active'" [variant]="'primaryBlack'" [iconName]="'edit'" + (action)="goToProfileEdit()" /> </div> <div class="profile"> @@ -70,15 +63,12 @@ <app-button *ngIf="!isPublic && !userProfile.description" class="centerButton" - tabindex="none" - routerLink="/profile/edit" - [routerLinkActive]="'active'" - [state]="{ data: 'description' }" [variant]="'secondary'" [label]="'Ajouter une description'" [iconName]="'plus'" [size]="'small'" [wide]="true" + (action)="goToProfileEdit('description')" /> </section> @@ -93,24 +83,20 @@ <app-button *ngIf="userProfile.structuresLink.length > 0" class="hide-on-mobile" - routerLink="./structures-management" - tabindex="none" - [routerLinkActive]="'active'" [iconName]="'edit'" [variant]="'primaryBlack'" [label]="'Gérer mes structures'" [size]="'small'" [wide]="true" + (action)="goToStructuresManagement()" /> <app-icon-button *ngIf="userProfile.structuresLink.length > 0" ariaLabel="Gérer mes structures" class="hide-on-desktop" - tabindex="none" - routerLink="./structures-management" - [routerLinkActive]="'active'" [variant]="'primaryBlack'" [iconName]="'edit'" + (action)="goToStructuresManagement()" /> </div> <div @@ -136,13 +122,12 @@ </div> <app-button class="centerButton" - tabindex="none" - routerLink="/form/structure" [variant]="'secondary'" [label]="'Ajouter une structure'" [iconName]="'plus'" [size]="'small'" [wide]="true" + (action)="goToFormStructure()" /> </section> diff --git a/src/app/profile/profile.component.ts b/src/app/profile/profile.component.ts index a40d74722465db84d494ffd4bf045fcfeb9c514b..86f1a4969126257815f048e2b5051b67bfd73b3a 100644 --- a/src/app/profile/profile.component.ts +++ b/src/app/profile/profile.component.ts @@ -101,6 +101,23 @@ export class ProfileComponent implements OnInit { this.location.back(); } + public goToOrientation(): void { + this.router.navigate(['/orientation'], { state: { rdvUser: this.userProfile } }); + } + public goToProfileEdit(tabToSelect?: string): void { + if (tabToSelect) { + this.router.navigateByUrl('/profile/edit', { state: { data: tabToSelect } }); + } else { + this.router.navigateByUrl('/profile/edit'); + } + } + public goToStructuresManagement(): void { + this.router.navigateByUrl('/profile/structures-management'); + } + public goToFormStructure(): void { + this.router.navigateByUrl('/form/structure'); + } + public addStructure(): void { this.router.navigateByUrl('/form/structure'); } diff --git a/src/app/profile/structure-members-management/structure-members-management.component.html b/src/app/profile/structure-members-management/structure-members-management.component.html index 7e6529c2245019daa819507ff7614427e89e5340..4a93bdd6be97deff8e41f124305bd7904d2360f5 100644 --- a/src/app/profile/structure-members-management/structure-members-management.component.html +++ b/src/app/profile/structure-members-management/structure-members-management.component.html @@ -6,13 +6,12 @@ <h2>{{ structure.structureName }}</h2> </div> <app-button - tabindex="0" [variant]="'primaryBlack'" [label]="'Ajouter un membre'" [iconName]="'plus'" [size]="'small'" [wide]="true" - (click)="addMemberModalOpened = true" + (action)="addMemberModalOpened = true" /> </div> @@ -38,7 +37,6 @@ </div> <app-button *ngIf="currentProfile._id !== member._id" - tabindex="0" [variant]="'secondaryDelete'" [label]="'Exclure ce membre'" [size]="'small'" @@ -60,7 +58,6 @@ <div class="pendingContainer"> <p class="text">Demande de rattachement envoyée le {{ member.updatedAt | date: 'dd/MM/YYYY' }}</p> <app-button - tabindex="0" [variant]="'secondary'" [label]="'Annuler la demande'" [size]="'small'" diff --git a/src/app/profile/structures-management/structures-management.component.html b/src/app/profile/structures-management/structures-management.component.html index 6798265871aac43d464d0dd124d8da8d60a26802..f07aad9fb53397fef6b7ede0b4cff6b2b8d75842 100644 --- a/src/app/profile/structures-management/structures-management.component.html +++ b/src/app/profile/structures-management/structures-management.component.html @@ -7,13 +7,12 @@ <ng-template ngPluralCase="other">Gérer mes structures</ng-template> </h1> <app-button - routerLink="/form/structure" - tabindex="0" [variant]="'primaryBlack'" [label]="'Ajouter une structure'" [iconName]="'plus'" [size]="'small'" [wide]="true" + (action)="goToFormStructure()" /> </div> <div *ngIf="structures" class="structuresList"> @@ -44,21 +43,21 @@ [variant]="'secondary'" [label]="'Quitter la structure'" [size]="'small'" - (click)="selectedStructure = elt.structure; leaveModalOpened = true" + (action)="selectedStructure = elt.structure; leaveModalOpened = true" /> <app-button *ngIf="!isBeingDeleted(elt.structure)" [variant]="'secondaryDelete'" [label]="'Supprimer la structure'" [size]="'small'" - (click)="selectedStructure = elt.structure; deleteModalOpened = true" + (action)="selectedStructure = elt.structure; deleteModalOpened = true" /> <app-button *ngIf="isBeingDeleted(elt.structure)" [variant]="'primary'" [label]="'Annuler suppression'" [size]="'small'" - (click)="selectedStructure = elt.structure; cancelDeleteModalOpened = true" + (action)="selectedStructure = elt.structure; cancelDeleteModalOpened = true" /> </div> </div> diff --git a/src/app/profile/structures-management/structures-management.component.ts b/src/app/profile/structures-management/structures-management.component.ts index 645c05598292f8aa633c38d2ff17af218b45b208..193e936fa6f660bfba84035157617acee7150229 100644 --- a/src/app/profile/structures-management/structures-management.component.ts +++ b/src/app/profile/structures-management/structures-management.component.ts @@ -37,6 +37,9 @@ export class StructuresManagementComponent implements OnInit { public goBack(): void { history.back(); } + public goToFormStructure(): void { + this.router.navigateByUrl('/form/structure'); + } private shouldRedirect(structures: StructureWithOwners[] | Observable<any>[]): void { if (!structures.length) { diff --git a/src/app/shared/components/address-autocomplete/address-autocomplete.component.html b/src/app/shared/components/address-autocomplete/address-autocomplete.component.html index 772a290ce9e78c69533cbe92fca90cf896cb1af2..04eb72bd68d28c652dbdc6c7222e0cc2e0ec59cd 100644 --- a/src/app/shared/components/address-autocomplete/address-autocomplete.component.html +++ b/src/app/shared/components/address-autocomplete/address-autocomplete.component.html @@ -10,8 +10,14 @@ [value]="searchString" (valueChange)="onSearchChange($event)" /> -<div *ngIf="!isAlreadySearching" class="autocomplete-items"> - <p *ngFor="let hit of data" tabindex="0" (click)="selectedResult(hit)" (keyup.enter)="selectedResult(hit)"> - {{ hit.displayedName }} - </p> +<div *ngIf="!isAlreadySearching" role="list" class="autocomplete-items"> + <div + *ngFor="let hit of data" + role="listitem" + tabindex="0" + (click)="selectedResult(hit)" + (keyup.enter)="selectedResult(hit)" + > + <p tabindex="none" role="button">{{ hit.displayedName }}</p> + </div> </div> diff --git a/src/app/shared/components/radio-option/radio-option.component.html b/src/app/shared/components/radio-option/radio-option.component.html index 00f21749e6d978e90610b438bf8be9da186a6615..5b6c4ce9505cedd6a0d10abfd15ae1456ed53aa9 100644 --- a/src/app/shared/components/radio-option/radio-option.component.html +++ b/src/app/shared/components/radio-option/radio-option.component.html @@ -1,4 +1,4 @@ -<button type="button" tabindex="-1" [ngClass]="{ selected: selected }" (click)="clicked()"> +<button type="button" tabindex="0" [ngClass]="{ selected: selected }" (click)="clicked()"> <app-radio [id]="id" [checked]="selected === true" diff --git a/src/app/shared/components/radio/radio.component.html b/src/app/shared/components/radio/radio.component.html index 354dc5120f1f8c6baa94c0db4adcec7ae5a5d10b..6d0da5a2e978eabbf03ca0563d25c2411bd77d89 100644 --- a/src/app/shared/components/radio/radio.component.html +++ b/src/app/shared/components/radio/radio.component.html @@ -1,6 +1,7 @@ <div class="radioContainer"> <input type="radio" + tabindex="-1" [id]="id" [checked]="checked" [disabled]="disabled" diff --git a/src/app/shared/components/switch/switch.component.html b/src/app/shared/components/switch/switch.component.html index b8d06fa95f6279f3fe5b3c5df578eeff5ad8b86b..54cfc1a913eb01bf3c02f711ab322b3936cd2f34 100644 --- a/src/app/shared/components/switch/switch.component.html +++ b/src/app/shared/components/switch/switch.component.html @@ -1,6 +1,7 @@ <div class="content"> <div class="switch" + role="button" tabindex="0" [attr.aria-label]="checked ? 'Désactiver' : 'Activer'" [ngClass]="{ disabled: disabled, checked: checked }" diff --git a/src/app/structure-list/components/card/card.component.html b/src/app/structure-list/components/card/card.component.html index 1c40f18e494851ae67bce97a8ef9273bc285f026..97a392c2006626a27d38b22bca10fe202961ecae 100644 --- a/src/app/structure-list/components/card/card.component.html +++ b/src/app/structure-list/components/card/card.component.html @@ -69,7 +69,7 @@ class="hide-on-desktop" [variant]="'primary'" [iconName]="'calendar'" - (click)="cardRDV(); $event.stopPropagation()" + (action)="cardRDV(); $event.stopPropagation()" /> </ng-container> <app-svg-icon diff --git a/src/app/structure-list/components/more-filters/more-filters.component.html b/src/app/structure-list/components/more-filters/more-filters.component.html index 9773311159828762928acb60c919d19918cd8479..6a903bf25d2b5ef12832ec4de93d8e1c1db6a151 100644 --- a/src/app/structure-list/components/more-filters/more-filters.component.html +++ b/src/app/structure-list/components/more-filters/more-filters.component.html @@ -53,8 +53,8 @@ </app-collapse> </div> <div class="modalFooter"> - <app-button [variant]="'secondary'" [label]="'Effacer'" (click)="clearFilters()" /> - <app-button [variant]="'primary'" [label]="'Appliquer'" (click)="emitModules(checkedModules)" /> + <app-button [variant]="'secondary'" [label]="'Effacer'" (action)="clearFilters()" /> + <app-button [variant]="'primary'" [label]="'Appliquer'" (action)="emitModules(checkedModules)" /> </div> </div> </div> diff --git a/src/app/structure-list/components/structure-details/structure-details.component.html b/src/app/structure-list/components/structure-details/structure-details.component.html index 3f49b3cb7e0b4f8aeea412cfe840c5b583d5eb6c..6ba3819f603669c8235c376a22da54b2a898beac 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.html +++ b/src/app/structure-list/components/structure-details/structure-details.component.html @@ -37,8 +37,8 @@ class="clickableDiv" role="button" tabindex="0" - [routerLink]="['/orientation']" - [state]="{ rdvStructure: structure }" + (click)="goToOrientation()" + (keyup.enter)="goToOrientation()" > <app-svg-icon class="icon" [folder]="'ico'" [icon]="'rdvDetail'" [iconClass]="'icon-32'" /> <div class="iconTitle">Demander un RDV</div> diff --git a/src/app/structure-list/components/structure-details/structure-details.component.ts b/src/app/structure-list/components/structure-details/structure-details.component.ts index 973eba153f519626031ae9444e04b067efccdc93..e14acd3f5802e6220e7913486f58b1b98f4c245a 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.ts +++ b/src/app/structure-list/components/structure-details/structure-details.component.ts @@ -267,6 +267,9 @@ export class StructureDetailsComponent implements OnInit { } window.open(url, '_blank'); } + public goToOrientation(): void { + this.router.navigateByUrl('/orientation', { state: { rdvStructure: this.structure } }); + } public displayTrainings(): boolean { if (this.structure.categoriesDisplay === undefined) return false;