Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.621
diff -u -p -F '^f' -r1.621 theme.inc
--- includes/theme.inc	28 Oct 2010 02:27:08 -0000	1.621
+++ includes/theme.inc	28 Oct 2010 20:15:18 -0000
@@ -2175,6 +2175,10 @@ function template_preprocess_html(&$vari
     $variables['classes_array'][] = drupal_html_class('node-type-' . $node->type);
   }
 
+  // Add classes for the "Skip to main content" link.
+  $variables['skip_link_classes_array'][] = 'element-invisible';
+  $variables['skip_link_classes_array'][] = 'element-focusable';
+
   // RDFa allows annotation of XHTML pages with RDF data, while GRDDL provides
   // mechanisms for extraction of this RDF content via XSLT transformation
   // using an associated GRDDL profile.
@@ -2301,6 +2305,8 @@ function template_process_page(&$variabl
  * @see html.tpl.php
  */
 function template_process_html(&$variables) {
+  $variables['skip_link_classes'] = implode(' ', $variables['skip_link_classes_array']);
+
   // Render page_top and page_bottom into top level variables.
   $variables['page_top'] = drupal_render($variables['page']['page_top']);
   $variables['page_bottom'] = drupal_render($variables['page']['page_bottom']);
Index: modules/system/html.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/html.tpl.php,v
retrieving revision 1.4
diff -u -p -F '^f' -r1.4 html.tpl.php
--- modules/system/html.tpl.php	26 May 2010 10:47:20 -0000	1.4
+++ modules/system/html.tpl.php	28 Oct 2010 20:15:21 -0000
@@ -26,8 +26,36 @@
  * - $page_bottom: Final closing markup from any modules that have altered the
  *   page. This variable should always be output last, after all other dynamic
  *   content.
- * - $classes String of classes that can be used to style contextually through
- *   CSS.
+ * - $classes: String of classes that can be used to style contextually through
+ *   CSS. It can be manipulated through the variable $classes_array from
+ *   preprocess functions. The default values can be one or more of the
+ *   following:
+ *   - front: If the current page is the website's front page.
+ *   - not-front: If the current page is not the website's front page.
+ *   - logged-in: If the page is being displayed for an authenticated user.
+ *   - not-logged-in: If the page is being displayed for an anonymous user.
+ *   - sidebar-first: If the first sidebar is being displayed (see page.tpl.php).
+ *   - sidebar-second: If the second sidebar is being displayed (see
+ *     page.tpl.php).
+ *   - two-sidebars: If both the first and second sidebars are being displayed.
+ *   - one-sidebar: If only one sidebar is being displayed.
+ *   - no-sidebars: If neither the first nor second sidebars are being displayed.
+ *   - page-foo: If the Drupal path of the current page is 'foo' or begins with
+ *     'foo/'.
+ *   - page-foo-bar: If the Drupal path of the current page is 'foo/bar' or
+ *     begins with 'foo/bar/'.
+ * - $skip_link_classes: String of classes that can be used to style the "Skip
+ *   to main content" link. This link enables screen reader users to instruct
+ *   the screen reader software to skip reading block content and go straight to
+ *   the main content. The classes can be manipulated through the variable
+ *   $skip_link_classes_array from preprocess functions. The default values are
+ *   the following:
+ *   - element-invisible: Visually hides the link, while keeping it accessible
+ *     to screen readers.
+ *   - element-focusable: Shows the link to all users when focused or active.
+ *   To make this link visible to all users, implement a preprocess function to
+ *   remove these classes from the 'skip_link_classes_array' variable, or
+ *   enable a module that does this.
  *
  * @see template_preprocess()
  * @see template_preprocess_html()
@@ -45,7 +73,7 @@
 </head>
 <body class="<?php print $classes; ?>" <?php print $attributes;?>>
   <div id="skip-link">
-    <a href="#main-content"><?php print t('Skip to main content'); ?></a>
+    <a href="#main-content" class="<?php print $skip_link_classes; ?>"><?php print t('Skip to main content'); ?></a>
   </div>
   <?php print $page_top; ?>
   <?php print $page; ?>
Index: themes/bartik/css/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/bartik/css/style.css,v
retrieving revision 1.26
diff -u -p -F '^f' -r1.26 style.css
--- themes/bartik/css/style.css	23 Oct 2010 00:58:51 -0000	1.26
+++ themes/bartik/css/style.css	28 Oct 2010 20:15:22 -0000
@@ -220,7 +220,7 @@ ul.tips {
   margin-left: -5.25em;
   margin-top: 0;
   position: absolute;
-  width: auto !important;
+  width: auto;
   z-index: 50;
 }
 #skip-link a,
@@ -231,12 +231,9 @@ ul.tips {
   color: #fff;
   display: block;
   font-size: 0.94em;
-  height: 1px;
   line-height: 1.7;
-  position: absolute;
+  padding: 1px 10px 2px 10px;
   text-decoration: none;
-  top: -10000px;
-  width: 1px;
   -khtml-border-radius: 0 0 10px 10px;
   -moz-border-radius: 0 0 10px 10px;
   -webkit-border-top-left-radius: 0;
@@ -248,12 +245,7 @@ ul.tips {
 #skip-link a:hover,
 #skip-link a:active,
 #skip-link a:focus {
-  height: auto;
   outline: 0;
-  overflow: visible;
-  padding: 1px 10px 2px 10px;
-  position: static;
-  width: auto;
 }
 #logo,
 #preview #preview-header #preview-logo {
Index: themes/garland/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/style.css,v
retrieving revision 1.86
diff -u -p -F '^f' -r1.86 style.css
--- themes/garland/style.css	27 Sep 2010 01:12:45 -0000	1.86
+++ themes/garland/style.css	28 Oct 2010 20:15:22 -0000
@@ -312,29 +312,27 @@ span.form-required {
 /**
  * Skip link
  */
+#skip-link {
+  top: 0;
+  left: 0;
+  position: fixed !important;
+  z-index: 1000;
+}
+
 #skip-link a:link,
 #skip-link a:visited {
+  display: inline-block;
   font-weight: bold;
   background: #fff;
   padding: 0px 5px;
   text-decoration: none;
   font-size: 80%;
-  text-align: right;
-  top: -99em;
-  left: auto;
-  position: absolute;
 }
 
 #skip-link a:hover,
 #skip-link a:focus,
-#skip-link a:active  {
-  height: auto;
-  width: auto;
-  overflow: visible;
-  top:0;
-  left:0;
-  position: fixed;
-  z-index: 1000;
+#skip-link a:active {
+  outline: 0;
 }
 
 /**
Index: themes/seven/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/seven/style.css,v
retrieving revision 1.80
diff -u -p -F '^f' -r1.80 style.css
--- themes/seven/style.css	15 Oct 2010 04:37:15 -0000	1.80
+++ themes/seven/style.css	28 Oct 2010 20:15:22 -0000
@@ -158,15 +158,11 @@ pre {
 #skip-link a,
 #skip-link a:link,
 #skip-link a:visited {
-  position: absolute;
   display: block;
-  top: auto;
-  left: -10000px;
-  width: 1px;
-  height: 1px;
   background: #444;
   color: #fff;
   font-size: 0.94em;
+  padding: 1px 10px 2px 10px;
   text-decoration: none;
   border-radius:0 0 10px 10px;
   -moz-border-radius: 0 0 10px 10px;
@@ -176,13 +172,9 @@ pre {
   -webkit-border-bottom-right-radius: 10px;
 }
 #skip-link a:hover,
-#skip-link a:active,
-#skip-link a:focus {
-  position: static;
-  width: auto;
-  height: auto;
-  overflow: visible;
-  padding: 1px 10px 2px 10px;
+#skip-link a:focus,
+#skip-link a:active {
+  outline: 0;
 }
 
 /**
