Index: course/format/weekscss/format.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/format/weekscss/format.php,v
retrieving revision 1.19.2.3
diff -u -r1.19.2.3 format.php
--- course/format/weekscss/format.php	26 Sep 2007 12:54:54 -0000	1.19.2.3
+++ course/format/weekscss/format.php	15 Oct 2007 13:47:13 -0000
@@ -85,7 +85,7 @@
     }
 
 /// Start main column
-    echo '<div id="middle-column"><a name="startofcontent"></a>';
+    echo '<div id="middle-column"><span id="maincontent"></span>';
 
     print_heading_block(get_string('weeklyoutline'), 'outline');
 
Index: course/format/topics/format.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/format/topics/format.php,v
retrieving revision 1.83
diff -u -r1.83 format.php
--- course/format/topics/format.php	25 Sep 2007 12:00:53 -0000	1.83
+++ course/format/topics/format.php	15 Oct 2007 13:47:13 -0000
@@ -93,7 +93,7 @@
 /// Start main column
     echo '<td id="middle-column">';
     if (!empty($THEME->customcorners)) print_custom_corners_start();
-    echo '<a name="startofcontent"></a>';
+    echo '<span id="maincontent"></span>';
 
     print_heading_block(get_string('topicoutline'), 'outline');
 
Index: lang/en_utf8/access.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/access.php,v
retrieving revision 1.8
diff -u -r1.8 access.php
--- lang/en_utf8/access.php	26 Sep 2007 10:57:46 -0000	1.8
+++ lang/en_utf8/access.php	15 Oct 2007 13:47:13 -0000
@@ -21,7 +21,7 @@
 $string['skipnavigation'] = 'Skip navigation';
 $string['tabledata'] = 'Data table, $a';
 $string['tablelayout'] = 'Layout table, $a';
-$string['tocontent'] = 'Go to main content';
+$string['tocontent'] = 'Skip to main content';
 $string['tonavigation'] = 'Go to navigation';
 $string['youarehere'] = 'You are here';
 
Index: lang/en_utf8/moodle.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/moodle.php,v
retrieving revision 1.142
diff -u -r1.142 moodle.php
--- lang/en_utf8/moodle.php	11 Oct 2007 09:01:32 -0000	1.142
+++ lang/en_utf8/moodle.php	15 Oct 2007 13:47:14 -0000
@@ -1332,7 +1332,6 @@
 $string['sizekb'] = 'KB';
 $string['sizemb'] = 'MB';
 $string['skipped'] = 'Skipped';
-$string['skiptomaincontent'] = 'Skip forward to main content';
 $string['skypeid'] = 'Skype ID';
 $string['socialheadline'] = 'Social forum - latest topics';
 $string['someallowguest'] = 'Some courses may allow guest access';
Index: course/format/weeks/format.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/format/weeks/format.php,v
retrieving revision 1.74
diff -u -r1.74 format.php
--- course/format/weeks/format.php	25 Sep 2007 12:00:51 -0000	1.74
+++ course/format/weeks/format.php	15 Oct 2007 13:47:13 -0000
@@ -80,7 +80,7 @@
 
     if (!empty($THEME->customcorners)) print_custom_corners_start();
         
-    echo '<a name="startofcontent"></a>';
+    echo '<span id="maincontent"></span>';
 
     print_heading_block(get_string('weeklyoutline'), 'outline');
 
Index: theme/standard/styles_color.css
===================================================================
RCS file: /cvsroot/moodle/moodle/theme/standard/styles_color.css,v
retrieving revision 1.150
diff -u -r1.150 styles_color.css
--- theme/standard/styles_color.css	15 Oct 2007 02:08:05 -0000	1.150
+++ theme/standard/styles_color.css	15 Oct 2007 13:47:16 -0000
@@ -203,12 +203,6 @@
   color:#aaa;
 }
 
-.headerskip a:link,
-.headerskip a:visited,
-.headerskip a:hover {
-  color: #FFF;
-}
-
 .navigation select {
   background-color:#FFFFFF;
 }
Index: theme/standard/styles_layout.css
===================================================================
RCS file: /cvsroot/moodle/moodle/theme/standard/styles_layout.css,v
retrieving revision 1.518
diff -u -r1.518 styles_layout.css
--- theme/standard/styles_layout.css	11 Oct 2007 16:35:22 -0000	1.518
+++ theme/standard/styles_layout.css	15 Oct 2007 13:47:16 -0000
@@ -668,12 +668,6 @@
  *** Header
  ***/
 
-.headerskip {
-  position:absolute;
-  right:20em;
-  font-size:0.8em;
-}
-
 #header-home {
 }
 
@@ -1179,16 +1173,17 @@
  ***/
 
 /*Accessibility: Skip block link, for keyboard-only users. */
-a.skip-block {
+a.skip-block, a.skip {
   position: absolute;
   top: -1000em;
   font-size: 0.85em;
 }
-a.skip-block:focus, a.skip-block:active {
+a.skip-block:focus, a.skip-block:active,
+a.skip:focus, a.skip:active {
   position: static;
   display: block;
 }
-.skip-block-to {
+.skip-block-to, #maincontent {
   display: block;
   height: 1px;
 }
Index: course/format/lams/format.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/format/lams/format.php,v
retrieving revision 1.25
diff -u -r1.25 format.php
--- course/format/lams/format.php	25 Sep 2007 12:05:36 -0000	1.25
+++ course/format/lams/format.php	15 Oct 2007 13:47:13 -0000
@@ -75,7 +75,7 @@
 }
 
 /// Start main column
-echo '<td id="middle-column"><a name="startofcontent"></a>';
+echo '<td id="middle-column"><span id="maincontent"></span>';
 
 print_heading_block(get_string('lamsoutline','lams'), 'outline');
 
Index: course/format/scorm/format.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/format/scorm/format.php,v
retrieving revision 1.12
diff -u -r1.12 format.php
--- course/format/scorm/format.php	15 Apr 2007 07:26:25 -0000	1.12
+++ course/format/scorm/format.php	15 Oct 2007 13:47:13 -0000
@@ -35,7 +35,7 @@
         echo '</td>';
     }
 
-    echo '<td id="middle-column"><a name="startofcontent"></a>';
+    echo '<td id="middle-column"><span id="maincontent"></span>';
     $moduleformat = $module.'_course_format_display';
     if (function_exists($moduleformat)) {
         $moduleformat($USER,$course);
Index: lib/pagelib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/pagelib.php,v
retrieving revision 1.63
diff -u -r1.63 pagelib.php
--- lib/pagelib.php	12 Oct 2007 15:55:52 -0000	1.63
+++ lib/pagelib.php	15 Oct 2007 13:47:14 -0000
@@ -438,8 +438,6 @@
 
         print_header($title, $this->courserecord->fullname, $navigation,
                      '', $meta, true, $buttons, user_login_string($this->courserecord, $USER), false, $bodytags);
-
-        echo '<div class="accesshide"><a href="#startofcontent">'.get_string('skiptomaincontent').'</a></div>';
     }
 
     // SELF-REPORTING SECTION
Index: lib/weblib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
retrieving revision 1.977
diff -u -r1.977 weblib.php
--- lib/weblib.php	15 Oct 2007 10:04:41 -0000	1.977
+++ lib/weblib.php	15 Oct 2007 13:47:16 -0000
@@ -2494,6 +2494,12 @@
     $output = ob_get_contents();
     ob_end_clean();
 
+    if ('course-view'==$pageid) {
+        $skiplink = '<a class="skip" href="#maincontent">'.get_string('tocontent', 'access').'</a>';
+        preg_match('/(.*<body.*?>)(.*)/s', $output, $matches);
+        $output = $matches[1]."\n". $skiplink .$matches[2];
+    }
+
     $output = force_strict_header($output);
 
     if (!empty($CFG->messaging)) {
Index: course/format/social/format.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/format/social/format.php,v
retrieving revision 1.41
diff -u -r1.41 format.php
--- course/format/social/format.php	22 Aug 2007 05:51:04 -0000	1.41
+++ course/format/social/format.php	15 Oct 2007 13:47:13 -0000
@@ -40,7 +40,7 @@
 
     echo '<td id="middle-column">';
     if (!empty($THEME->customcorners)) print_custom_corners_start();
-    echo '<a name="startofcontent"></a>';
+    echo '<span id="maincontent"></span>';
     if ($forum = forum_get_course_forum($course->id, 'social')) {
         print_heading_block(get_string('socialheadline'));
         
Index: theme/formal_white/fw_layout.css
===================================================================
RCS file: /cvsroot/moodle/moodle/theme/formal_white/fw_layout.css,v
retrieving revision 1.13
diff -u -r1.13 fw_layout.css
--- theme/formal_white/fw_layout.css	18 Jun 2007 11:28:36 -0000	1.13
+++ theme/formal_white/fw_layout.css	15 Oct 2007 13:47:16 -0000
@@ -97,12 +97,6 @@
  *** Header
  ***/
 
-.headerskip {
-  position:absolute;
-  right:20em;
-  font-size:0.8em;
-}
-
 #header-home {
   /* padding:1em 0.5em; */
   height:100px;
