Index: chrome/browser/resources/uber/uber.js |
diff --git a/chrome/browser/resources/uber/uber.js b/chrome/browser/resources/uber/uber.js |
index c46a82137592b2e0859c425b8ff24cd550aa17b9..cf6cc80230d42f2ccedc19faa8393268d8a9ac71 100644 |
--- a/chrome/browser/resources/uber/uber.js |
+++ b/chrome/browser/resources/uber/uber.js |
@@ -151,6 +151,7 @@ cr.define('uber', function() { |
*/ |
function backgroundNavigation() { |
navFrame.classList.add('background'); |
+ setNavigationItemTabbing(false); |
} |
/** |
@@ -158,6 +159,7 @@ cr.define('uber', function() { |
*/ |
function foregroundNavigation() { |
navFrame.classList.remove('background'); |
+ setNavigationItemTabbing(true); |
} |
/** |
@@ -330,6 +332,18 @@ cr.define('uber', function() { |
uber.invokeMethodOnWindow(iframe.contentWindow, 'mouseWheel', params); |
} |
+ /** |
+ * Enables or disables the ability to tab to the navigation items. |
+ * @param {boolean} enabled If true, enables tabbing; if false, disables it. |
+ */ |
+ function setNavigationItemTabbing(enabled) { |
Evan Stade
2012/05/08 23:51:31
I don't think this function is necessary. Just spl
Kyle Horimoto
2012/05/09 00:02:19
Done.
|
+ navFrame.firstChild.tabIndex = enabled ? 0 : -1; |
+ if (enabled) |
+ navFrame.firstChild.removeAttribute('aria-hidden'); |
+ else |
+ navFrame.firstChild.setAttribute('aria-hidden', true); |
+ } |
+ |
return { |
onLoad: onLoad, |
onPopHistoryState: onPopHistoryState |