[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm
raeburn
raeburn at source.lon-capa.org
Wed Feb 19 18:31:46 EST 2025
raeburn Wed Feb 19 23:31:46 2025 EDT
Modified files:
/loncom/homework structuretags.pm
Log:
- WCAG 2 compliance.
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.588 loncom/homework/structuretags.pm:1.589
--- loncom/homework/structuretags.pm:1.588 Fri Jan 3 13:14:50 2025
+++ loncom/homework/structuretags.pm Wed Feb 19 23:31:46 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.588 2025/01/03 13:14:50 raeburn Exp $
+# $Id: structuretags.pm,v 1.589 2025/02/19 23:31:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -596,10 +596,16 @@
my $page_start = &Apache::loncommon::start_page($name,$extra_head,
\%body_args);
$page_start .= $pageheader;
+ if ($target eq 'web') {
+ $page_start .= '<div class="LC_landmark" role="main">'."\n";
+ }
if (!defined($found{'body'})
&& $env{'request.state'} ne 'construct'
&& ($target eq 'web' || $target eq 'webgrade')) {
+ if ($target eq 'web') {
+ $page_start .= '<h1 class="LC_visually_hidden">'.&mt('Resource').'</h1>';
+ }
my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser();
if ($symb eq '' && !$publicuser) {
$page_start .= '<p class="LC_info">'
@@ -2410,7 +2416,7 @@
# Closing tags delayed so any <script></script> tags
# not in head can appear inside body, for valid xhtml.
#
- $result .= "</body>\n</html>";
+ $result .= "</div>\n</body>\n</html>";
}
return $result;
}
More information about the LON-CAPA-cvs
mailing list