fix: make menu entries accessible

This commit is contained in:
Björn Fromme committed 2025-02-01 12:12:06 +01:00
1 parent 24c8c46ca4
commit 7c2a3cdf4f
2 files changed
+10 -6

No files matched your search

@@ -12,6 +12,9 @@ export default class extends Controller {
expandedValueChanged(expanded) {
this.submenuTarget.classList.toggle(this.closedClass, false === expanded)
if (false === this.hasButtonTarget) {
return
}
this.buttonTarget.setAttribute('aria-expanded', expanded)
if (false === this.hasIconTarget) {
return