]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/ResultsList.svelte
npm updates. All but svelte
[nominatim-ui.git] / src / components / ResultsList.svelte
index 2fc6828e7f9034ce5ab9cec5bdef8c7c1a698d88..8935ec1b1a2a7d17dc80dd8875b990c1788d7fa5 100644 (file)
 </script>
 
 {#if aSearchResults && aSearchResults.length > 0}
-  <div id="searchresults">
+  <div id="searchresults" role="list">
 
     {#each aSearchResults as aResult, iResNum}
-      <div class="result" class:highlight={iResNum === iHighlightNum} data-position="{iResNum}" on:click|stopPropagation={handleClick}>
+      <!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
+      <div class="result"
+           class:highlight={iResNum === iHighlightNum}
+           role="listitem"
+           data-position="{iResNum}"
+           on:click|stopPropagation={handleClick}
+           on:keypress|stopPropagation={handleClick}>
         <div style="float:right">
           <MapIcon aPlace={aResult} />
         </div>
@@ -64,7 +70,9 @@
         <span class="type">{formatLabel(aResult)}</span>
         <p class="coords">{aResult.lat},{aResult.lon}</p>
 
-        <DetailsLink extra_classes="btn btn-outline-secondary btn-sm" feature={aResult}>details</DetailsLink>
+        <DetailsLink extra_classes="btn btn-outline-secondary btn-sm" feature={aResult}>
+          details
+        </DetailsLink>
       </div>
     {/each}
 
   }
 
   .result .coords {
-    display: none;  
+    display: none;
   }
 
   .noresults{