Is there a live component showcase for your project? Just from the source code I see some requirements [0] not being followed:
* The element with role button has aria-haspopup set to either menu or true.
* When the menu is displayed, the element with role button has aria-expanded set to true. When the menu is hidden, it is recommended that aria-expanded is not present. If aria-expanded is specified when the menu is hidden, it is set to false.
I'd also use a native "button" instead of "div role=button". It's cumbersome to (un)style buttons, but you lose a lot of built-in functionality with a custom component, which you need to care for.
Not right now because I'm in the middle of integrating ansible into my servers and was waiting to get that finished, and I also need to make some changes with local storage.
Nice catch on aria-haspopup! I totally missed that. Also good tip on aria-expanded, thank you.
I can't remember why I went with a div instead of a button. I'd like to think there was a reason, but it was probably just oversight on my part.
* The element with role button has aria-haspopup set to either menu or true.
* When the menu is displayed, the element with role button has aria-expanded set to true. When the menu is hidden, it is recommended that aria-expanded is not present. If aria-expanded is specified when the menu is hidden, it is set to false.
I'd also use a native "button" instead of "div role=button". It's cumbersome to (un)style buttons, but you lose a lot of built-in functionality with a custom component, which you need to care for.
[0] https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton