From 9cb8046ef44b82ac2b41cd4bb5167f03b40a343a Mon Sep 17 00:00:00 2001
From: florent <flavelle@neogeo.fr>
Date: Thu, 31 Mar 2022 15:35:07 +0200
Subject: [PATCH] sonarqube

---
 src/App.vue                                   |  5 ++-
 src/components/AppHeader.vue                  | 35 ++++++++++++++----
 .../Feature/Detail/FeatureComments.vue        | 14 ++++++--
 .../Feature/Detail/FeatureHeader.vue          | 15 ++++++--
 .../Feature/FeatureAttachmentForm.vue         |  5 ++-
 src/components/Feature/FeatureEditModal.vue   | 10 ++++--
 src/components/Feature/FeatureLinkedForm.vue  |  5 ++-
 src/components/Pagination.vue                 | 10 ++++--
 .../Project/Basemaps/BasemapListItem.vue      | 10 ++++--
 .../Basemaps/ProjectMappingContextLayer.vue   |  5 ++-
 .../Project/Detail/ProjectFeatureTypes.vue    | 35 ++++++++++++++----
 .../Project/Detail/ProjectHeader.vue          | 36 +++++++++++++++----
 src/components/SearchFeature.vue              |  5 ++-
 13 files changed, 152 insertions(+), 38 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index b9f5f58b..7104f1d8 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -27,7 +27,10 @@
                 @click="DISCARD_MESSAGE(message)"
               />
               <div class="header">
-                <i class="info circle icon" />
+                <i
+                  class="info circle icon"
+                  aria-hidden="true"
+                />
                 Informations
               </div>
               <ul class="list">
diff --git a/src/components/AppHeader.vue b/src/components/AppHeader.vue
index 3eabbe9d..a07dcda3 100644
--- a/src/components/AppHeader.vue
+++ b/src/components/AppHeader.vue
@@ -25,7 +25,10 @@
           <span>
             <span v-if="project"> Projet : {{ project.title }} </span>
           </span>
-          <i class="dropdown icon" />
+          <i
+            class="dropdown icon"
+            aria-hidden="true"
+          />
           <div
             :class="[
               'menu dropdown-list',
@@ -41,7 +44,10 @@
               }"
               class="item"
             >
-              <i class="home icon" />Accueil
+              <i
+                class="home icon"
+                aria-hidden="true"
+              />Accueil
             </router-link>
             <router-link
               v-if="project"
@@ -51,7 +57,10 @@
               }"
               class="item"
             >
-              <i class="list icon" />Liste & Carte
+              <i
+                class="list icon"
+                aria-hidden="true"
+              />Liste & Carte
             </router-link>
             <router-link
               v-if="
@@ -64,7 +73,10 @@
               }"
               class="item"
             >
-              <i class="map icon" />Fonds cartographiques
+              <i
+                class="map icon"
+                aria-hidden="true"
+              />Fonds cartographiques
             </router-link>
             <router-link
               v-if="
@@ -77,7 +89,10 @@
               }"
               class="item"
             >
-              <i class="users icon" />Membres
+              <i
+                class="users icon"
+                aria-hidden="true"
+              />Membres
             </router-link>
             <div class="mobile">
               <router-link
@@ -111,7 +126,10 @@
                   v-if="user"
                   class="item"
                   @click="logout"
-                ><i class="ui logout icon" />
+                ><i
+                  class="ui logout icon"
+                  aria-hidden="true"
+                />
                 </a>
                 <router-link
                   v-else-if="!user && !SSO_LOGIN_URL"
@@ -166,7 +184,10 @@
               v-if="user"
               class="item log-item"
               @click="logout"
-            ><i class="ui logout icon" />
+            ><i
+              class="ui logout icon"
+              aria-hidden="true"
+            />
             </a>
             <router-link
               v-else-if="!user && !SSO_LOGIN_URL"
diff --git a/src/components/Feature/Detail/FeatureComments.vue b/src/components/Feature/Detail/FeatureComments.vue
index d19ac341..e2158b98 100644
--- a/src/components/Feature/Detail/FeatureComments.vue
+++ b/src/components/Feature/Detail/FeatureComments.vue
@@ -45,13 +45,18 @@
                 <div
                   v-if="event.related_comment.attachment"
                 >
-                  <br><a
+                  <br>
+                  <a
                     :href="
                       DJANGO_BASE_URL +
                         event.related_comment.attachment.url
                     "
                     target="_blank"
-                  ><i class="paperclip fitted icon" />
+                  >
+                    <i
+                      class="paperclip fitted icon"
+                      aria-hidden="true"
+                    />
                     {{ event.related_comment.attachment.title }}</a>
                 </div>
               </div>
@@ -146,7 +151,10 @@
           class="ui compact green icon button"
           @click="postComment"
         >
-          <i class="plus icon" /> Poster le commentaire
+          <i
+            class="plus icon"
+            aria-hidden="true"
+          /> Poster le commentaire
         </button>
       </form>
     </div>
diff --git a/src/components/Feature/Detail/FeatureHeader.vue b/src/components/Feature/Detail/FeatureHeader.vue
index a0ed7f2e..d0850cb7 100644
--- a/src/components/Feature/Detail/FeatureHeader.vue
+++ b/src/components/Feature/Detail/FeatureHeader.vue
@@ -16,7 +16,10 @@
             data-tooltip="Ajouter un signalement"
             data-position="bottom left"
           >
-            <i class="plus fitted icon" />
+            <i
+              class="plus fitted icon"
+              aria-hidden="true"
+            />
           </router-link>
           <router-link
             v-if="
@@ -33,7 +36,10 @@
             }"
             class="ui button button-hover-orange"
           >
-            <i class="inverted grey pencil alternate icon" />
+            <i
+              class="inverted grey pencil alternate icon"
+              aria-hidden="true"
+            />
           </router-link>
           <a
             v-if="((permissions && permissions.can_update_feature) || isFeatureCreator) && isOnline"
@@ -41,7 +47,10 @@
             class="ui button button-hover-red"
             @click="isCanceling = true"
           >
-            <i class="inverted grey trash alternate icon" />
+            <i
+              class="inverted grey trash alternate icon"
+              aria-hidden="true"
+            />
           </a>
         </div>
         <div class="ui hidden divider" />
diff --git a/src/components/Feature/FeatureAttachmentForm.vue b/src/components/Feature/FeatureAttachmentForm.vue
index cb40f2b8..808e8606 100644
--- a/src/components/Feature/FeatureAttachmentForm.vue
+++ b/src/components/Feature/FeatureAttachmentForm.vue
@@ -42,7 +42,10 @@
               class="ui icon button"
               :for="'attachment_file' + attachmentForm.dataKey"
             >
-              <i class="file icon" />
+              <i
+                class="file icon"
+                aria-hidden="true"
+              />
               <span
                 v-if="form.attachment_file.value"
                 class="label"
diff --git a/src/components/Feature/FeatureEditModal.vue b/src/components/Feature/FeatureEditModal.vue
index 4649896b..3ed47f5d 100644
--- a/src/components/Feature/FeatureEditModal.vue
+++ b/src/components/Feature/FeatureEditModal.vue
@@ -21,7 +21,10 @@
             class="ui icon button"
             for="image_file"
           >
-            <i class="file icon" />
+            <i
+              class="file icon"
+              aria-hidden="true"
+            />
             <span class="label">Sélectionner une image ...</span>
           </label>
           <input
@@ -44,7 +47,10 @@
           class="ui positive right labeled icon button"
         >
           Importer
-          <i class="checkmark icon" />
+          <i
+            class="checkmark icon"
+            aria-hidden="true"
+          />
         </button>
       </form>
     </div>
diff --git a/src/components/Feature/FeatureLinkedForm.vue b/src/components/Feature/FeatureLinkedForm.vue
index 79ae31c6..6d2256b2 100644
--- a/src/components/Feature/FeatureLinkedForm.vue
+++ b/src/components/Feature/FeatureLinkedForm.vue
@@ -7,7 +7,10 @@
         type="button"
         @click="remove_linked_formset"
       >
-        <i class="ui times icon" />
+        <i
+          class="ui times icon"
+          aria-hidden="true"
+        />
       </button>
     </h4>
     <ul
diff --git a/src/components/Pagination.vue b/src/components/Pagination.vue
index e92ee520..7764f116 100644
--- a/src/components/Pagination.vue
+++ b/src/components/Pagination.vue
@@ -11,7 +11,10 @@
             :href="currentLocation"
             @click="page -= 1"
           >
-            <i class="ui icon big angle left" />
+            <i
+              class="ui icon big angle left"
+              aria-hidden="true"
+            />
           </a>
         </li>
         <div
@@ -61,7 +64,10 @@
             :href="currentLocation"
             @click="page += 1"
           >
-            <i class="ui icon big angle right" />
+            <i
+              class="ui icon big angle right"
+              aria-hidden="true"
+            />
           </a>
         </li>
       </ul>
diff --git a/src/components/Project/Basemaps/BasemapListItem.vue b/src/components/Project/Basemaps/BasemapListItem.vue
index 9b90c5b0..73a0aee1 100644
--- a/src/components/Project/Basemaps/BasemapListItem.vue
+++ b/src/components/Project/Basemaps/BasemapListItem.vue
@@ -37,7 +37,10 @@
           class="ui compact small icon left floated button green"
           @click="addLayer"
         >
-          <i class="ui plus icon" />
+          <i
+            class="ui plus icon"
+            aria-hidden="true"
+          />
           <span>Ajouter une couche</span>
         </a>
       </div>
@@ -58,7 +61,10 @@
             button button-hover-green
           "
         >
-          <i class="ui trash alternate icon" />
+          <i
+            class="ui trash alternate icon"
+            aria-hidden="true"
+          />
           <span>Supprimer ce fond cartographique</span>
         </a>
       </div>
diff --git a/src/components/Project/Basemaps/ProjectMappingContextLayer.vue b/src/components/Project/Basemaps/ProjectMappingContextLayer.vue
index 38334bdc..c1a37355 100644
--- a/src/components/Project/Basemaps/ProjectMappingContextLayer.vue
+++ b/src/components/Project/Basemaps/ProjectMappingContextLayer.vue
@@ -57,7 +57,10 @@
         @click="removeLayer"
       >
         <div class="ui compact small icon floated button button-hover-red">
-          <i class="ui grey trash alternate icon" />
+          <i
+            class="ui grey trash alternate icon"
+            aria-hidden="true"
+          />
           <span>Supprimer cette couche</span>
         </div>
       </div>
diff --git a/src/components/Project/Detail/ProjectFeatureTypes.vue b/src/components/Project/Detail/ProjectFeatureTypes.vue
index 1263b2e8..a86e8469 100644
--- a/src/components/Project/Detail/ProjectFeatureTypes.vue
+++ b/src/components/Project/Detail/ProjectFeatureTypes.vue
@@ -73,7 +73,10 @@
               data-position="top right"
               data-variation="mini"
             >
-              <i class="ui plus icon" />
+              <i
+                class="ui plus icon"
+                aria-hidden="true"
+              />
             </router-link>
             <router-link
               v-if="
@@ -99,13 +102,19 @@
               data-position="top right"
               data-variation="mini"
             >
-              <i class="inverted grey copy alternate icon" />
+              <i
+                class="inverted grey copy alternate icon"
+                aria-hidden="true"
+              />
             </router-link>
             <div
               v-if="isImporting(type)"
               class="import-message"
             >
-              <i class="info circle icon" />
+              <i
+                class="info circle icon"
+                aria-hidden="true"
+              />
               Import en cours
             </div>
             <div
@@ -180,7 +189,10 @@
                 data-position="top center"
                 data-variation="mini"
               >
-                <i class="inverted grey pencil alternate icon" />
+                <i
+                  class="inverted grey pencil alternate icon"
+                  aria-hidden="true"
+                />
               </router-link>
             </div>
           </div>
@@ -222,7 +234,10 @@
           button-align-left
         "
       >
-        <i class="ui plus icon" />
+        <i
+          class="ui plus icon"
+          aria-hidden="true"
+        />
         <label
           class="ui"
           for="json_file"
@@ -296,7 +311,10 @@
         }"
         class="ui compact basic button button-align-left"
       >
-        <i class="ui plus icon" />
+        <i
+          class="ui plus icon"
+          aria-hidden="true"
+        />
         Créer un nouveau type de signalement à partir du catalogue {{ CATALOG_NAME|| 'IDGO' }}
       </router-link>
     </div>
@@ -310,7 +328,10 @@
         class="ui fluid teal icon button"
         @click="toNewGeojsonFeatureType"
       >
-        <i class="upload icon" /> Lancer l'import avec le fichier
+        <i
+          class="upload icon"
+          aria-hidden="true"
+        /> Lancer l'import avec le fichier
         {{ geojsonFileToImport.name }}
       </button>
     </div>
diff --git a/src/components/Project/Detail/ProjectHeader.vue b/src/components/Project/Detail/ProjectHeader.vue
index ab4f111a..f88484e9 100644
--- a/src/components/Project/Detail/ProjectHeader.vue
+++ b/src/components/Project/Detail/ProjectHeader.vue
@@ -15,19 +15,28 @@
           class="ui basic teal label"
           data-tooltip="Membres"
         >
-          <i class="user icon" />{{ project.nb_contributors }}
+          <i
+            class="user icon"
+            aria-hidden="true"
+          />{{ project.nb_contributors }}
         </div>
         <div
           class="ui basic teal label"
           data-tooltip="Signalements publiés"
         >
-          <i class="map marker icon" />{{ project.nb_published_features }}
+          <i
+            class="map marker icon"
+            aria-hidden="true"
+          />{{ project.nb_published_features }}
         </div>
         <div
           class="ui basic teal label"
           data-tooltip="Commentaires"
         >
-          <i class="comment icon" />{{
+          <i
+            class="comment icon"
+            aria-hidden="true"
+          />{{
             project.nb_published_features_comments
           }}
         </div>
@@ -59,7 +68,10 @@
             data-variation="mini"
             @click="OPEN_PROJECT_MODAL('subscribe')"
           >
-            <i class="inverted grey envelope icon" />
+            <i
+              class="inverted grey envelope icon"
+              aria-hidden="true"
+            />
           </a>
           <router-link
             v-if="
@@ -73,7 +85,10 @@
             data-position="top center"
             data-variation="mini"
           >
-            <i class="inverted grey pencil alternate icon" />
+            <i
+              class="inverted grey pencil alternate icon"
+              aria-hidden="true"
+            />
           </router-link>
           <a
             v-if="isProjectAdmin && isOffline() !== true"
@@ -84,7 +99,10 @@
             data-variation="mini"
             @click="OPEN_PROJECT_MODAL('deleteProject')"
           >
-            <i class="inverted grey trash icon" />
+            <i
+              class="inverted grey trash icon"
+              aria-hidden="true"
+            />
           </a>
         </div>
 
@@ -93,7 +111,10 @@
           class="ui teal left labeled icon button share-button"
           @click="copyLink"
         >
-          <i class="left icon share square" />
+          <i
+            class="left icon share square"
+            aria-hidden="true"
+          />
           Copier le lien de partage
         </button>
 
@@ -105,6 +126,7 @@
             &nbsp;
             <i
               class="close icon"
+              aria-hidden="true"
               @click="confirmMsg = ''"
             />
           </div>
diff --git a/src/components/SearchFeature.vue b/src/components/SearchFeature.vue
index c1692eba..bd68b454 100644
--- a/src/components/SearchFeature.vue
+++ b/src/components/SearchFeature.vue
@@ -27,7 +27,10 @@
           class="multiselect__clear"
           @click.prevent.stop="selection = null"
         >
-          <i class="close icon" />
+          <i
+            class="close icon"
+            aria-hidden="true"
+          />
         </div>
       </template>
       <span slot="noResult">
-- 
GitLab