[LON-CAPA-cvs] cvs: loncom /interface lonviewcoauthors.pm
raeburn
raeburn at source.lon-capa.org
Mon Jan 5 14:17:47 EST 2026
raeburn Mon Jan 5 19:17:47 2026 EDT
Modified files:
/loncom/interface lonviewcoauthors.pm
Log:
- WCAG compliance
- Include landmark for page's main content to support "Skip to main content"
- Sequential headings.
- alt attribute for mailto.gif icon.
Index: loncom/interface/lonviewcoauthors.pm
diff -u loncom/interface/lonviewcoauthors.pm:1.6 loncom/interface/lonviewcoauthors.pm:1.7
--- loncom/interface/lonviewcoauthors.pm:1.6 Sat Aug 31 21:00:44 2024
+++ loncom/interface/lonviewcoauthors.pm Mon Jan 5 19:17:47 2026
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to display the coauthors
#
-# $Id: lonviewcoauthors.pm,v 1.6 2024/08/31 21:00:44 raeburn Exp $
+# $Id: lonviewcoauthors.pm,v 1.7 2026/01/05 19:17:47 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -97,19 +97,19 @@
# Print page header
my $args = { 'bread_crumbs' => $brcrum };
$r->print(&Apache::loncommon::start_page('Co-author listing',undef,
- $args));
-
+ $args)
+ .'<div class="LC_landmark" role="main" id="LC_main_content">'."\n");
if (($canedit) && ($env{'form.forceedit'})) {
$r->print(&edit_settings($audom,$auname,$role,$caller,\%viewsettings));
} elsif ($viewsettings{'show'} eq 'none') {
- $r->print('<h3>'.&mt('Coauthor-viewable listing').'</h3>'.
+ $r->print('<h2 class="LC_heading_2">'.&mt('Coauthor-viewable listing').'</h2>'.
'<p class="LC_info">'.&mt('Listing of co-authors not enabled for this Authoring Space').'</p>');
} else {
&print_coauthors($r,$auname,$audom,$role,$caller,\%viewsettings);
}
# Print page footer
- $r->print(&Apache::loncommon::end_page());
+ $r->print('</div>'.&Apache::loncommon::end_page());
return OK;
}
@@ -272,7 +272,7 @@
}
}
&Apache::lonnet::appenv(\%envhash);
- $output = '<h3>'.$lt{'slcc'}.'</h3><ul>';
+ $output = '<h2 class="LC_heading_2">'.$lt{'slcc'}.'</h2><ul>';
foreach my $key ('coauthorlist','coauthoroptin') {
if (exists($changed{$key})) {
$output .= '<li>'.
@@ -283,11 +283,11 @@
}
$output .= '</ul>';
} else {
- $output = '<h3>'.$lt{'ncms'}.'</h3>'.
+ $output = '<h2 class="LC_heading_2">'.$lt{'ncms'}.'</h2>'.
'<p class="LC_warning">'.$lt{'apos'}.'</p>';
}
} else {
- $output = '<h3>'.$lt{'ncms'}.'</h3>';
+ $output = '<h2 class="LC_heading_2">'.$lt{'ncms'}.'</h2>';
}
} else {
my %sel;
@@ -312,7 +312,7 @@
if ($caller eq '/adm/createuser') {
$hiddenaction = '<input type="hidden" name="action" value="calist" />'."\n";
}
- $output = '<h3>'.$lt{'cloc'}.'</h3>'."\n".
+ $output = '<h2 class="LC_heading_2">'.$lt{'cloc'}.'</h2>'."\n".
'<form method="post" name="display" action="'.$caller.'">'."\n".
'<input type="hidden" name="caller" value="'.$caller.'" />'."\n".
'<input type="hidden" name="state" value="setconfig" />'."\n".
@@ -367,7 +367,7 @@
);
if (($auname ne '') && ($audom ne '')) {
my (%shownstatus,%coauthors);
- $r->print("<h3>$lt{'cvl'}</h3>");
+ $r->print('<h2 class="LC_heading_2">'.$lt{'cvl'}.'</h2>');
if ($env{'form.action'} eq 'setenv') {
$r->print(&process_coauthor_prefs($auname,$audom,$caller));
}
@@ -509,10 +509,10 @@
}
}
if ($displaycount) {
- $r->print('<h4>'.$output.'</h4>');
+ $r->print('<h3 class="LC_heading_3">'.$output.'</h3>');
my $table = '<br />'.&Apache::loncommon::start_data_table()."\n".
&Apache::loncommon::start_data_table_header_row()."\n".
- '<th></th>'. # for the count
+ '<th>#</th>'.
'<th>'.$lt{'nam'}.'</th>'.
'<th>'.$lt{'usr'}.'</th>';
unless ($roletype) {
@@ -544,7 +544,7 @@
$username,$domain).
'</td>'.
'<td>'.&Apache::loncommon::messagewrapper
- ('<img src="/adm/lonIcons/mailto.gif" border="0" /> '.
+ ('<img src="/adm/lonIcons/mailto.gif" border="0" alt="'.&mt('mail-to icon').'" /> '.
$user,$username,$domain).
'</td>';
unless ($roletype) {
More information about the LON-CAPA-cvs
mailing list