LP#1887866: add aria-labels to AngularJS grid controls
authorMike Risher <mrisher@catalyte.io>
Thu, 16 Jul 2020 23:12:31 +0000 (23:12 +0000)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 19 May 2023 14:27:19 +0000 (10:27 -0400)
This is a modified version of a patch originally by Mike Risher
to add some aria-label attributes to the AngularJS grid.

Signed-off-by: Mike Risher <mrisher@catalyte.io>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/templates/staff/share/t_autogrid.tt2

index 1ded8b7..8b16f5e 100644 (file)
@@ -66,7 +66,8 @@
       ng-show="showPagination"
       ng-class="{disabled : onFirstPage()}" 
       ng-click="offset(0);collect()"
-      title="[% l('Start') %]">
+      title="[% l('Start') %]"
+      aria-label="[% l('Start') %]">
         <span class="glyphicon glyphicon-fast-backward"></span>
     </button>
 
@@ -75,7 +76,8 @@
       ng-show="showPagination"
       ng-class="{disabled : onFirstPage()}"
       ng-click="decrementPage()"
-      title="[% l('Previous Page') %]">
+      title="[% l('Previous Page') %]"
+      aria-label="[% l('Previous Page') %]">
         <span class="glyphicon glyphicon-backward"></span>
     </button>
 
@@ -86,7 +88,8 @@
       ng-class="{disabled : !hasNextPage()}"
       ng-disabled="!hasNextPage()"
       ng-click="incrementPage()"
-      title="[% l('Next Page') %]">
+      title="[% l('Next Page') %]"
+      aria-label="[% l('Next Page') %]">
         <span class="glyphicon glyphicon-forward"></span>
     </button>
 
 
     <div class="btn-group" uib-dropdown is-open="gridRowCountIsOpen" ng-show="showPagination">
       <button type="button" title="[% l('Select Row Count') %]"
+        aria-label="[% l('Select Row Count') %]"
         class="btn btn-default" uib-dropdown-toggle>
         [% l('Rows [_1]', '{{limit()}}') %]
         <span class="caret"></span>
 
     <div class="btn-group" uib-dropdown is-open="gridColumnPickerIsOpen" ng-show="showPicker">
       <button type="button" 
-        class="btn btn-default" uib-dropdown-toggle>
+        class="btn btn-default" uib-dropdown-toggle
+        aria-label="[% l('Grid Options') %]">
         <span class="caret"></span>
       </button>
       <ul class="pull-right eg-grid-column-picker" uib-dropdown-menu>