[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm

raeburn raeburn at source.lon-capa.org
Thu Aug 20 22:53:53 EDT 2026


raeburn		Fri Aug 21 02:53:53 2026 EDT

  Modified files:              
    /loncom/publisher	loncfile.pm 
  Log:
  - "Accessibility Checking Available" configuration item:
    Values stored in /etc/httpd/conf/loncapa.conf or /etc/apache2/loncapa.conf
    either: PerlSetVar lonAxeUse 1 or PerlSetVar lonAxeUse 0 (replaces Y/N).
  
  
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.136 loncom/publisher/loncfile.pm:1.137
--- loncom/publisher/loncfile.pm:1.136	Tue Aug 18 18:53:26 2026
+++ loncom/publisher/loncfile.pm	Fri Aug 21 02:53:53 2026
@@ -9,7 +9,7 @@
 #  and displays a page showing the results of the action.
 #
 #
-# $Id: loncfile.pm,v 1.136 2026/08/18 18:53:26 raeburn Exp $
+# $Id: loncfile.pm,v 1.137 2026/08/21 02:53:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1027,7 +1027,7 @@
 
 sub Accessibility1 {
     my ($r,$fn) = @_;
-    if ($r->dir_config('lonAxeUse') ne 'Y') {
+    unless ($r->dir_config('lonAxeUse')) {
         $r->print('<p>'.
                   &mt('The LON-CAPA home server for this Authoring Space has not been configured to support this functionality.').'<br />'.
                   &mt('Instead you can use a web browser extension such as [_1]WAVE[_2] from WebAIM or [_3]axe Developer Tools[_2] to test individual pages for accessibility.',
@@ -1144,7 +1144,7 @@
 
 sub Accessibility2 {
     my ($r,$uname,$udom,$fn,$identifier) = @_;
-    if ($r->dir_config('lonAxeUse') ne 'Y') {
+    unless ($r->dir_config('lonAxeUse')) {
         $r->print('<p>'.
                   &mt('The LON-CAPA home server for this Authoring Space has not been configured to support this functionality.').'<br />'.
                   &mt('Instead you can use a web browser extension such as [_1]WAVE[_2] from WebAIM or [_3]axe Developer Tools[_2] to test individual pages for accessibility.',
@@ -2027,17 +2027,17 @@
                      .'<div class="LC_landmark" role="main" id="LC_main_content">'
                      .'<h2 class="LC_heading_2">'.&mt('Unable to determine Authoring Space context').'</h2>');
             if ($env{'form.action'} eq 'accessibility') {
-                if ($r->dir_config('lonAxeUse') ne 'Y') {
+                if ($r->dir_config('lonAxeUse')) {
+                    $r->print('<p>'.
+                              &mt('Please display a resource or directory, and then click the "Accessibility" link/icon').
+                              '</p>');
+                } else {
                     $r->print('<p>'.
                               &mt('The LON-CAPA homeserver for this Authoring Space has not been configured to support this functionality.').'<br />'.
                               &mt('Instead you can use a web browser extension such as [_1]WAVE[_2] from WebAIM or [_3]axe Developer Tools[_2] to test individual pages for accessibility.',
                                   '<a href="https://wave.webaim.org/">','</a>',
                                   '<a href="https://www.deque.com/axe/devtools/extension/">').
                               '</p>');
-                } else {
-                    $r->print('<p>'.
-                              &mt('Please display a resource or directory, and then click the "Accessibility" link/icon').
-                              '</p>');
                 }
             } else {
                 $r->print('<p>'.




More information about the LON-CAPA-cvs mailing list