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() { |