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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/welcome/win10/inline.js
diff --git a/chrome/browser/resources/welcome/win10/inline.js b/chrome/browser/resources/welcome/win10/inline.js
index a4530a673714c64f767dd37539d30dbd6fa36092..bef49ae4d76961e3e1cfb4ee2c48257d13613672 100644
--- a/chrome/browser/resources/welcome/win10/inline.js
+++ b/chrome/browser/resources/welcome/win10/inline.js
@@ -47,11 +47,13 @@ Polymer({
},
onToggle: function() {
- if (this.isCombined) {
- var sections = this.shadowRoot.querySelectorAll('.section.expandable');
- sections.forEach(function(section) {
- section.classList.toggle('expanded');
- });
- }
+ if (!this.isCombined)
+ return;
+ var sections = this.shadowRoot.querySelectorAll('.section.expandable');
+ sections.forEach(function(section) {
+ var isExpanded = section.classList.toggle('expanded');
+ section.querySelector('[role~="button"]').setAttribute(
+ 'aria-expanded', isExpanded);
+ });
}
});

Powered by Google App Engine
This is Rietveld 408576698