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

Unified Diff: chrome/browser/resources/options2/options_page.js

Issue 10382073: Added aria-hidden attribute to elements obscured behind an overlay to aid screen readers. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased 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/options2/options_page.js
diff --git a/chrome/browser/resources/options2/options_page.js b/chrome/browser/resources/options2/options_page.js
index 3b5f21972d29827c0debd36edac70d6fd0c39169..14785548ce72e400ef090982aeb8228ccbd2d304 100644
--- a/chrome/browser/resources/options2/options_page.js
+++ b/chrome/browser/resources/options2/options_page.js
@@ -251,6 +251,8 @@ cr.define('options', function() {
// Update tab title.
this.setTitle_(overlay.title);
+ $('searchBox').setAttribute('aria-hidden', true);
+
return true;
};
@@ -303,6 +305,8 @@ cr.define('options', function() {
this.updateHistoryState_(false, {ignoreHash: true});
this.restoreLastFocusedElement_();
+ if (!this.isOverlayVisible_())
+ $('searchBox').removeAttribute('aria-hidden');
};
/**
@@ -319,7 +323,7 @@ cr.define('options', function() {
} else {
this.closeOverlay();
}
- }
+ };
/**
* Hides the visible overlay. Does not affect the history state.
@@ -730,6 +734,7 @@ cr.define('options', function() {
}
return !this.pageDiv.hidden;
},
+
/**
* Sets page visibility.
* @type {boolean}
@@ -761,8 +766,13 @@ cr.define('options', function() {
var pageDiv = this.pageDiv;
var container = this.container;
- if (visible)
+ if (visible) {
uber.invokeMethodOnParent('beginInterceptingEvents');
+ this.pageDiv.removeAttribute('aria-hidden');
+ this.parentPage.pageDiv.setAttribute('aria-hidden', true);
+ } else {
+ this.parentPage.pageDiv.removeAttribute('aria-hidden');
+ }
if (container.hidden != visible) {
if (visible) {
« 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