LP1993859 Keyboard tabbing for results pagination
authorStephanie Leary <stephanie.leary@equinoxOLI.org>
Fri, 21 Oct 2022 21:15:57 +0000 (16:15 -0500)
committerJane Sandberg <js7389@princeton.edu>
Fri, 4 Nov 2022 02:14:34 +0000 (19:14 -0700)
In the staff catalog search results pagination component, adds
tabindex="0" to link tags without href attributes to enable keyboard
navigation.

Signed-off-by: Stephanie Leary <stephanie.leary@equinoxOLI.org>
Signed-off-by: Christine Burns <christine.burns@bc.libraries.coop>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Open-ILS/src/eg2/src/app/staff/catalog/result/pagination.component.html

index a15e428..1ee5d02 100644 (file)
@@ -5,8 +5,8 @@ unnecessary given we have to track paging externally anyway.
 <ul class="pagination">
   <li class="page-item" 
     [ngClass]="{disabled : searchContext.pager.isFirstPage()}">
-    <a (click)="prevPage()"
-      class="page-link" 
+    <a (click)="prevPage()" (keydown.enter)="prevPage()"
+      class="page-link" tabindex="0" 
       i18n-aria-label
       aria-label="Previous">
       <span aria-hidden="true">&laquo;</span>
@@ -15,13 +15,13 @@ unnecessary given we have to track paging externally anyway.
   <li class="page-item" 
     *ngFor="let page of currentPageList()"
     [ngClass]="{active : searchContext.pager.currentPage() === page}">
-    <a class="page-link" (click)="setPage(page)">
+    <a class="page-link" tabindex="0" (click)="setPage(page)" (keydown.enter)="setPage(page)">
       {{page}} <span class="sr-only" i18n>(current)</span></a>
   </li>
   <li class="page-item" 
     [ngClass]="{disabled : searchContext.pager.isLastPage()}">
-    <a (click)="nextPage()"
-      class="page-link" aria-label="Next" i18n-aria-label>
+    <a (click)="nextPage()" (keydown.enter)="nextPage()"
+      class="page-link" tabindex="0" aria-label="Next" i18n-aria-label>
       <span aria-hidden="true">&raquo;</span>
     </a>
   </li>