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

Side by Side Diff: chrome/browser/resources/welcome/win10/inline.js

Issue 2742833002: [Win10 FRE] Fix ARIA attributes to conform to accordion widget. (Closed)
Patch Set: Remove redundant attributes; fix spacing. Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer({ 5 Polymer({
6 is: 'welcome-win10-inline', 6 is: 'welcome-win10-inline',
7 7
8 properties: { 8 properties: {
9 // Determines if the combined variant should be displayed. The combined 9 // Determines if the combined variant should be displayed. The combined
10 // variant includes instructions on how to pin Chrome to the taskbar. 10 // variant includes instructions on how to pin Chrome to the taskbar.
(...skipping 29 matching lines...) Expand all
40 40
41 onContinue: function() { 41 onContinue: function() {
42 chrome.send('handleContinue'); 42 chrome.send('handleContinue');
43 }, 43 },
44 44
45 onOpenSettings: function() { 45 onOpenSettings: function() {
46 chrome.send('handleSetDefaultBrowser'); 46 chrome.send('handleSetDefaultBrowser');
47 }, 47 },
48 48
49 onToggle: function() { 49 onToggle: function() {
50 if (this.isCombined) { 50 if (!this.isCombined)
51 var sections = this.shadowRoot.querySelectorAll('.section.expandable'); 51 return;
52 sections.forEach(function(section) { 52 var sections = this.shadowRoot.querySelectorAll('.section.expandable');
53 section.classList.toggle('expanded'); 53 sections.forEach(function(section) {
54 }); 54 var isExpanded = section.classList.toggle('expanded');
55 } 55 section.querySelector('[role~="button"]').setAttribute(
56 'aria-expanded', isExpanded);
57 });
56 } 58 }
57 }); 59 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698