[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
raeburn
raeburn at source.lon-capa.org
Mon May 11 08:13:55 EDT 2026
raeburn Mon May 11 12:13:55 2026 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
- WCAG 2 compliance.
- Include landmark for page's main content to support "Skip to main content".
- Include labels for form elements.
- Satisfy minimum spacing between touch targets.
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.260 loncom/interface/lonmeta.pm:1.261
--- loncom/interface/lonmeta.pm:1.260 Sun Jan 4 19:08:16 2026
+++ loncom/interface/lonmeta.pm Mon May 11 12:13:55 2026
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.260 2026/01/04 19:08:16 raeburn Exp $
+# $Id: lonmeta.pm,v 1.261 2026/05/11 12:13:55 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -529,7 +529,7 @@
# List of courses
if ($type=~/\_list/) {
my @Courses = split(/\s*\,\s*/,$value);
- my $Str='<ul class="LC_fontsize_medium">';
+ my $Str='<ul class="LC_fontsize_medium" style="line-height: 195%;">';
my %descriptions;
foreach my $course (@Courses) {
my %courseinfo =
@@ -782,6 +782,7 @@
$output .= &Apache::loncommon::head_subbox(
&Apache::loncommon::CSTR_pageheader());
}
+ $output .= "\n".'<div class="LC_landmark" role="main" id="LC_main_content">'."\n";
return $output;
}
@@ -888,7 +889,7 @@
{'domain' => $resdomain,
'only_body' => 1,})
.'<div class="LC_landmark" role="main" id="LC_main_content">'
- .'<h1>'.&mt('Metadata').'</h1>'
+ .'<h1 class="LC_heading_1">'.&mt('Metadata').'</h1>'
);
if ($env{'form.modal'}) {
my $width = 500;
@@ -1077,7 +1078,7 @@
delete($content{$field});
}
#
- $r->print("<h2>$title</h2>"
+ $r->print("<h2 class=\"LC_heading_2\">$title</h2>"
.'<p>'
.$disuri.'<br />'
.$obsoletewarning
@@ -1474,7 +1475,7 @@
}
}
$r->print(<<ENDEDIT);
-<h2>$displayfile</h2>
+<h2 class="LC_heading_2">$displayfile</h2>
<form method="post" action="" name="defaultmeta">
ENDEDIT
my %lt=&fieldnames($file_type);
@@ -1640,7 +1641,8 @@
($field_name eq 'courserestricted'))&&
(!($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'} =~ m/deleted/))){
- $output .= &Apache::lonhtmlcommon::row_title($lt{$field_name})
+ $output .= &Apache::lonhtmlcommon::row_title('<label for="$field_name">'
+ .$lt{$field_name}.'</label>')
.&prettyinput($field_name,
$Apache::lonpublisher::metadatafields{$field_name},
$readonly,'new_'.$field_name,'defaultmeta',
More information about the LON-CAPA-cvs
mailing list