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

raeburn raeburn at source.lon-capa.org
Mon Jan 19 21:31:01 EST 2026


raeburn		Tue Jan 20 02:31:01 2026 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - WCAG 2 compliance
    - Additional args accepted by &select_datelocale() and &set_language() to
      support labelling of form elements in courseprefs.pm rev. 1.141
    - CSS needed for changes in courseprefs.pm rev. 1.141.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1499 loncom/interface/loncommon.pm:1.1500
--- loncom/interface/loncommon.pm:1.1499	Tue Jan 13 03:18:22 2026
+++ loncom/interface/loncommon.pm	Tue Jan 20 02:31:01 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1499 2026/01/13 03:18:22 raeburn Exp $
+# $Id: loncommon.pm,v 1.1500 2026/01/20 02:31:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -989,8 +989,11 @@
 }
 
 sub select_datelocale {
-    my ($name,$selected,$onchange,$includeempty,$disabled)=@_;
-    my $output='<select name="'.$name.'" '.$onchange.$disabled.'>'."\n";
+    my ($name,$selected,$onchange,$includeempty,$disabled,$id)=@_;
+    if ($id ne '') {
+        $id = ' id="'.$id.'"';
+    }
+    my $output='<select name="'.$name.'" '.$onchange.$disabled.$id.'>'."\n";
     if ($includeempty) {
         $output .= '<option value=""';
         if ($selected eq '') {
@@ -1033,7 +1036,7 @@
         }
         $output.=">$item";
         if ($locale_names{$item} ne '') {
-            $output.='  '.$locale_names{$item};
+            $output.='  '.&HTML::Entities::encode($locale_names{$item},'<>&"');
         }
         $output.="</option>\n";
     }
@@ -1042,7 +1045,7 @@
 }
 
 sub select_language {
-    my ($name,$selected,$includeempty,$noedit) = @_;
+    my ($name,$selected,$includeempty,$noedit,$id,$aria_labelledby,$arialabel) = @_;
     my %langchoices;
     if ($includeempty) {
         %langchoices = ('' => 'No language preference');
@@ -1054,7 +1057,7 @@
         }
     }
     %langchoices = &Apache::lonlocal::texthash(%langchoices);
-    return &select_form($selected,$name,\%langchoices,undef,$noedit);
+    return &select_form($selected,$name,\%langchoices,undef,$noedit,$id,$aria_labelledby,$arialabel);
 }
 
 =pod
@@ -8100,8 +8103,23 @@
   text-align: right;
 }
 
-table.LC_nested tr.LC_odd_row td {
+table.LC_nested tr.LC_odd_row td,
+table.LC_nested tr.LC_odd_row > th.LC_left_item {
   background-color: #EEEEEE;
+  border: 0;
+}
+
+table.LC_nested tr.LC_even_row > th.LC_left_item {
+  background-color: #FFFFFF;
+  border: 0;
+}
+
+table.LC_nested_inner tr.LC_header_row > th {
+  background-color: $data_table_head;
+}
+
+.LC_subtext {
+  font-weight: normal;
 }
 
 table.LC_createuser {




More information about the LON-CAPA-cvs mailing list