LP#1839361 Login page tile is confusing to screen readers
authorTerran McCanna <tmccanna@georgialibraries.org>
Mon, 21 Oct 2019 21:18:44 +0000 (17:18 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 21 Feb 2020 15:46:23 +0000 (10:46 -0500)
Prior to this change, the login page, the splash page, and the
about page in the staff client all used 'Home' as the page title,
which caused accessibility problems. This change gives each
its own title.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Lynn Floyd <lfloyd1@library.in.gov>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>

Open-ILS/src/templates/staff/index.tt2
Open-ILS/web/js/ui/default/staff/app.js

index 803774f..100d9d1 100644 (file)
@@ -1,12 +1,18 @@
 [%
   WRAPPER "staff/base.tt2";
-  ctx.page_title = l("Home"); 
   ctx.page_app = "egHome";
 %]
 
 [% BLOCK APP_JS %]
 <!-- splash / login page app -->
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/app.js"></script>
+<script>
+angular.module('egCoreMod').run(['egStrings', function(s) {
+  s.PAGE_TITLE_SPLASH = "[% l('Home') %]";
+  s.PAGE_TITLE_LOGIN = "[% l('Staff Login') %]";
+  s.PAGE_TITLE_ABOUT = "[% l('About') %]";
+}])
+</script>
 [% END %]
 
 <div ng-view></div> 
index e38b76f..6721046 100644 (file)
@@ -56,7 +56,10 @@ function($routeProvider , $locationProvider) {
         $scope.focusMe = true;
         $scope.args = {};
         $scope.workstations = [];
-
+               
+               egCore.strings.setPageTitle(
+            egCore.strings['PAGE_TITLE_LOGIN']);
+                       
         // if the user is already logged in, jump to splash page
         if (egCore.auth.user()) $location.path('/');
 
@@ -150,9 +153,13 @@ function($routeProvider , $locationProvider) {
 /**
  * Splash page dynamic content.
  */
-.controller('SplashCtrl', ['$scope', '$window', function($scope, $window) {
-    console.log('SplashCtrl');
+.controller('SplashCtrl', ['$scope', '$window','egCore', 
+    function($scope, $window,egCore) {
+               
     $scope.focus_search = true;
+       
+       egCore.strings.setPageTitle(
+        egCore.strings['PAGE_TITLE_SPLASH']);
 
     $scope.catalog_search = function($event) {
         $scope.focus_search = true;
@@ -179,5 +186,8 @@ function($routeProvider , $locationProvider) {
         }
     );
 
+       egCore.strings.setPageTitle(
+        egCore.strings['PAGE_TITLE_ABOUT']);
+
 }])