[LON-CAPA-cvs] cvs: loncom /interface lontrackstudent.pm
raeburn
raeburn at source.lon-capa.org
Sat Dec 20 13:09:08 EST 2025
raeburn Sat Dec 20 18:09:08 2025 EDT
Modified files:
/loncom/interface lontrackstudent.pm
Log:
- WCAG 2 compliance. Include "Skip to main content" as first item shown
when tabbing in page and replace use of <table> with <div> for layout.
Index: loncom/interface/lontrackstudent.pm
diff -u loncom/interface/lontrackstudent.pm:1.41 loncom/interface/lontrackstudent.pm:1.42
--- loncom/interface/lontrackstudent.pm:1.41 Thu Nov 21 07:26:03 2024
+++ loncom/interface/lontrackstudent.pm Sat Dec 20 18:09:08 2025
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lontrackstudent.pm,v 1.41 2024/11/21 07:26:03 raeburn Exp $
+# $Id: lontrackstudent.pm,v 1.42 2025/12/20 18:09:08 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -270,7 +270,7 @@
if ($mode eq 'full_class') {
$tableheader =
'<table><tr>'.
- '<th> </th>'.
+ '<th>#</th>'.
'<th>'.&mt('Resource').'</th>'.
'<th>'.&mt('Time').'</th>'.
'<th>'.&mt('Student').'</th>'.
@@ -281,7 +281,7 @@
} elsif ($mode =~ /^student:(.*):(.*)$/) {
$tableheader =
'<table><tr>'.
- '<th> </th>'.
+ '<th>#</th>'.
'<th>'.&mt('Resource').'</th>'.
'<th>'.&mt('Time').'</th>'.
'<th>'.&mt('Action').'</th>'.
@@ -438,7 +438,7 @@
###################################################################
sub display_values {
my ($action,$values)=@_;
- my $result='<table>';
+ my $result = '<div role="grid" class="LC_grid">';
if (($action eq 'CSTORE') || ($action eq 'PUTSTORE') || ($action eq 'EXPORT')) {
my $is_anon;
my %values=map {split('=',$_,-1)} split(/\&/,$values);
@@ -450,12 +450,14 @@
last;
}
}
- $result.='<tr><td align="right">'.
- $unesc_key.
- '</td><td>=</td><td align="left">'.
- &unescape($values{$key}).'</td></tr>';
+ $result .= '<div role="row" class="LC_grid_row">'.
+ '<div role="gridcell" class="LC_grid_cell" style="text-align: right;margin: 0;padding: 0;">'.
+ $unesc_key.
+ '</div><div role="gridcell" class="LC_grid_cell" style="margin: 0";padding: 0;">=</div>'.
+ '<div role="gridcell" class="LC_grid_cell" style="text-align: left;margin: 0;padding: 0;">'.
+ &unescape($values{$key}).'</div></div>';
}
- $result.='</table>';
+ $result.='</div>';
if ($is_anon) {
$result = '<span class="LC_warning">'.&mt('Anonymous Survey Submission: details not shown').'</span>';
}
@@ -467,10 +469,12 @@
}
foreach my $key (sort(keys(%values))) {
if ($key eq 'counter') { next; }
- $result.='<tr><td align="right">'.$key.'</td>'.
- '<td>=</td><td align="left">'.$values{$key}.'</td></tr>';
+ $result .= '<div role="row" class="LC_grid_row">'.
+ '<div role="gridcell" class="LC_grid_cell" style="text-align: right;padding: 0;">'.$key.'</div>'.
+ '<div role="gridcell" class="LC_grid_cell" style="padding: 0;">=</div>'.
+ '<div role="gridcell" class="LC_grid_cell" style="text-align: left;padding: 0;">'.$values{$key}.'</div></div>';
}
- $result.='</table>';
+ $result.='</div>';
} else {
$result=&unescape($values)
}
@@ -590,7 +594,8 @@
$args->{'add_progressbar'} = 1;
}
$r->print(&Apache::loncommon::start_page('Student Activity',&styles(),$args).
- &Apache::lonhtmlcommon::breadcrumbs('Student Activity'));
+ &Apache::lonhtmlcommon::breadcrumbs('Student Activity').
+ '<div class="LC_left_float" role="main" id="LC_main_content">');
$r->rflush();
#
# Begin form output
@@ -633,7 +638,7 @@
&Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Done'));
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
#
- $r->print("</form>\n");
+ $r->print("</form></div>\n");
$r->print(&Apache::loncommon::end_page());
$r->rflush();
#
More information about the LON-CAPA-cvs
mailing list