Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: chrome/browser/resources/uber/uber.js

Issue 10388034: Disables the ability to tab to navigation items when an overlay is displayed. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Piggybacks beginInterceptingEvents() Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698