[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonnavmaps.pm
raeburn
raeburn at source.lon-capa.org
Mon Feb 3 14:07:54 EST 2025
raeburn Mon Feb 3 19:07:54 2025 EDT
Modified files:
/loncom/interface lonnavmaps.pm loncommon.pm
Log:
- WCAG 2 compliance. Replace <table> used for layout with <div>.
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.570 loncom/interface/lonnavmaps.pm:1.571
--- loncom/interface/lonnavmaps.pm:1.570 Mon Feb 3 03:04:24 2025
+++ loncom/interface/lonnavmaps.pm Mon Feb 3 19:07:54 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.570 2025/02/03 03:04:24 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.571 2025/02/03 19:07:54 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1573,7 +1573,7 @@
my $curRes;
my $foundJump = 0;
my $counter = 0;
-
+
while (($curRes = $mapIterator->next()) && !$foundJump) {
if (ref($curRes)) { $counter++; }
# Speed up display after course initialization
@@ -1604,14 +1604,15 @@
# Print key?
if ($printKey) {
my $location = &Apache::loncommon::lonhttpdurl("/adm/lonMisc");
- $result .= '<table border="0" cellpadding="2" cellspacing="0">'.
- '<tr><td align="right" valign="bottom">Key: </td>'.
- '<td align="center" valign="bottom"> '.
+ $result .= '<div class="LC_navtools">'."\n".
+ '<span class="LC_middle LC_right">'.&mt('Key').':</span>'.
+ '<span class="LC_middle LC_center"> '.
'<img src="'.$location.'/chat.gif" alt="" /> '.&mt('Unread Discussion').
- '</td><td align="center" valign="bottom">'.
- ' <img src="'.$location.'/feedback.gif" alt="" /> '.
+ ' '.
+ '<img src="'.$location.'/feedback.gif" alt="" /> '.
&mt('New message (click to open)').
- '</td></tr></table>'."\n";
+ '</span></div>'.
+ '<div style="padding:0;clear:both;margin:0;border:0"></div>'."\n";
}
if ($printCloseAll && !$args->{'resource_no_folder_link'}) {
@@ -2108,7 +2109,7 @@
}
}
- if ($counter) {
+ if ($counter) {
$result.=&Apache::loncommon::end_data_table();
}
@@ -2149,14 +2150,12 @@
if (ref($args->{'linkitems'}) eq 'HASH') {
my $numlinks = scalar(keys(%{$args->{'linkitems'}}));
if ($numlinks > 1) {
- $result = '<td>'.
+ $result = '<div class="LC_navtools">'.
&Apache::loncommon::help_open_menu('Navigation Screen','Navigation_Screen',
undef,'RAT').
- '</td>'.
- '<td> </td>'.
- '<td class="LC_middle">'.&mt('Tools:').'</td>';
+ '</div><div class="LC_navtools"> '.&mt('Tools:').'</div>';
}
- $result .= '<td align="left">'."\n".
+ $result .= '<div class="LC_navtools">'."\n".
'<ul id="LC_toolbar">';
my @linkorder = ('firsthomework','everything','uncompleted',
'changefolder','clearbubbles','printout','edittoplevel');
@@ -2184,19 +2183,21 @@
}
}
$result .= '</ul>'.
- '</td>';
+ '</div>';
if (($numlinks==1) && (exists($args->{'linkitems'}{'edittoplevel'}))) {
- $result .= '<td><a href="'.$args->{'linkitems'}{'edittoplevel'}{'cmd'}.'">'.
- &mt('Content Editor').'</a></td>';
+ $result .= '<div class="LC_navtools">'.
+ ' <a href="'.$args->{'linkitems'}{'edittoplevel'}{'cmd'}.'">'.
+ &mt('Content Editor').'</a></div>';
}
}
if ($args->{'sort_html'}) {
- $result .= '<td> </td><td> </td><td> </td>'.
- '<td align="right">'.$args->{'sort_html'}.'</td>';
+ $result .= '<div class="LC_navtools"> '.
+ $args->{'sort_html'}.'</div>';
}
}
if ($result) {
- $result = "<table><tr>$result</tr></table>";
+ $result = '<div class="LC_navtools">'.$result.'</div>'."\n".
+ '<div style="padding:0;clear:both;margin:0;border:0"></div>'."\n";
}
return $result;
}
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1448 loncom/interface/loncommon.pm:1.1449
--- loncom/interface/loncommon.pm:1.1448 Wed Jan 29 09:11:10 2025
+++ loncom/interface/loncommon.pm Mon Feb 3 19:07:54 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1448 2025/01/29 09:11:10 raeburn Exp $
+# $Id: loncommon.pm,v 1.1449 2025/02/03 19:07:54 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -7323,6 +7323,10 @@
text-align:right;
}
+.LC_center {
+ text-align:center;
+}
+
.LC_middle {
vertical-align:middle;
}
@@ -9140,7 +9144,7 @@
padding: 0;
margin: 2px;
list-style:none;
- position:relative;
+ display:inline;
background-color:white;
overflow: auto;
}
@@ -9168,6 +9172,13 @@
background-color:transparent;
}
+.LC_navtools {
+ display: inline-block;
+ padding: 0;
+ margin: 2px;
+ vertical-align: middle;
+}
+
ul.LC_funclist {
margin: 0;
padding: 0.5em 1em 0.5em 0;
More information about the LON-CAPA-cvs
mailing list