[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Fri Feb 14 18:10:30 EST 2025
raeburn Fri Feb 14 23:10:30 2025 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- WCAG 2 compliance.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1453 loncom/interface/loncommon.pm:1.1454
--- loncom/interface/loncommon.pm:1.1453 Fri Feb 14 22:42:05 2025
+++ loncom/interface/loncommon.pm Fri Feb 14 23:10:30 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1453 2025/02/14 22:42:05 raeburn Exp $
+# $Id: loncommon.pm,v 1.1454 2025/02/14 23:10:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -6947,8 +6947,6 @@
$role = &Apache::lonnet::plaintext($role);
}
- if (!$realm) { $realm=' '; }
-
my $extra_body_attr = &make_attr_string($forcereg,\%design);
# construct main body tag
@@ -6972,7 +6970,6 @@
undef($role);
}
unless ($ltimenu->{'coursetitle'}) {
- $realm=' ';
$showcrstitle = 0;
}
}
@@ -6982,7 +6979,6 @@
undef($role);
}
unless ($menuref->{'crs'}) {
- $realm=' ';
$showcrstitle = 0;
}
}
@@ -7050,29 +7046,34 @@
$args->{'links_disabled'},
$args->{'links_target'},
$collapsible);
-
+ my $labeltext = &HTML::Entities::encode(&mt('Primary links'));
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
if ($dc_info) {
$dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|;
}
- $bodytag .= qq|<div id="LC_nav_bar">$left $role<br />
- <em>$realm</em> $dc_info</div>|;
+ $bodytag .= qq|<div id="LC_nav_bar" role="navigation" aria-label="$labeltext">$left $role<br />|;
+ unless (($realm eq '') && ($dc_info eq '')) {
+ $bodytag .= qq|<div id="LC_realm" role="complementary"><em>$realm</em> $dc_info</div>|;
+ }
if ($need_endlcint) {
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
}
return $bodytag;
}
+ $bodytag .= '<div class="LC_landmark" role="navigation" aria-label="'.$labeltext.'">';
unless ($env{'request.symb'} =~ m/\.page___\d+___/) {
$bodytag .= qq|<div id="LC_nav_bar">$left $role</div>|;
}
- $bodytag .= $right;
+ $bodytag .= $right.'</div>';
if ($dc_info) {
$dc_info = &dc_courseid_toggle($dc_info);
}
- $bodytag .= qq|<div id="LC_realm">$realm $dc_info</div>|;
+ unless (($realm eq '') && ($dc_info eq '')) {
+ $bodytag .= qq|<div id="LC_realm">$realm $dc_info</div>|;
+ }
}
#if directed to not display the secondary menu, don't.
@@ -8054,7 +8055,7 @@
border-spacing: 1px;
}
-table.LC_pick_box td.LC_pick_box_title {
+table.LC_pick_box th.LC_pick_box_title {
background: $sidebg;
font-weight: bold;
text-align: left;
More information about the LON-CAPA-cvs
mailing list