[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonsupportreq.pm

raeburn raeburn at source.lon-capa.org
Mon Feb 17 13:48:06 EST 2025


raeburn		Mon Feb 17 18:48:06 2025 EDT

  Modified files:              
    /loncom/interface	lonsupportreq.pm loncommon.pm 
  Log:
  - WCAG 2 compliance.
  
  
-------------- next part --------------
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.106 loncom/interface/lonsupportreq.pm:1.107
--- loncom/interface/lonsupportreq.pm:1.106	Mon Jul 15 17:12:40 2024
+++ loncom/interface/lonsupportreq.pm	Mon Feb 17 18:48:06 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Helpdesk request form
 #
-# $Id: lonsupportreq.pm,v 1.106 2024/07/15 17:12:40 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.107 2025/02/17 18:48:06 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -330,11 +330,17 @@
                        onload   => "initialize_codes();",
                       );
 
-    
-    $r->print(&Apache::loncommon::start_page('Support Request',$js,
-				       { 'function'    => $function,
-					 'add_entries' => \%add_entries,
-					 'only_body'   => 1,}));
+    my $args = { 'function'    => $function,
+                 'add_entries' => \%add_entries,
+                 'only_body'   => 1,};
+    unless (($knownuser) || ($public)) {
+        (undef,undef,undef,my $clientmathml,my $clientunicode) =
+            &Apache::loncommon::decode_user_agent();
+        if ($clientunicode && !$clientmathml) {
+            $args->{'browser.unicode'} = 1;
+        }
+    }
+    $r->print(&Apache::loncommon::start_page('Support Request',$js,$args));
     if ($r->uri eq '/adm/helpdesk') {
         &print_header($r,$origurl);
     }
@@ -347,30 +353,33 @@
     }
     my $topsubmit = '     <input type="button" value="'.$html_lt{'subm'}.'" onclick="validate()" /> ';
     my $shownsubmit;
-    $r->print('<form method="post" action="" name="logproblem"'.$formtype.'>'."\n");
+    $r->print('<div class="LC_landmark" role="main">'."\n".
+              '<form method="post" action="" name="logproblem"'.$formtype.'>'."\n");
     my $output = &Apache::lonhtmlcommon::start_pick_box().
                  &Apache::lonhtmlcommon::row_headline().
                  '<span class="LC_info">'.
-                 &mt('(All fields marked with * are required.)').
+                 &mt('(All fields marked with [_1]*[_2] are required.)',
+                     '<span class="LC_parm_part">','</span>').
                  '</span>'.
                  &Apache::lonhtmlcommon::row_closure();
     unless ($helpform{'username'} eq 'no') {
         my ($reqd,$namefield,$fullname);
         if ((defined($lastname) && $lastname ne '') && (defined($firstname) && $firstname ne '')) {
             $fullname = "$firstname $lastname";
-            $namefield = $fullname.'<input type="hidden" name="username" value="'.&HTML::Entities::encode($fullname,'"<>&').'" />'."\n";
+            $namefield = $fullname.'<input type="hidden" name="username" id="username" value="'.&HTML::Entities::encode($fullname,'"<>&').'" />'."\n";
         } else {
             if (defined($firstname) && $firstname ne '') {
                 $fullname = $firstname;
             } elsif (defined($lastname) && $lastname ne '') {
                 $fullname = " $lastname";
             }
-            $namefield = '<input type="text" size="20" name="username" value="'.&HTML::Entities::encode($fullname,'"<>&').'" />'."\n";
+            $namefield = '<input type="text" size="20" name="username" id="username" value="'.&HTML::Entities::encode($fullname,'"<>&').'" />'."\n";
             if ($helpform{'username'} eq 'req') {
-                $reqd = '<span class="LC_info">*</span>';
+                $reqd = '<span class="LC_parm_part">*</span>';
             }
         }
-        $output .= &Apache::lonhtmlcommon::row_title($html_lt{'name'}.$reqd,undef,$css[$num])."\n".$namefield.
+        my $title = '<label for="username">'.$html_lt{'name'}.'</label>';
+        $output .= &Apache::lonhtmlcommon::row_title($title.$reqd,undef,$css[$num])."\n".$namefield.
                    $topsubmit.
                    &Apache::lonhtmlcommon::row_closure()."\n";
         $shownsubmit = 1;
@@ -379,9 +388,10 @@
     }
     $output .= &Apache::lonhtmlcommon::row_title(
                    '<span title="'.&mt('required').'">'.
-                   $html_lt{'emad'}.' <span class="LC_info">*</span></span>'
+                   '<label for="email">'.$html_lt{'emad'}.
+                   '</label><span class="LC_parm_part">*</span></span>'
                   ,undef,$css[$i]).
-               '<input type="text" size="20" name="email" value="'.
+               '<input type="text" size="20" name="email" id="email" value="'.
                &HTML::Entities::encode($email,'"<>&').'" />'."\n";
     unless ($shownsubmit) {
         $output .= $topsubmit;
@@ -396,8 +406,9 @@
             my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) =
                 &Apache::loncommon::blockcheck(\%setters,'com',$ip);
             unless (($helpform{'cc'} eq 'no') || ($by_ip)) {
-                $output .= &Apache::lonhtmlcommon::row_title($html_lt{'emac'},undef,$css[$i]).
-                           '<input type="text" size="50" name="cc" value="" /><br />'."\n".
+                $output .= &Apache::lonhtmlcommon::row_title('<label for="cc">'.$html_lt{'emac'}.'</label>',
+                                                             undef,$css[$i]).
+                           '<input type="text" size="50" name="cc" id="cc" value="" /><br />'."\n".
                            &Apache::lonhtmlcommon::row_closure();
                 $num ++;
                 $i = $num%2;
@@ -411,7 +422,9 @@
         my $uname_input = '<input type="hidden" name="uname" value="'.
                          &HTML::Entities::encode($uname,'"<>&').'" />'."\n";
         if ($knownuser) {
-            $output .= '<i>'.$html_lt{'unme'}.'</i>: '.$uname.'  <i>'.$html_lt{'doma'}.'</i>: '.$udom.$udom_input.$uname_input;
+            $output .= '<span class="LC_nobreak"><span class="LC_cusr_emph">'.$html_lt{'unme'}
+                      .'</span>: '.$uname.'  <span class="LC_cusr_emph">'
+                      .$html_lt{'doma'}.'</span>: '.$udom.$udom_input.$uname_input.'</span>';
         } else {
             my $udomform = '';
             my $unameform = '';
@@ -425,17 +438,21 @@
             $output .= '<br />'."\n";
             if (!$public) {
                 if ($env{'user.domain'} =~ /^$match_domain$/) {
-                    $udomform = '<i>'.$html_lt{'doma'}.'</i>: '.$udom.$udom_input;
+                    $udomform = '<span class="LC_cusr_emph">'.$html_lt{'doma'}.'</span>: '.$udom.$udom_input;
                 } elsif ($env{'user.name'} =~ /^$match_username$/) {
-                    $unameform = '<i>'.$html_lt{'unme'}.'</i>: '.$uname.'  '.$uname_input;
+                    $unameform = '<span class="LC_cusr_emph">'.$html_lt{'unme'}.'</span>: '.$uname.'  '.$uname_input;
                 }
             }
             if ($udomform eq '') {
-                $udomform = '<i>'.$html_lt{'doma'}.'</i>: ';
-                $udomform .= &Apache::loncommon::select_dom_form($codedom,'udom')."\n";
+                $udomform = '<span class="LC_nobreak"><span class="LC_cusr_emph"><label for="udom">'
+                           .$html_lt{'doma'}.'</label></span>: '
+                           .&Apache::loncommon::select_dom_form($codedom,'udom','','','','','','','udom')."</span>\n";
             }
             if ($unameform eq '') {
-                $unameform= '<i>'.$html_lt{'unme'}.'</i>: <input type="text" size="20" name="uname" value="'.$uname.'" />  ';
+                $unameform= '<span class="LC_nobreak"><span class="LC_cusr_emph"><label for="uname">'
+                           .$html_lt{'unme'}.'</label></span>: '
+                           .'<input type="text" size="20" name="uname" id="uname" value="'.$uname.'" />'
+                           .'  </span>';
             }
             $output .= $unameform.$udomform;
         }
@@ -452,10 +469,10 @@
     unless ($helpform{'phone'} eq 'no') {
         my $reqd;
         if ($helpform{'phone'} eq 'req') {
-            $reqd = '<span class="LC_info">*</span>';
+            $reqd = '<span class="LC_parm_part">*</span>';
         }
-        $output .= &Apache::lonhtmlcommon::row_title($html_lt{'phon'}.$reqd,undef,'LC_evenrow_value').
-                   '<input type="text" size="15" name="phone" /><br />'."\n".
+        $output .= &Apache::lonhtmlcommon::row_title('<label for="phone">'.$html_lt{'phon'}.'</label>'.$reqd,undef,'LC_evenrow_value').
+                   '<input type="text" size="15" name="phone" id="phone" /><br />'."\n".
                    &Apache::lonhtmlcommon::row_closure();
         $num ++;
         $i = $num%2;
@@ -465,8 +482,8 @@
         if ($totcodes > 0) {
             my $numtitles = @codetitles;
             if ($numtitles == 0) {
-                $output .= $html_lt{'enin'}.': 
-                  <input type="text" name="coursecode" size="15" value="'.&HTML::Entities::encode($ccode,'\'"&<>').'" />'."\n";
+                $output .= '<label>'.$html_lt{'enin'}.': 
+                  <input type="text" name="coursecode" size="15" value="'.&HTML::Entities::encode($ccode,'\'"&<>').'" /></label>'."\n";
             } else {
                 my @standardnames = &Apache::loncommon::get_standard_codeitems();
                 my $lasttitle = $numtitles;
@@ -477,8 +494,13 @@
                 if ($sectionlist) {
                     $onchange = 'toggleSecVis()';
                 }
-                $output .= '<table><tr><td>'.$codetitles[0].'<br />'."\n".
-                      '<select name="'.$standardnames[0].'" onchange="courseSet('."'$codetitles[0]'".');'.$onchange.'">'."\n".
+                $output .= '<table><tr>';
+                for (my $i=0; $i<$lasttitle; $i++) {
+                    $output .= '<th><label for="'.$standardnames[$i].'_'.$i.'">'.$codetitles[0].'</label></th>';
+                }
+                $output .= '</tr>';
+                $output .= '<tr><td>'.
+                      '<select name="'.$standardnames[0].'" id="'.$standardnames[0].'_0" onchange="courseSet('."'$codetitles[0]'".');'.$onchange.'">'."\n".
                       ' <option value="-1">'.$html_lt{'sele'}."</option>\n";
                 my @items = ();
                 my @longitems = ();
@@ -505,40 +527,42 @@
                     $output .= ' <option value="'.$items[$i].'">'.$longitems[$i].'</option>'."\n";
                 }
                 $output .= '</select></td>';
-                for (my $i=1; $i<$numtitles; $i++) {
-                    $output .= '<td>'.$codetitles[$i].'<br />'."\n".
-                     '<select name="'.$standardnames[$i].'" onchange="courseSet('."'$codetitles[$i]'".');'.$onchange.'">'."\n".
+                for (my $i=1; $i<$lasttitle; $i++) {
+                    $output .= '<td>'."\n".
+                     '<select name="'.$standardnames[$i].'" id="'.$standardnames[$i].'_'.$i.'" onchange="courseSet('."'$codetitles[$i]'".');'.$onchange.'">'."\n".
                      '<option value="-1"><-'.$html_lt{'pick'}.' '.$codetitles[$i-1].'</option>'."\n".
                      '</select>'."\n".
                      '</td>'."\n";
                 }
                 $output .= '</tr></table>';
                 if ($numtitles > 4) {
-                    $output .= '<br /><br />'.$codetitles[$numtitles].'<br />'."\n".
+                    $output .= '<br /><br /><label>'.$codetitles[$numtitles].'<br />'."\n".
                           '<select name="'.$standardnames[$numtitles].'" onchange="courseSet('."'$codetitles[$numtitles]'".');'.$onchange.'">'."\n".
                           '<option value="-1"><-'.$html_lt{'pick'}.' '.$codetitles[$numtitles-1].'</option>'."\n".
-                          '</select>'."\n";
+                          '</select></label>'."\n";
                 }
             }
         } else {
-            $output .= $html_lt{'enin'}.': 
-                  <input type="text" name="coursecode" size="15" value="" />'."\n";
+            $output .= '<label>'.$html_lt{'enin'}.': 
+                  <input type="text" name="coursecode" size="15" value="" /></label>'."\n";
         }
         my $reqd;
         if ($helpform{'course'} eq 'req') {
-             $reqd = '<span class="LC_info">*</span>';
+             $reqd = '<span class="LC_parm_part">*</span>';
         }
-        $output .= '<br />'.$html_lt{'enct'}.$reqd.': 
+        $output .= '<br /><div><label>'.$html_lt{'enct'}.$reqd.': 
                    <input type="text" name="title" size="25" value="'.
-                   &HTML::Entities::encode($ctitle,'"<>&').'" />'."\n";
+                   &HTML::Entities::encode($ctitle,'"<>&').'" /></label></div>'."\n";
         $output .= &Apache::lonhtmlcommon::row_closure();
         $num ++;
         $i = $num%2;
     }
     unless (($helpform{'section'} eq 'no') || ($env{'request.lti.login'})) {
-        $output .= &Apache::lonhtmlcommon::row_title($html_lt{'secn'},undef,$css[$i]);
+        $output .= &Apache::lonhtmlcommon::row_title('<label for="section">'.$html_lt{'secn'}.'</label>',
+                                                     undef,$css[$i]);
         if ($sectionlist) {
-            $output .= "<div id=\"LC_helpdesk_sectionlist\"><select name=\"sectionsel\">\n".
+            $output .= "<div id=\"LC_helpdesk_sectionlist\">\n".
+                       "<select name=\"sectionsel\" id=\"section\">\n".
                        "  <option value=\"\" selected=\"selected\">$html_lt{'sele'}</option>\n";
             foreach my $id (sort(keys(%groupid))) {
                 if ($id eq $groupid{$id} || $groupid{$id} eq '') {
@@ -553,9 +577,9 @@
             }
             $output .= '</select></div>'."\n".
                        '<div id="LC_helpdesk_section" style="display:none">'.
-                       '<input type="text" name="sectiontxt" size="10" /></div>'."\n";
+                       '<input type="text" name="sectiontxt" id="notinuse" size="10" /></div>'."\n";
         } else {
-            $output .= '<input type="text" name="section" size="10" />'."\n";
+            $output .= '<input type="text" name="section" id="section" size="10" />'."\n";
         }
         $output .= &Apache::lonhtmlcommon::row_closure();
         $num ++;
@@ -563,15 +587,17 @@
     }
     $output .= &Apache::lonhtmlcommon::row_title(
                    '<span title="'.&mt('required').'">'.
-                   $html_lt{'subj'}.' <span class="LC_info">*</span></span>'
+                   '<label for="subject">'.$html_lt{'subj'}.'</label>'.
+                   '<span class="LC_parm_part">*</span></span>'
                   ,undef,'LC_oddrow_value').
-               '<input type="text" size="40" name="subject" />'."\n".
+               '<input type="text" size="40" name="subject" id="subject" />'."\n".
                &Apache::lonhtmlcommon::row_closure().
                &Apache::lonhtmlcommon::row_title(
                    '<span title="'.&mt('required').'">'.
-                   $html_lt{'detd'}.' <span class="LC_info">*</span></span>'
+                   '<label for="description">'.$html_lt{'detd'}.'</label>'.
+                   '<span class="LC_parm_part">*</span></span>'
                   ,undef,'LC_evenrow_value').
-               '<textarea rows="10" cols="45" name="description" style="word-wrap:normal;">'.
+               '<textarea rows="10" cols="45" name="description" id="description" style="word-wrap:normal;">'.
                '</textarea>'."\n".
                &Apache::lonhtmlcommon::row_closure();
     $num ++;
@@ -587,9 +613,9 @@
                 }
                 $showmax = ' ('.sprintf("%.2f",$showmax).' '.&mt('MB max.').')';
                 $output .= &Apache::lonhtmlcommon::row_title($html_lt{'opfi'},undef,$css[$i])
-                    .' <input type="file" name="screenshot" class="LC_flUpload" size="20" />'
+                    .'<input type="file" name="screenshot" id="screenshot" class="LC_flUpload" size="20" />'
                     .'<input type="hidden" id="LC_free_space" value="'.$max.'" />'
-                    .'<br />'."\n".$html_lt{'uplf'}.$showmax."\n"
+                    .'<br />'."\n".'<label for="screenshot">'.$html_lt{'uplf'}.'</label>'.$showmax."\n"
                     .&Apache::lonhtmlcommon::row_closure();
                 $num ++;
                 $i = $num%2;
@@ -600,7 +626,7 @@
             $output .= &Apache::lonhtmlcommon::row_title(
                            '<span title="'.&mt('required').'">'.
                            &mt('Validation').
-                           ' <span class="LC_info">*</span></span>'
+                           '<span class="LC_parm_part">*</span></span>'
                       ,undef,$css[$i]).
                        $captcha_form."\n".
                        &Apache::lonhtmlcommon::row_closure();
@@ -610,18 +636,16 @@
     }
     $output .= &Apache::lonhtmlcommon::row_title($html_lt{'fini'},undef,$css[$i]);
     $output .= <<END;
-             <table border="0" cellpadding="8" cellspacing="0">
-              <tr>
-               <td>
+             <div>
+               <div class="LC_floatleft" style="padding-top:0, padding-left:8px; padding-right:8px; padding-bottom:0; margin:0">
                 <input type="hidden" name="command" value="process" />
                 <input type="button" value="$html_lt{'subm'}" onclick="validate()" />  
-               </td>
-               <td> </td>
-               <td>
+               </div>
+               <div class="LC_floatleft" style="padding-top:0, padding-left:8px; padding-right:8px; padding-bottom:0; margin:0">
                 <input type="reset" value="$html_lt{'clfm'}" />
-               </td>
-              </tr>
-             </table>
+               </div>
+             </div>
+             <div style="padding:0;clear:both;margin:0;border:0"></div>
 END
     $output .= &Apache::lonhtmlcommon::row_closure(1);
     $output .= &Apache::lonhtmlcommon::end_pick_box();
@@ -629,6 +653,7 @@
 $output
 </form>
 <br />
+</div>
 END
     $r->print(&Apache::loncommon::end_page());
     return;
@@ -637,6 +662,7 @@
 sub print_request_receipt {
     my ($r,$url,$function) = @_;
     my $public;
+    my $args;
     if (($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public')) {
         $public = 1;
     }
@@ -645,25 +671,33 @@
         my ($captcha_chk,$captcha_error) = 
             &Apache::loncommon::captcha_response('login',$lonhost);
         if ($captcha_chk != 1) {
-            $r->print(&Apache::loncommon::start_page('Support request failed',undef,
-                                       {'function'    => $function,
-                                        'add_entries' => {
-                                            topmargin    => "0",
-                                            marginheight => "0",
-                                        },
-                                        'only_body'   => 1,}));
+            $args = {
+                     'function'    => $function,
+                     'add_entries' => {
+                                         topmargin    => "0",
+                                         marginheight => "0",
+                                      },
+                     'only_body'   => 1,};
+            (undef,undef,undef,my $clientmathml,my $clientunicode) =
+                &Apache::loncommon::decode_user_agent();
+            if ($clientunicode && !$clientmathml) {
+                $args->{'browser.unicode' => 1};
+            }
+            $r->print(&Apache::loncommon::start_page('Support request failed',undef,$args));
             if ($r->uri eq '/adm/helpdesk') {
                 &print_header($r,$url,'process');
             }
             $r->print(
-                '<h2>'.&mt('Support request failed').'</h2>'.
+                '<div class="LC_landmark" role="main">'.
+                '<h2 class="LC_heading_2">'.&mt('Support request failed').'</h2>'.
                       &Apache::lonhtmlcommon::confirm_success(
                         &mt('Validation of the code you entered failed.'),1).
                 '<br /><br />'.
                 &Apache::lonhtmlcommon::actionbox([
                     &mt('[_1]Go back[_2] and try again',
                         '<a href="javascript:history.go(-1)">','</a>')]).
-                      &Apache::loncommon::end_page());
+                '</div>'.
+                &Apache::loncommon::end_page());
             return;
         }
     }
@@ -941,18 +975,19 @@
 
     $displaymsg .= '<span class="LC_helpform_receipt_cat">'.
                    $lt{'date'}.'</span>: '.$reporttime.'<br />'."\n";
-
-    my $start_page = 
-	&Apache::loncommon::start_page('Support request recorded',undef,
-				       {'function'    => $function,
-					'add_entries' => {
-					    topmargin    => "0",
-					    marginheight => "0",
-					},
-					'only_body'   => 1,});
-
+    my $args = {'function'    => $function,
+                'add_entries' => {
+                                    topmargin    => "0",
+                                    marginheight => "0",
+                                 },
+                'only_body'   => 1,};
+    (undef,undef,undef,my $clientmathml,my $clientunicode) =
+        &Apache::loncommon::decode_user_agent();
+    if ($clientunicode && !$clientmathml) {
+        $args->{'browser.unicode'} = 1;
+    }
+    $r->print(&Apache::loncommon::start_page('Support request recorded',undef,$args));
     $r->print(<<"END");
-$start_page
 <form name="logproblem" action="">
 <input type="hidden" name="command" value="result" />
 </form>
@@ -1001,8 +1036,10 @@
             $message .= &mt('As the e-mail address provided for this LON-CAPA server ([_1]) does not appear to be a valid e-mail address, your support request has [_2]not[_3] been sent to the LON-CAPA support staff or administrator at your institution.','<tt>'.$to.'</tt>','<b>','</b>');
         }
     }
-    $r->print(&Apache::loncommon::confirmwrapper(&Apache::lonhtmlcommon::confirm_success($message,$bad_email)));
-
+    $r->print('<div class="LC_landmark" role="main">');
+    if ($bad_email) {
+        $r->print(&Apache::loncommon::confirmwrapper(&Apache::lonhtmlcommon::confirm_success($message,$bad_email)).'<br />');
+    }
     if ($reqemail ne '') {
         $from = $reqemail;
     }
@@ -1130,12 +1167,12 @@
 
     if ($bad_email) {
         $r->print('<b>'.$lt{'belo'}.'</b><br />'.
-                  $lt{'ifyk'}.'<br /><br />'."\n");
+                  $lt{'ifyk'}."\n");
     } else {
         # Compose and send a MIME email
         &Apache::loncommon::mime_email($from,'',$to,$subject,$supportmsg,$cc_string,
                                        $bcc,$attachmentpath,$fname,$attachment_text);
-        $r->print('<b>'.$lt{'your'}.'</b>:<br /><br />'."\n");
+        $r->print('<b>'.$lt{'your'}.'</b>:'."\n");
     }
     if ($attachmentpath =~ m|$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+|) {
         unlink($attachmentpath);
@@ -1172,7 +1209,11 @@
     $r->print($envmsg."\n".
               &Apache::lonhtmlcommon::row_closure(1)."\n".
               &Apache::lonhtmlcommon::end_pick_box().
-              "</div>\n".
+              '</div>');
+    unless ($bad_email) {
+        $r->print('<p><br />'.&Apache::loncommon::confirmwrapper(&Apache::lonhtmlcommon::confirm_success($message)).'</p>');
+    }
+    $r->print("</div>\n".
               &Apache::loncommon::end_page());
 }
 
@@ -1180,7 +1221,11 @@
     my ($r,$origurl,$command) = @_;
     my $location=&Apache::loncommon::lonhttpdurl("/adm");
     my ($component_url);
-    my $helpdesk_link = '<a href="javascript:validate()">';
+    my $helpicon_link = '<a href="javascript:validate();" tabindex="-1">';
+    if ($command eq 'process') {
+        $helpicon_link = '<a href="/adm/helpdesk" tabindex="-1">';
+    }
+    my $helpdesk_link = '<a href="javascript:validate();">';
     if ($command eq 'process') {
         $helpdesk_link = '<a href="/adm/helpdesk">';
     }
@@ -1196,7 +1241,7 @@
                                          );
     my ($getstartlink,$reviewtext);
     if (-e $Apache::lonnet::perlvar{'lonDocRoot'}.'/adm/gettingstarted.html') {
-        $getstartlink = qq|<td align="center"> <b><a href="/adm/gettingstarted.html">$lt{'getst'}</a></td>|;
+        $getstartlink = qq|<div class="LC_helpdesk_links LC_nobreak"><div class="LC_helpdesk_img" aria-hidden="true"> </div><div class="LC_helpdesk_text"><a href="/adm/gettingstarted.html">$lt{'getst'}</a> </div></div>|;
         $reviewtext = &mt('Please review the information in "Log-in help" and the "Getting started" guide if you are unable to log-in.');
     } else {
         $reviewtext = &mt('Please review the information in "Log-in help" if you are unable to log-in.');
@@ -1212,47 +1257,34 @@
         $loginhelp = '/adm/loginproblems.html';
     }
     $r->print(<<"END");
-<table width="620" border="0" cellspacing="0" cellpadding="0" style="height: 55px;">
- <tr>
-   <td width="5" height="50"> </td>
-   <td height="50">
-    <fieldset>
-      <legend>
-        <img src="$location/lonIcons/minilogo.gif" height="20" width="29" alt="logo" style="vertical-align:bottom" />
-        LON-CAPA $lt{'headline'}
-      </legend>
- <table id="LC_helpmenu_links">
-   <tr>
-    <td align="center"><span class="LC_nobreak"><img src="$location/help/help.png" border="0" alt="($lt{'login'})" style="vertical-align:middle" /> <b><a href="$loginhelp">$lt{'login'}</a></b> </span></td>
-    <td align="center"><span class="LC_nobreak"> <b>$helpdesk_link<img src="$location/lonIcons/helpdesk.gif" border="0" alt="($lt{'ask'})" style="vertical-align:middle" /> $lt{'ask'}</a></b> </span></td>$getstartlink
-    <td align="center"><span class="LC_nobreak"> <b><a href="$linkback" target="_top"><img src="$location/lonIcons/move_up.gif" border="0" alt="($lt{'back'})" style="vertical-align:middle" /> $lt{'back'}</a></b> </span></td>
-   </tr>
- </table>
-</fieldset>
-  </td>
-  <td width="5"> </td>
- </tr>
- <tr>
-  <td colspan="3" height="5"> </td>
- </tr>
+<div class="LC_landmark" style="display: inline-block;" role="navigation">
+  <div class="LC_helpdesk_headbox">
+    <h1 class="LC_helpdesk_legend">
+      <img src="$location/lonIcons/minilogo.gif" height="20" width="29" alt="LONCAPA logo" style="vertical-align: middle" />
+      LON-CAPA $lt{'headline'}
+    </h1>
+    <div style="border:0; padding:0; margin: 1em 0 0.5em;">
+      <div class="LC_helpdesk_links LC_nobreak"><div class="LC_helpdesk_img" aria-hidden="true"> <a href="$loginhelp" tabindex="-1"><img src="$location/help/help.png" border="0" alt="($lt{'login'})" style="vertical-align:middle" /> </a></div><div class="LC_helpdesk_text"><a href="$loginhelp">$lt{'login'}</a> </div></div>
+      <div class="LC_helpdesk_links LC_nobreak"><div class="LC_helpdesk_img" aria-hidden="true"> $helpicon_link<img src="$location/lonIcons/helpdesk.gif" border="0" alt="($lt{'ask'})" style="vertical-align:top" /> </a></div><div class="LC_helpdesk_text">$helpdesk_link$lt{'ask'}</a> </div></div>$getstartlink
+      <div class="LC_helpdesk_links LC_nobreak"><div class="LC_helpdesk_img" aria-hidden="true"> <a href="$linkback" target="_top" tabindex="-1"><img src="$location/lonIcons/move_up.gif" border="0" alt="($lt{'back'})" style="vertical-align:middle" /> </a></div><div class="LC_helpdesk_text"><a href="$linkback" target="_top">$lt{'back'}</a> </div></div>
+    </div>
+  </div>
+</div>
 END
     if  ($command ne 'process') {
         my $stuwarn = &mt('Do [_1]not[_2] use this form to ask about course content.',
                           '<b>','</b>');
         $r->print(<<"END");
- <tr>
-  <td colspan="3">$reviewtext 
+ <div style="border:0; padding:0; margin: 0; max-width: 600px;" role="complementary">
+  $reviewtext
   $lt{'ifyo'}
-<p class="LC_info">
-<b>$lt{'stud'}:</b> 
-$stuwarn $lt{'cont'}
-</p><br />
-  </td>
- </tr>
+  <p class="LC_info">
+    <b>$lt{'stud'}:</b> 
+    $stuwarn $lt{'cont'}
+  </p>
+ </div>
 END
     }
-    $r->print('
-</table>');
     return;
 }
 
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1455 loncom/interface/loncommon.pm:1.1456
--- loncom/interface/loncommon.pm:1.1455	Mon Feb 17 18:30:42 2025
+++ loncom/interface/loncommon.pm	Mon Feb 17 18:48:06 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1455 2025/02/17 18:30:42 raeburn Exp $
+# $Id: loncommon.pm,v 1.1456 2025/02/17 18:48:06 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7051,7 +7051,7 @@
                 if ($dc_info) {
                     $dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|;
                 }
-                $bodytag .= qq|<div id="LC_nav_bar" role="navigation" aria-label="$labeltext">$left $role<br />|;
+                $bodytag .= qq|<div id="LC_nav_bar" role="navigation" aria-label="$labeltext">$left $role</div>|;
                 unless (($realm eq '') && ($dc_info eq '')) {
                     $bodytag .= qq|<div id="LC_realm" role="complementary"><em>$realm</em> $dc_info</div>|;
                 }
@@ -7334,8 +7334,6 @@
 
 .LC_heading_2 {
   font-size: 1.17em;
-  margin-top: 1em;
-  margin-bottom: 1em;
 }
 
 .LC_menus_content.shown{
@@ -8006,29 +8004,58 @@
   font-size: larger;
 }
 
-table#LC_helpmenu_links {
-  width: 100%;
-  border: 1px solid black;
+.LC_helpdesk_headbox {
+  border: 2px groove threedface;
+  padding: 1em;
+}
+
+h1.LC_helpdesk_legend {
+  float: left;
+  margin: -1.7em 0 0;
+  padding: 0 .5em;
   background: $pgbg;
+  font-size: 1em;
+  font-weight: bold;
+}
+
+h1.LC_helpdesk_title {
+  display: inline;
+  font-size: 1em;
+  line-height: 2.5em;
+  margin: 0;
   padding: 0;
-  border-spacing: 1px;
+  vertical-align: bottom;
 }
 
-table#LC_helpmenu_links tr td {
-  padding: 1px;
+.LC_helpdesk_links {
+  border: 1px solid black;
+  padding: 3px;
   background: $tabbg;
   text-align: center;
   font-weight: bold;
+  display: inline;
+  margin-right: -6px;
+}
+
+.LC_helpdesk_img,
+.LC_helpdesk_text {
+  padding: 0;
+  margin: 0;
+  border: 0;
+  display: inline;
 }
 
-table#LC_helpmenu_links a:link,
-table#LC_helpmenu_links a:visited,
-table#LC_helpmenu_links a:active {
+.LC_helpdesk_img a:link,
+.LC_helpdesk_img a:visited,
+.LC_helpdesk_img a:active,
+.LC_helpdesk_text a:link,
+.LC_helpdesk_text a:visited,
+.LC_helpdesk_text a:active {
   text-decoration: none;
   color: $font;
 }
 
-table#LC_helpmenu_links a:hover {
+div.LC_helpdesk_text a:hover {
   text-decoration: underline;
   color: $vlink;
 }


More information about the LON-CAPA-cvs mailing list