Skip to content

Commit cd10d7a

Browse files
committed
Fix updating attributes
1 parent 2e457e8 commit cd10d7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deps/rabbitmq_management/priv/www/js/theme-switcher.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ function initializeSwitcher() {
5656
}
5757

5858
setScheme(newScheme);
59-
switcherButtons[0].setAttribute("x-scheme", newScheme);
59+
button.setAttribute("x-scheme", newScheme);
60+
button.setAttribute("title", `Switch between dark and light mode (currently ${newScheme} mode)`);
61+
button.setAttribute("aria-label", `Switch between dark and light mode (currently ${newScheme} mode)`);
6062
});
6163
});
6264
}

0 commit comments

Comments
 (0)