From 99aa3b26409a40ab43ab037499462e60c70ef5c6 Mon Sep 17 00:00:00 2001 From: MoonE Date: Fri, 14 May 2021 21:03:51 +0200 Subject: [PATCH] Correctly initialize attribution aria state Co-authored-by: Marc Jansen --- src/ol/control/Attribution.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/control/Attribution.js b/src/ol/control/Attribution.js index b72620b60b..7d1ff8234a 100644 --- a/src/ol/control/Attribution.js +++ b/src/ol/control/Attribution.js @@ -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);