[LON-CAPA-cvs] cvs: loncom /interface lonindexcourse.pm

raeburn raeburn at source.lon-capa.org
Wed Feb 26 18:46:22 EST 2025


raeburn		Wed Feb 26 23:46:22 2025 EDT

  Modified files:              
    /loncom/interface	lonindexcourse.pm 
  Log:
  - WCAG 2 compliance.
  
  
Index: loncom/interface/lonindexcourse.pm
diff -u loncom/interface/lonindexcourse.pm:1.6 loncom/interface/lonindexcourse.pm:1.7
--- loncom/interface/lonindexcourse.pm:1.6	Wed Feb 26 23:04:40 2025
+++ loncom/interface/lonindexcourse.pm	Wed Feb 26 23:46:22 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Index Course
 #
-# $Id: lonindexcourse.pm,v 1.6 2025/02/26 23:04:40 raeburn Exp $
+# $Id: lonindexcourse.pm,v 1.7 2025/02/26 23:46:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -93,6 +93,7 @@
 # Output
     $r->print(&Apache::loncommon::start_data_table());
     my $currentchar='';
+    my $colheader = '<span class="LC_visually_hidden">'.&mt('Resource(s)').'</span> ';
     &Apache::loncommon::set_data_table_count(1);
     foreach my $lword (sort(keys(%indexhash))) {
        unless ($lword=~/\w/) { next; }
@@ -100,7 +101,8 @@
        my $firstchar=substr($lword,0,1);
        if ($currentchar ne $firstchar) {
           $r->print(&Apache::loncommon::start_data_table_header_row().
-                    '<th>'.$firstchar.'</th><th> </th>'.&Apache::loncommon::end_data_table_header_row());
+                    '<th>'.$firstchar.'</th><th>'.$colheader.'</th>'.
+                    &Apache::loncommon::end_data_table_header_row()."\n");
           $currentchar=$firstchar;
        }
        $r->print("\n".&Apache::loncommon::continue_data_table_row()."<td>$lword</td><td>");
@@ -108,7 +110,7 @@
            unless ($href) { next; }
            $r->print('   <a href="'.$href.'">'.$indextitles{$href}.'</a>');
        }
-       $r->print("</td>".&Apache::loncommon::end_data_table_row());
+       $r->print('</td>'.&Apache::loncommon::end_data_table_row());
     }
     $r->print(&Apache::loncommon::end_data_table());
 }




More information about the LON-CAPA-cvs mailing list