From: nfreear Date: Wed, 22 Mar 2006 17:48:53 +0000 (+0000) Subject: Accessibility: fix bug 4963 in function, print_header. Added 'lang' attribute to... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6575bfd4d139310fd9becfcc4c39ddfcf37bd9b5;p=moodle.git Accessibility: fix bug 4963 in function, print_header. Added 'lang' attribute to $direction, used by standard and other themes. --- diff --git a/lib/weblib.php b/lib/weblib.php index a67a93a9d9..195c296156 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1948,6 +1948,9 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta= } else { $direction = ' dir="ltr"'; } + //Accessibility: added the 'lang' attribute to $direction, used in theme tag. + $language = str_replace('_utf8','',$CFG->lang); + $direction .= ' lang="'.$language.'" xml:lang="'.$language.'"'; if ($cache) { // Allow caching on "back" (but not on normal clicks) @header('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); @@ -1986,7 +1989,6 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta= echo '//' . strtoupper($currentlanguage) . '" "'. $CFG->xml_dtd .'">'."\n"; $direction = " xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:math=\"http://www.w3.org/1998/Math/MathML\" - xml:lang=\"en\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" $direction"; if($mathplayer) {