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

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

Issue 869073004: [Local NTP] Add role="presentation" on the New Tab Page iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/local_ntp/local_ntp.js
diff --git a/chrome/browser/resources/local_ntp/local_ntp.js b/chrome/browser/resources/local_ntp/local_ntp.js
index da790a12feebf2ca0b58047e2ef1c37c7e654a22..cab412fc033123fa9414d58046f1d1cf0881b809 100644
--- a/chrome/browser/resources/local_ntp/local_ntp.js
+++ b/chrome/browser/resources/local_ntp/local_ntp.js
@@ -698,6 +698,9 @@ function createTile(page, position) {
// link element (which also has a tabindex).
titleElem.tabIndex = '0';
+ // Make the iframe invisible to screen readers.
dmazzoni 2015/01/29 18:48:44 Let's reword this slightly. It implies that we're
Mathieu 2015/01/29 18:53:35 Done.
+ titleElem.setAttribute('role', 'presentation');
+
// Why iframes have IDs:
//
// On navigating back to the NTP we see several onmostvisitedchange() events
@@ -729,7 +732,9 @@ function createTile(page, position) {
// The iframe which renders either a thumbnail or domain element.
var thumbnailElem = document.createElement('iframe');
thumbnailElem.tabIndex = '-1';
+ // Make the iframe invisible to screen readers.
thumbnailElem.setAttribute('aria-hidden', 'true');
+ titleElem.setAttribute('role', 'presentation');
dmazzoni 2015/01/29 18:48:43 This one is unnecessary, the iframe is already inv
Mathieu 2015/01/29 18:53:35 Done.
// Keep this ID here. See comment above.
thumbnailElem.id = 'thumb-' + rid;
thumbnailElem.className = CLASSES.THUMBNAIL;
« 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