[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm

raeburn raeburn at source.lon-capa.org
Sun Mar 16 16:21:48 EDT 2025


raeburn		Sun Mar 16 20:21:48 2025 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
  Log:
  - WCAG 2 compliance. Use explicit aria-label for input element instead of 
    wrapping text of an existing link in <label></label> which broke the link.   
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.367 loncom/homework/inputtags.pm:1.368
--- loncom/homework/inputtags.pm:1.367	Sun Mar 16 16:54:40 2025
+++ loncom/homework/inputtags.pm	Sun Mar 16 20:21:48 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.367 2025/03/16 16:54:40 raeburn Exp $
+# $Id: inputtags.pm,v 1.368 2025/03/16 20:21:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -712,10 +712,10 @@
                 $showsymb = $symb;
             }
         }
+	my $labeltext = &mt('Selected Portfolio Files');
 	$result.=$extratext.'<div><a href='."'".'javascript:void(window.open("/adm/portfolio?mode=selectfile&fieldname='.$env{'form.request.prefix'}.'HWPORT'.$jspart.'_'.$id.'&symb='.$showsymb.'","cat","height=600,width=800,scrollbars=1,resizable=1,menubar=2,location=1"))'."'".'>'.
-	    '<label for="HWPORT'.$jspart.'_'.$id.'">'.
-            &mt('Select Portfolio Files: (one or more files per submission)').'</label></a></div>'.
-	    '<div><input type="text" size="50" name="HWPORT'.$jspart.'_'.$id.'" id="HWPORT'.$jspart.'_'.$id.'" value="" />'.
+            &mt('Select Portfolio Files: (one or more files per submission)').'</a></div>'.
+	    '<div><input type="text" size="50" name="HWPORT'.$jspart.'_'.$id.'" value="" aria-label="'.$labeltext.'" />'.
 	    '</div>';
     }
     $result.=&Apache::lonhtmlcommon::row_closure(1);




More information about the LON-CAPA-cvs mailing list