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

Unified Diff: lib/src/iron-collapse/iron-collapse.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 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 | « lib/src/iron-behaviors/test/active-state.html ('k') | lib/src/iron-collapse/test/a11y.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/iron-collapse/iron-collapse.html
diff --git a/lib/src/iron-collapse/iron-collapse.html b/lib/src/iron-collapse/iron-collapse.html
index 96e475faf18fc610ae705977123c23abe02907f6..013660e5ed5e76adf193ef2abce481c53c457a07 100644
--- a/lib/src/iron-collapse/iron-collapse.html
+++ b/lib/src/iron-collapse/iron-collapse.html
@@ -162,6 +162,9 @@ and instead put a div inside and style that.
_openedChanged: function() {
if (this.opened) {
+ this.setAttribute('aria-expanded', 'true');
+ this.setAttribute('aria-hidden', 'false');
+
this.toggleClass('iron-collapse-closed', false);
this.updateSize('auto', false);
var s = this._calcSize();
@@ -169,16 +172,18 @@ and instead put a div inside and style that.
// force layout to ensure transition will go
/** @suppress {suspiciousCode} */ this.offsetHeight;
this.updateSize(s, true);
- }
- else {
+ // focus the current collapse
+ this.focus();
+ } else {
+ this.setAttribute('aria-expanded', 'false');
+ this.setAttribute('aria-hidden', 'true');
+
this.toggleClass('iron-collapse-opened', false);
this.updateSize(this._calcSize(), false);
// force layout to ensure transition will go
/** @suppress {suspiciousCode} */ this.offsetHeight;
this.updateSize('0px', true);
}
- this.setAttribute('aria-expanded', this.opened ? 'true' : 'false');
-
},
_transitionEnd: function() {
« no previous file with comments | « lib/src/iron-behaviors/test/active-state.html ('k') | lib/src/iron-collapse/test/a11y.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698