Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.620
diff -u -p -F '^f' -r1.620 theme.inc
--- includes/theme.inc	21 Oct 2010 19:31:39 -0000	1.620
+++ includes/theme.inc	28 Oct 2010 03:00:51 -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 03:00:53 -0000
@@ -26,8 +26,14 @@
  * - $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
+ * - $classes: String of classes that can be used to style contextually through
  *   CSS.
+ * - $skip_link_classes: This variable contains two special classes by default:
+ *     - .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, remove the class attribute and
+ *     the $skip_link_classes variable inside of it.
  *
  * @see template_preprocess()
  * @see template_preprocess_html()
@@ -45,7 +51,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 03:00:53 -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,10 @@ ul.tips {
   color: #fff;
   display: block;
   font-size: 0.94em;
-  height: 1px;
   line-height: 1.7;
-  position: absolute;
+  outline: 0;
+  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 +246,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 03:00:53 -0000
@@ -319,21 +319,14 @@ span.form-required {
   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;
+  top: 0;
+  left: 0;
+  position: fixed !important;
   z-index: 1000;
 }
 
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 03:00:53 -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;
@@ -175,15 +171,6 @@ pre {
   -webkit-border-bottom-left-radius: 10px;
   -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;
-}
 
 /**
  * Branding.
