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

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: 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 b8b6d0f33a4da803a92d2a548157947fae195d4c..c94abfd3d68b17f14ee38e5bc8281330213327ee 100644
--- a/chrome/browser/resources/options2/options_page.js
+++ b/chrome/browser/resources/options2/options_page.js
@@ -234,6 +234,12 @@ cr.define('options', function() {
if (!overlay || !overlay.canShowPage())
return false;
+ // The current topmost page will soon be obscured behind the new overlay
+ // to be shown. To prevent screen readers from reading this "hidden"
+ // information, enable the aria-hidden attribute on this page.
+ var topmostPage = this.getTopmostVisiblePage();
Evan Stade 2012/05/09 22:37:37 seems like this might do the wrong thing in certai
Kyle Horimoto 2012/05/10 22:18:46 Done.
+ topmostPage.pageDiv.setAttribute('aria-hidden', true);
+
if ((!rootPage || !rootPage.sticky) && overlay.parentPage)
this.showPageByName(overlay.parentPage.name, false);
@@ -286,6 +292,11 @@ cr.define('options', function() {
if (overlay.didClosePage) overlay.didClosePage();
this.updateHistoryState_(false, {ignoreHash: true});
+
+ // Since there is now a new topmost page, disable its aria-hidden attribute
+ // to allow screen readers to read its contents.
+ var topmostPage = this.getTopmostVisiblePage();
+ topmostPage.pageDiv.removeAttribute('aria-hidden');
};
/**
« 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