[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm /interface loncommon.pm lonrss.pm
raeburn
raeburn at source.lon-capa.org
Sun Mar 16 20:25:53 EDT 2025
raeburn Mon Mar 17 00:25:53 2025 EDT
Modified files:
/loncom/interface loncommon.pm lonrss.pm
/loncom/homework inputtags.pm
Log:
- WCAG 2 compliance.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1469 loncom/interface/loncommon.pm:1.1470
--- loncom/interface/loncommon.pm:1.1469 Fri Mar 7 02:13:40 2025
+++ loncom/interface/loncommon.pm Mon Mar 17 00:25:51 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1469 2025/03/07 02:13:40 raeburn Exp $
+# $Id: loncommon.pm,v 1.1470 2025/03/17 00:25:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -7361,6 +7361,10 @@
text-align:right;
}
+.LC_left {
+ text-align:left;
+}
+
.LC_center {
text-align:center;
}
Index: loncom/interface/lonrss.pm
diff -u loncom/interface/lonrss.pm:1.64 loncom/interface/lonrss.pm:1.65
--- loncom/interface/lonrss.pm:1.64 Sun Mar 16 21:04:09 2025
+++ loncom/interface/lonrss.pm Mon Mar 17 00:25:51 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network
# RSS Feeder
#
-# $Id: lonrss.pm,v 1.64 2025/03/16 21:04:09 raeburn Exp $
+# $Id: lonrss.pm,v 1.65 2025/03/17 00:25:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -536,7 +536,7 @@
# Render private items?
my $viewpubliconly=1;
$r->print("\n".
- ($html?'<hr /><h3>':'<title>').
+ ($html?'<hr /><h3 class="LC_heading_3">':'<title>').
&mt('LON-CAPA Feed "[_1]" for [_2]',$displayfeedname,$name).
($displayoption eq 'hidden'?' ('.&mt('Hidden').')':'').
($html?'</h3>'.($edit?'<form method="post" name="lonhomework" enctype="multipart/form-data" action=""><br />'.
@@ -577,8 +577,10 @@
my $free_space = $disk_quota - ($current_disk_usage / 1024.);
# Format this number since it will be displayed onscreen
$free_space = sprintf("%.1f", $free_space);
+ my $fileclass = 'LC_left';
+ my $notitle = 1;
$uploadlink = &Apache::lonhtmlcommon::start_pick_box().
- &Apache::inputtags::file_selector(0,0,'*','both','',$free_space).
+ &Apache::inputtags::file_selector(0,0,'*','both','',$free_space,$fileclass,$notitle).
&Apache::lonhtmlcommon::end_pick_box();
} else {
# Otherwise, display
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.368 loncom/homework/inputtags.pm:1.369
--- loncom/homework/inputtags.pm:1.368 Sun Mar 16 20:21:48 2025
+++ loncom/homework/inputtags.pm Mon Mar 17 00:25:53 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.368 2025/03/16 20:21:48 raeburn Exp $
+# $Id: inputtags.pm,v 1.369 2025/03/17 00:25:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -642,18 +642,22 @@
$part -> partid
$id -> responseid
-$uploadefiletypes -> comma seperated list of extensions allowed or * for any
+$uploadefiletypes -> comma separated list of extensions allowed or * for any
$which -> 'uploadonly' -> only newly uploaded files
'portfolioonly' -> only allow files from portfolio
'both' -> allow files from either location
$extratext -> additional text to go between the link and the input box
$maxfilesize -> maximum cumulative filesize for submitted files (in MB).
-returns a table row <tr>
+$title_class -> optional css class to use in left table cell of pick box,
+ passed as second arg to lonhtmlcommon::row_title().
+$notitle -> if true, left table cell of pick box will not be shown, and
+ the <th></th> tag will include visually hidden text.
+returns a table row <tr>
=cut
sub file_selector {
- my ($part,$id,$uploadedfiletypes,$which,$extratext,$maxfilesize)=@_;
+ my ($part,$id,$uploadedfiletypes,$which,$extratext,$maxfilesize,$title_class,$notitle)=@_;
if (!$uploadedfiletypes) { return ''; }
my $jspart=$part;
@@ -669,8 +673,11 @@
$addfiles = &mt('Submit other file(s)');
} else {
$addfiles = &mt('Choose file(s) to submit');
+ if ($notitle) {
+ $addfiles = '<span class="LC_visually_hidden">'.$addfiles.'</span>';
+ }
}
- $result .= &Apache::lonhtmlcommon::row_title($addfiles);
+ $result .= &Apache::lonhtmlcommon::row_title($addfiles,$title_class,'','',$notitle);
my $constraints;
if ($uploadedfiletypes ne '*') {
my $showtypes = $uploadedfiletypes;
More information about the LON-CAPA-cvs
mailing list