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

raeburn raeburn at source.lon-capa.org
Thu Mar 6 11:42:40 EST 2025


raeburn		Thu Mar  6 16:42:40 2025 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - WCAG 2 compliance.
    For menus created using generate_menu(), icon and text for each menu item
    included with one <a> </a> tag instead of using two <a> </a> tags -- one
    for icon and one for text with the same href attribute.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.419 loncom/interface/lonhtmlcommon.pm:1.420
--- loncom/interface/lonhtmlcommon.pm:1.419	Mon Mar  3 22:03:02 2025
+++ loncom/interface/lonhtmlcommon.pm	Thu Mar  6 16:42:40 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.419 2025/03/03 22:03:02 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.420 2025/03/06 16:42:40 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3976,7 +3976,7 @@
 sub generate_menu {
     my @menu = @_;
     # subs for specific html elements
-    my ($h2, $div, $ul, $li, $a, $img) = inittags( qw(h2 div ul li a img) ); 
+    my ($h2, $div, $ul, $li, $a, $img) = inittags( qw(h2 div ul li a img) );
     
     my @categories; # each element represents the entire markup for a category
    
@@ -3999,17 +3999,12 @@
                                 src   => $src,
                                 alt   => mt(defined($$link{alttext}) ?
                                 $$link{alttext} : $$link{linktext})
-                            }), {
-                            href  => $$link{url},
-                            title => mt($$link{linktitle}),
-                            class => 'LC_menubuttons_link'
-                            }).
-                        $a->(mt($$link{linktext}), {
+                            }).mt($$link{linktext}), {
                             href  => $$link{url},
                             title => mt($$link{linktitle}),
                             class => "LC_menubuttons_link"
                             }).
-                         (defined($$link{help}) ? 
+                         (defined($$link{help}) ?
                          Apache::loncommon::help_open_topic($$link{help}) : ''),
                          {class => "LC_menubuttons_inline_text"}));
         }




More information about the LON-CAPA-cvs mailing list