Chromium Code Reviews| 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; |