Chromium Code Reviews| 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'); |
| }; |
| /** |