Correctly initialize attribution aria state

Co-authored-by: Marc Jansen <jansen@terrestris.de>
This commit is contained in:
MoonE
2021-05-14 21:03:51 +02:00
committed by GitHub
parent fc9e3e5610
commit 99aa3b2640

View File

@@ -147,7 +147,7 @@ class Attribution extends Control {
*/
this.toggleButton_ = document.createElement('button');
this.toggleButton_.setAttribute('type', 'button');
this.toggleButton_.setAttribute('aria-expanded', String(false));
this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));
this.toggleButton_.title = tipLabel;
this.toggleButton_.appendChild(activeLabel);