--- loncom/interface/loncommon.pm	2025/02/17 18:48:06	1.1456
+++ loncom/interface/loncommon.pm	2025/02/21 20:55:17	1.1462
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1456 2025/02/17 18:48:06 raeburn Exp $
+# $Id: loncommon.pm,v 1.1462 2025/02/21 20:55:17 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1460,7 +1460,7 @@ $banner_link
 <a href="$link" title="$title" $linkattr>$text</a>
 END
     } else {
-        return '&nbsp;'.$text.'&nbsp;';
+        return '&nbsp;<h1 class="LC_helpmenu">'.$text.'</h1>&nbsp;';
     }
 }
 
@@ -1472,6 +1472,10 @@ sub help_menu_js {
     my $helptopic=&general_help();
     my $details_link = $httphost.'/adm/help/'.$helptopic.'.hlp';
     my $nothing=&Apache::lonhtmlcommon::javascript_nothing();
+    my $bannertitle = &mt('Help Menu');
+    &js_escape(\$bannertitle);
+    my $bodytitle = &mt('Documentation');
+    &js_escape(\$bodytitle);
     my $start_page =
         &Apache::loncommon::start_page('Help Menu', undef,
 				       {'frameset'    => 1,
@@ -1483,7 +1487,6 @@ sub help_menu_js {
     my $end_page =
         &Apache::loncommon::end_page({'frameset' => 1,
 				      'js_ready' => 1,});
-
     my $template .= <<"ENDTEMPLATE";
 <script type="text/javascript">
 // <![CDATA[
@@ -1508,8 +1511,8 @@ function helpMenu(target) {
     return;
 }
 function writeHelp(caller) {
-    caller.document.writeln('$start_page\\n<frame name="bannerframe" src="'+banner_link+'" marginwidth="0" marginheight="0" frameborder="0">\\n');
-    caller.document.writeln('<frame name="bodyframe" src="$details_link" marginwidth="0" marginheight="0" frameborder="0">\\n$end_page');
+    caller.document.writeln('$start_page\\n<frame name="bannerframe" title="$bannertitle" src="'+banner_link+'" marginwidth="0" marginheight="0" frameborder="0">\\n');
+    caller.document.writeln('<frame name="bodyframe" title="$bodytitle" src="$details_link" marginwidth="0" marginheight="0" frameborder="0">\\n$end_page');
     caller.document.close();
     caller.focus();
 }
@@ -5342,6 +5345,7 @@ sub get_student_view {
   $userview=~s/\<\/html\>//gi;
   $userview=~s/\<head\>//gi;
   $userview=~s/\<\/head\>//gi;
+  $userview=~s/\Q<div class="LC_landmark" role="main"\E/<div class="LC_landmark"/; 
   $userview=~s/action\s*\=/would_be_action\=/gi;
   $userview=&relative_to_absolute($feedurl,$userview);
   if (wantarray) {
@@ -7035,7 +7039,7 @@ sub bodytag {
             my $alttext = &mt('menu state: '.$menustate);
             my $tooltip = &mt($tiptext.' standard menus');
             $bodytag .= <<"END";
-<div id="LC_expandingContainer" style="display:inline;">
+<div id="LC_expandingContainer" style="display:inline;" role="navigation">
 <div id="LC_collapsible" class="LC_collapse_trigger" style="position: absolute;top: -5px;left: 0px; z-index:101; display:inline;">
 <a href="#" style="text-decoration:none;"><img class="LC_collapsible_indicator" alt="$alttext" title="$tooltip" src="/res/adm/pages/$menustate.png" style="border:0;margin:0;padding:0;max-width:100%;height:auto" /></a></div>
 <div class="LC_menus_content $divclass">
@@ -7061,7 +7065,7 @@ END
                 return $bodytag;
             }
 
-            $bodytag .= '<div class="LC_landmark" role="navigation" aria-label="'.$labeltext.'">';
+            $bodytag .= '<div class="LC_landmark" style="margin: 3px 0 0 0;" role="navigation" aria-label="'.$labeltext.'">';
             unless ($env{'request.symb'} =~ m/\.page___\d+___/) {
                 $bodytag .= qq|<div id="LC_nav_bar">$left $role</div>|;
             }
@@ -7072,8 +7076,9 @@ END
                 $dc_info = &dc_courseid_toggle($dc_info);
             }
             unless (($realm eq '') && ($dc_info eq '')) {
-                $bodytag .= qq|<div id="LC_realm">$realm $dc_info</div>|;
+                $bodytag .= qq|<div id="LC_realm" role="complementary">$realm $dc_info</div>|;
             }
+            $bodytag .= qq|<div style="clear: both; margin: 5px 0 0 0;"></div>|;
         }
 
         #if directed to not display the secondary menu, don't.  
@@ -7086,11 +7091,13 @@ END
         #don't show menus for public users
         if (!$public){
             unless ($args->{'no_inline_menu'}) {
-                $bodytag .= Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu,
+                $bodytag .= '<div class="LC_landmark" role="navigation" aria-label="Secondary Links">'.
+                            Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu,
                                                             $args->{'no_primary_menu'},
                                                             $menucoll,$menuref,
                                                             $args->{'links_disabled'},
-                                                            $args->{'links_target'});
+                                                            $args->{'links_target'}).
+                            '</div>';
             }
             $bodytag .= Apache::lonmenu::serverform();
             if ($need_endlcint) {
@@ -7105,7 +7112,7 @@ END
                                 $args->{'group'},$args->{'hide_buttons'},
                                 $hostname,$ltiscope,$ltiuri,$showncrumbsref);
             } else {
-                $bodytag .= 
+                $bodytag .=
                     &Apache::lonmenu::prepare_functions($env{'request.noversionuri'},
                                                         $forcereg,$args->{'group'},
                                                         $args->{'bread_crumbs'},
@@ -7114,7 +7121,7 @@ END
         } else {
             # this is to separate menu from content when there's no secondary
             # menu. Especially needed for publicly accessible resources.
-            $bodytag .= '<hr style="clear:both" />';
+            $bodytag .= '<hr style="clear:both" role="complementary" />';
             if ($need_endlcint) {
                 $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
             }
@@ -7336,6 +7343,10 @@ form, .inline {
   font-size: 1.17em;
 }
 
+.LC_heading_3 {
+  font-size: 1.0em;
+}
+
 .LC_menus_content.shown{
   display: block;
 }
@@ -7994,14 +8005,14 @@ table.LC_parm_overview_restrictions th {
   border-color: $pgbg;
 }
 
-table#LC_helpmenu {
-  border: none;
-  height: 55px;
-  border-spacing: 0;
-}
-
-table#LC_helpmenu fieldset legend {
-  font-size: larger;
+h1.LC_helpmenu {
+  display: inline;
+  font-size: 100%;
+  font-weight: normal;
+  line-height: 1em;
+  margin: 0;
+  padding: 0;
+  border: 0;
 }
 
 .LC_helpdesk_headbox {
@@ -8461,6 +8472,10 @@ div.LC_grade_show_user div.LC_Box {
   margin-right: 50px;
 }
 
+div.LC_grade_show_user div.LC_Box table tr th {
+  font-weight: normal;
+}
+
 div.LC_grade_submissions,
 div.LC_grade_message_center,
 div.LC_grade_info_links {
@@ -8491,6 +8506,12 @@ table.LC_scantron_action tr th {
   font-style:normal;
 }
 
+div.LC_edit_problem_daxe_header {
+  padding: 3px;
+  background: $tabbg;
+  z-index: 100;
+}
+
 .LC_edit_problem_header,
 div.LC_edit_problem_footer {
   font-weight: normal;
@@ -8556,8 +8577,9 @@ img.stift {
   vertical-align: middle;
 }
 
-table td.LC_mainmenu_col_fieldset {
-  vertical-align: top;
+div.LC_mainmenu {
+  margin: 3px 2px 2px 1px;
+  float: left;
 }
 
 div.LC_createcourse {
@@ -8639,8 +8661,9 @@ fieldset {
 }
 
 fieldset#LC_selectuser {
-    margin: 0;
-    padding: 0;
+  margin: -1px 0 0 0;
+  padding: 0;
+  border: 0;
 }
 
 article.geogebraweb div {
@@ -9337,13 +9360,39 @@ pre.LC_wordwrap {
 /*
   styles used for response display
 */
-div.LC_radiofoil, div.LC_rankfoil {
+div.LC_radiofoil, div.LC_rankfoil, div.LC_optionfoil, div.LC_matchfoil {
   margin: .5em 0em .5em 0em;
 }
 table.LC_itemgroup {
   margin-top: 1em;
 }
 
+table.LC_itemgroup tr th {
+  font-weight: normal;
+}
+
+fieldset.LC_webbubbles {
+  margin: 2px 0 0 0;
+  padding: 0;
+  border: 0;
+}
+
+ul.LC_webbubbles {
+  list-style: none;
+  padding: 0;
+  margin: 0;
+  text-align: left;
+  float: left;
+}
+
+ul.LC_webbubbles li {
+  line-height: 1.8em;
+  border: 1px solid black;
+  padding: 0 2px 0 5px;
+  margin: 0 0 0 -1px;
+  float: left;
+}
+
 /*
   styles used by TTH when "Default set of options to pass to tth/m
   when converting TeX" in course settings has been set
@@ -9902,7 +9951,7 @@ sub xml_begin {
 	    .'xmlns="http://www.w3.org/1999/xhtml">';
     } elsif ($is_frameset) {
         $output='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'."\n".
-                '<html>'."\n";
+                '<html lang="en">'."\n";
     } else {
 	$output='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n".
                 '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n";
@@ -10815,8 +10864,10 @@ sub simple_error_page {
     }
 
     my $page =
-	&Apache::loncommon::start_page($title,'',\%displayargs).
+	&Apache::loncommon::start_page($title,'',\%displayargs)."\n".
+        '<div class="LC_landmark" style="clear:both" role="main">'.
 	'<p class="LC_error">'.$msg.'</p>'.
+        '</div>'.
 	&Apache::loncommon::end_page();
     if (ref($r)) {
 	$r->print($page);