]> git.mjollnir.org Git - moodle.git/commitdiff
ajaxlib: MDL-19915 skip links need to be in a div for XHTML strict.
authortjhunt <tjhunt>
Thu, 23 Jul 2009 05:39:41 +0000 (05:39 +0000)
committertjhunt <tjhunt>
Thu, 23 Jul 2009 05:39:41 +0000 (05:39 +0000)
Refine Sam's solution.

lib/ajax/ajaxlib.php

index 231574758ef71be56fb70febfed0adc3a698388c..2d6be33b3afeb550041984bbe64f9b2eadd2dac1 100644 (file)
@@ -427,7 +427,7 @@ class page_requirements_manager {
      * @return string the HTML code to go at the start of the <body> tag.
      */
     public function get_top_of_body_code() {
-        $output = $this->get_linked_resources_code(self::WHEN_TOP_OF_BODY);
+        $output = '<div class="skiplinks">' . $this->get_linked_resources_code(self::WHEN_TOP_OF_BODY) . '</div>';
         $js = "document.body.className += ' jsenabled';\n";
         $js .= $this->get_javascript_code(self::WHEN_TOP_OF_BODY);
         $output .= ajax_generate_script_tag($js);
@@ -849,7 +849,7 @@ class required_skip_link extends linked_requirement {
     }
 
     public function get_html() {
-        return '<div><a class="skip" href="#' . $this->url . '">' . $this->linktext . "</a></div>\n";
+        return '<a class="skip" href="#' . $this->url . '">' . $this->linktext . "</a>\n";
     }
 }