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

Side by Side 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: addressed comments Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 /** 6 /**
7 * @fileoverview The local InstantExtended NTP. 7 * @fileoverview The local InstantExtended NTP.
8 */ 8 */
9 9
10 10
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 691
692 // Container of tile contents. 692 // Container of tile contents.
693 var innerElem = createAndAppendElement(tileElem, 'div', CLASSES.TILE_INNER); 693 var innerElem = createAndAppendElement(tileElem, 'div', CLASSES.TILE_INNER);
694 694
695 // The iframe which renders the page title. 695 // The iframe which renders the page title.
696 var titleElem = document.createElement('iframe'); 696 var titleElem = document.createElement('iframe');
697 // Enable tab navigation on the iframe, which will move the selection to the 697 // Enable tab navigation on the iframe, which will move the selection to the
698 // link element (which also has a tabindex). 698 // link element (which also has a tabindex).
699 titleElem.tabIndex = '0'; 699 titleElem.tabIndex = '0';
700 700
701 // Make the iframe presentational for accessibility so screen readers perceive
702 // the iframe content as just part of the same page.
703 titleElem.setAttribute('role', 'presentation');
704
701 // Why iframes have IDs: 705 // Why iframes have IDs:
702 // 706 //
703 // On navigating back to the NTP we see several onmostvisitedchange() events 707 // On navigating back to the NTP we see several onmostvisitedchange() events
704 // in series with incrementing RIDs. After the first event, a set of iframes 708 // in series with incrementing RIDs. After the first event, a set of iframes
705 // begins loading RIDs n, n+1, ..., n+k-1; after the second event, these get 709 // begins loading RIDs n, n+1, ..., n+k-1; after the second event, these get
706 // destroyed and a new set begins loading RIDs n+k, n+k+1, ..., n+2k-1. 710 // destroyed and a new set begins loading RIDs n+k, n+k+1, ..., n+2k-1.
707 // Now due to crbug.com/68841, Chrome incorrectly loads the content for the 711 // Now due to crbug.com/68841, Chrome incorrectly loads the content for the
708 // first set of iframes into the most recent set of iframes. 712 // first set of iframes into the most recent set of iframes.
709 // 713 //
710 // Giving iframes distinct ids seems to cause some invalidation and prevent 714 // Giving iframes distinct ids seems to cause some invalidation and prevent
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 1205
1202 return { 1206 return {
1203 init: init, 1207 init: init,
1204 listen: listen 1208 listen: listen
1205 }; 1209 };
1206 } 1210 }
1207 1211
1208 if (!window.localNTPUnitTest) { 1212 if (!window.localNTPUnitTest) {
1209 LocalNTP().listen(); 1213 LocalNTP().listen();
1210 } 1214 }
OLDNEW
« 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