Index: modules/overlay/overlay-child.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-child.css,v
retrieving revision 1.6
diff -u -p -r1.6 overlay-child.css
--- modules/overlay/overlay-child.css	28 Jul 2010 01:26:00 -0000	1.6
+++ modules/overlay/overlay-child.css	29 Sep 2010 10:52:53 -0000
@@ -138,3 +138,8 @@ html.js body {
 * html #overlay-close:hover {
   position: absolute;
 }
+
+.element-invisible.force-visible {
+  position: static !important;
+  clip: auto;
+}
Index: modules/overlay/overlay-child.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-child.js,v
retrieving revision 1.10
diff -u -p -r1.10 overlay-child.js
--- modules/overlay/overlay-child.js	8 Jul 2010 12:20:23 -0000	1.10
+++ modules/overlay/overlay-child.js	29 Sep 2010 10:52:53 -0000
@@ -57,6 +57,11 @@ Drupal.behaviors.overlayChild = {
 
     // Attach child related behaviors to the iframe document.
     Drupal.overlayChild.attachBehaviors(context, settings);
+    
+    // Show all focusable links if focus is inside accessibility wrapper.
+    $('#overlay-disable-link', context)
+      .focusin( function() { $('a.element-focusable', this).addClass('force-visible'); })
+      .focusout( function() { $('a.element-focusable', this).removeClass('force-visible'); });
   }
 };
 
Index: modules/overlay/overlay-parent.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-parent.css,v
retrieving revision 1.15
diff -u -p -r1.15 overlay-parent.css
--- modules/overlay/overlay-parent.css	8 Jun 2010 05:16:29 -0000	1.15
+++ modules/overlay/overlay-parent.css	29 Sep 2010 10:52:53 -0000
@@ -46,3 +46,8 @@ html.overlay-open .displace-bottom {
 {
   position: absolute;
 }
+ 
+.element-invisible.force-visible {
+  position: static !important;
+  clip: auto;
+}
Index: modules/overlay/overlay-parent.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-parent.js,v
retrieving revision 1.55
diff -u -p -r1.55 overlay-parent.js
--- modules/overlay/overlay-parent.js	29 Sep 2010 00:50:46 -0000	1.55
+++ modules/overlay/overlay-parent.js	29 Sep 2010 10:52:53 -0000
@@ -25,6 +25,11 @@ Drupal.behaviors.overlayParent = {
       // scripts to bind their own handlers to links and also to prevent
       // overlay's handling.
       .bind('click.drupal-overlay mouseup.drupal-overlay', $.proxy(Drupal.overlay, 'eventhandlerOverrideLink'));
+
+    // Show all focusable links if focus is inside accessibility wrapper.
+    $('#overlay-disable-link', context)
+      .focusin( function() { $('a.element-focusable', this).addClass('force-visible'); })
+      .focusout( function() { $('a.element-focusable', this).removeClass('force-visible'); });
   }
 };
 
Index: modules/overlay/overlay.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay.module,v
retrieving revision 1.31
diff -u -p -r1.31 overlay.module
--- modules/overlay/overlay.module	31 Aug 2010 15:04:09 -0000	1.31
+++ modules/overlay/overlay.module	29 Sep 2010 10:52:54 -0000
@@ -30,6 +30,12 @@ function overlay_menu() {
     'access arguments' => array('access overlay'),
     'type' => MENU_CALLBACK,
   );
+  $items['overlay/dismiss-message'] = array(
+    'title' => '',
+    'page callback' => 'overlay_user_dismiss_message',
+    'access arguments' => array('access overlay'),
+    'type' => MENU_CALLBACK,
+  );
   return $items;
 }
 
@@ -62,8 +68,11 @@ function overlay_theme() {
  */
 function overlay_form_user_profile_form_alter(&$form, &$form_state) {
   if ($form['#user_category'] == 'account') {
+    global $user;
     $account = $form['#user'];
-    if (user_access('access overlay', $account)) {
+    // Display Overlay preferences only if the current user can access the
+    // overlay and when a user edits their own profile.
+    if ($account->uid == $user->uid && user_access('access overlay', $account)) {
       $form['overlay_control'] = array(
         '#type' => 'fieldset',
         '#title' => t('Administrative overlay'),
@@ -74,9 +83,14 @@ function overlay_form_user_profile_form_
       $form['overlay_control']['overlay'] = array(
         '#type' => 'checkbox',
         '#title' => t('Use the overlay for administrative pages.'),
-        '#description' => t('Show administrative pages on top of the page you started from.'),
         '#default_value' => isset($account->data['overlay']) ? $account->data['overlay'] : 1,
+        '#description' => t('Show administrative pages on top of the page you started from. Disable this option if you have problems accessing the overlay.'),
       );
+      // Show link to dismiss message only if overlay is active and current
+      // user has not yet dismissed it.
+      if (!isset($user->data['overlay_message_dismissed']) && (!isset($user->data['overlay']) || $user->data['overlay']) ) {
+        $form['overlay_control']['overlay']['#description'] .= ' ' . l(t('Click here to dismiss the accessibility message shown at the top of every page.'), 'overlay/dismiss-message', array('query' => drupal_get_destination() + array('token' => drupal_get_token('overlay'))));
+      }
     }
   }
 }
@@ -85,7 +99,9 @@ function overlay_form_user_profile_form_
  * Implements hook_user_presave().
  */
 function overlay_user_presave(&$edit, $account, $category) {
-  if (isset($edit['overlay'])) {
+  global $user;
+  // Prevent someone else from setting the overlay preference for a user.
+  if (isset($edit['overlay']) && $account->uid == $user->uid) {
     $edit['data']['overlay'] = $edit['overlay'];
   }
 }
@@ -253,11 +269,86 @@ function overlay_page_alter(&$page) {
       $page[$skipped_region]['#access'] = FALSE;
     }
   }
-
-  if (overlay_get_mode() == 'child') {
+  $mode = overlay_get_mode();
+  if ($mode == 'child') {
     // Add the overlay wrapper before the html wrapper.
     array_unshift($page['#theme_wrappers'], 'overlay');
   }
+  elseif ($mode == 'parent' && $link = _overlay_disable_link()) {
+    $page['page_top']['disable_overlay'] = $link;
+  }
+}
+
+/**
+ * Dismiss the overlay accessibility message for current user.
+ */
+function overlay_user_dismiss_message() {
+  if (!drupal_valid_token($_GET['token'], 'overlay')) {
+    drupal_access_denied();
+  }
+  else {
+    global $user;
+    user_save(user_load($user->uid), array('data' => array('overlay_message_dismissed' => 1)));
+    drupal_set_message(t('The accessibility message for the administrative Overlay has been dismissed.'));
+    // Destination is normally given. Go to user profile as fallback.
+    drupal_goto('user/' . $user->uid . '/edit');
+  }
+}
+
+
+/**
+ * Returns a renderable array representing a link to disable the Overlay.
+ *
+ * If the current user can access the overlay, but has not set a preference
+ * regarding the overlay in the user account settings, then this function
+ * returns a link to disable the overlay.
+ */
+function _overlay_disable_link() {
+  global $user;
+
+  $build = array();
+  if (!isset($user->data['overlay_message_dismissed']) && user_access('access overlay')) {
+    $build = array(
+      // Wrap the two links in a container and add an invisible headline.
+      '#prefix' => '<div id="overlay-disable-link"><h3 class="element-invisible">' . t('Options for administrative Overlay') . '</h3>' ,
+      '#suffix' => '</div>',
+      '#weight' => -99,
+      // Disable link
+      'profile_link' => array(
+        '#type' => 'link',
+        '#title' => t('Disable the Overlay on your profile page if you have problems accessing administrative pages.'),
+        '#href' => 'user/' . $user->uid . '/edit',
+        '#options' => array(
+          'query' => drupal_get_destination(),
+          'fragment' => 'edit-overlay-control',
+          'attributes' => array(
+            'id' => 'overlay-profile-link',
+            // Prevent the target page from being opened in the overlay, and make
+            // this link visible for screen-readers only.
+            'class' => array('overlay-exclude', 'element-invisible', 'element-focusable'),
+          ),
+        ),
+      ),
+      // Dismiss link
+      'dismiss_message_link' => array(
+        '#type' => 'link',
+        '#title' => t('Dismiss this message.'),
+        // Dismissing means: enable the overlay and dismiss the message
+        '#href' => 'overlay/dismiss-message',
+        '#options' => array(
+          // Add token for CSRF protection
+          'query' => drupal_get_destination() + array('token' => drupal_get_token('overlay')),
+          'attributes' => array(
+            'id' => 'overlay-dismiss-message',
+            // Prevent the target page from being opened in the overlay, and make
+            // this link visible for screen-readers only.
+            'class' => array('overlay-exclude', 'element-invisible', 'element-focusable'),
+          ),
+        ),
+      )
+    );
+  }
+  return $build;
 }
 
 /**
@@ -324,9 +415,9 @@ function overlay_preprocess_maintenance_
  * @see overlay.tpl.php
  */
 function template_preprocess_overlay(&$variables) {
-  $variables['tabs']              = menu_primary_local_tasks();
-  $variables['title']             = drupal_get_title();
-
+  $variables['tabs'] = menu_primary_local_tasks();
+  $variables['title'] = drupal_get_title();
+  $variables['disable_overlay'] = _overlay_disable_link();
   $variables['content_attributes_array']['class'][] = 'clearfix';
 }
 
Index: modules/overlay/overlay.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay.tpl.php,v
retrieving revision 1.4
diff -u -p -r1.4 overlay.tpl.php
--- modules/overlay/overlay.tpl.php	16 Sep 2010 19:47:45 -0000	1.4
+++ modules/overlay/overlay.tpl.php	29 Sep 2010 10:52:54 -0000
@@ -21,6 +21,7 @@
  */
 ?>
 
+<?php print render($disable_overlay); ?>
 <div id="overlay" <?php print $attributes; ?>>
   <div id="overlay-titlebar" class="clearfix">
     <div id="overlay-title-wrapper" class="clearfix">
