diff --git a/components/sidebar.html b/components/sidebar.html
index 21180f22..de61c597 100644
--- a/components/sidebar.html
+++ b/components/sidebar.html
@@ -45,178 +45,181 @@
-
-
-
-
-
-
-
-
-
@@ -228,18 +231,15 @@
if (btn && footerLinks) {
btn.addEventListener("click", function () {
footerLinks.classList.toggle("hidden");
+ var isHidden = footerLinks.classList.contains("hidden");
+ btn.setAttribute("aria-expanded", String(!isHidden));
var icon = document.getElementById("footerDropdownIcon");
var textSpan = document.getElementById("footerDropdownText");
- if (footerLinks.classList.contains("hidden")) {
- textSpan.textContent = "More";
- if (icon) {
- icon.classList.remove("rotate-180");
- }
- } else {
- textSpan.textContent = "Less";
- if (icon) {
- icon.classList.add("rotate-180");
- }
+ if (textSpan) {
+ textSpan.textContent = isHidden ? "More" : "Less";
+ }
+ if (icon) {
+ icon.classList.toggle("rotate-180", !isHidden);
}
});
}