diff --git a/course/format/lams/format.php b/course/format/lams/format.php
index fddd972757d..a4ef5b4c7d6 100644
--- a/course/format/lams/format.php
+++ b/course/format/lams/format.php
@@ -75,7 +75,7 @@ if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
}
/// Start main column
-echo '
';
+echo ' | '. skip_main_destination();
print_heading_block(get_string('lamsoutline','lams'), 'outline');
diff --git a/course/format/scorm/format.php b/course/format/scorm/format.php
index 7c924a4eb55..299b6aedd15 100644
--- a/course/format/scorm/format.php
+++ b/course/format/scorm/format.php
@@ -35,7 +35,7 @@
echo ' | ';
}
- echo '';
+ echo ' | '. skip_main_destination();
$moduleformat = $module.'_course_format_display';
if (function_exists($moduleformat)) {
$moduleformat($USER,$course);
diff --git a/course/format/social/format.php b/course/format/social/format.php
index 92549ff97d0..bebc79d5999 100644
--- a/course/format/social/format.php
+++ b/course/format/social/format.php
@@ -40,7 +40,7 @@
echo ' | ';
if (!empty($THEME->customcorners)) print_custom_corners_start();
- echo '';
+ echo skip_main_destination();
if ($forum = forum_get_course_forum($course->id, 'social')) {
print_heading_block(get_string('socialheadline'));
diff --git a/course/format/topics/format.php b/course/format/topics/format.php
index 91fd095dc1f..4bba4c20aa6 100644
--- a/course/format/topics/format.php
+++ b/course/format/topics/format.php
@@ -93,7 +93,7 @@
/// Start main column
echo ' | ';
if (!empty($THEME->customcorners)) print_custom_corners_start();
- echo '';
+ echo skip_main_destination();
print_heading_block(get_string('topicoutline'), 'outline');
diff --git a/course/format/weeks/format.php b/course/format/weeks/format.php
index 5a83f23bbf6..48b64a64246 100644
--- a/course/format/weeks/format.php
+++ b/course/format/weeks/format.php
@@ -80,7 +80,7 @@
if (!empty($THEME->customcorners)) print_custom_corners_start();
- echo '';
+ echo skip_main_destination();
print_heading_block(get_string('weeklyoutline'), 'outline');
diff --git a/course/format/weekscss/format.php b/course/format/weekscss/format.php
index fe10b0135ea..a120bfd2102 100644
--- a/course/format/weekscss/format.php
+++ b/course/format/weekscss/format.php
@@ -85,7 +85,7 @@
}
/// Start main column
- echo '';
+ echo ' '. skip_main_destination();
print_heading_block(get_string('weeklyoutline'), 'outline');
diff --git a/lang/en_utf8/access.php b/lang/en_utf8/access.php
index 681a2db833f..2f6b613e26d 100644
--- a/lang/en_utf8/access.php
+++ b/lang/en_utf8/access.php
@@ -21,7 +21,7 @@ $string['skipblock'] = 'Skip block';
$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';
diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php
index 9c931b7e384..555a5c560a7 100644
--- a/lang/en_utf8/moodle.php
+++ b/lang/en_utf8/moodle.php
@@ -1332,7 +1332,6 @@ $string['sizegb'] = 'GB';
$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';
diff --git a/lib/pagelib.php b/lib/pagelib.php
index 645855002eb..06c910a3344 100644
--- a/lib/pagelib.php
+++ b/lib/pagelib.php
@@ -439,7 +439,7 @@ class page_course extends page_base {
print_header($title, $this->courserecord->fullname, $navigation,
'', $meta, true, $buttons, user_login_string($this->courserecord, $USER), false, $bodytags);
- echo ' ';
+ echo ' '.get_string('tocontent', 'access').'';
}
// SELF-REPORTING SECTION
diff --git a/lib/weblib.php b/lib/weblib.php
index de5273592d6..70cb81b5d2a 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -2257,6 +2257,13 @@ function get_html_lang($dir = false) {
return ($direction.' lang="'.$language.'" xml:lang="'.$language.'"');
}
+/**
+ * Return the markup for the destination of the 'Skip to main content' links.
+ */
+function skip_main_destination() {
+ return ' ';
+}
+
/// STANDARD WEB PAGE PARTS ///////////////////////////////////////////////////
@@ -2497,6 +2504,15 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
$output = ob_get_contents();
ob_end_clean();
+ /*// Skip to main content, TODO: 'site-index', 'course-index'
+ if ('course-view'==$pageid) {
+ $skiplink = ' '.get_string('tocontent', 'access').'';
+ if (! preg_match('/(.* )(.*)/s', $output, $matches)) {
+ preg_match('/(.*)(.*)/s', $output, $matches);
+ }
+ $output = $matches[1]."\n". $skiplink .$matches[2];
+ }*/
+
$output = force_strict_header($output);
if (!empty($CFG->messaging)) {
diff --git a/theme/formal_white/fw_layout.css b/theme/formal_white/fw_layout.css
index 466eb78478f..3ce62431b40 100644
--- a/theme/formal_white/fw_layout.css
+++ b/theme/formal_white/fw_layout.css
@@ -97,12 +97,6 @@ input, select {
*** Header
***/
-.headerskip {
- position:absolute;
- right:20em;
- font-size:0.8em;
-}
-
#header-home {
/* padding:1em 0.5em; */
height:100px;
diff --git a/theme/standard/styles_color.css b/theme/standard/styles_color.css
index f572aae2eb8..03e42872f1a 100644
--- a/theme/standard/styles_color.css
+++ b/theme/standard/styles_color.css
@@ -203,12 +203,6 @@ table.formtable tbody th {
color:#aaa;
}
-.headerskip a:link,
-.headerskip a:visited,
-.headerskip a:hover {
- color: #FFF;
-}
-
.navigation select {
background-color:#FFFFFF;
}
diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css
index 122a7475731..8fef17d5227 100644
--- a/theme/standard/styles_layout.css
+++ b/theme/standard/styles_layout.css
@@ -668,12 +668,6 @@ div.phpinfo .center th {
*** Header
***/
-.headerskip {
- position:absolute;
- right:20em;
- font-size:0.8em;
-}
-
#header-home {
}
@@ -1179,16 +1173,17 @@ body#admin-modules table.generaltable td.c0
***/
/*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;
}
|