Workaround to have tabindex for mobile dropdown but not on desktop

This commit is contained in:
Firq 2024-01-01 19:41:46 +01:00
parent 336c0c0db5
commit b03eba2bd5
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
4 changed files with 91 additions and 4 deletions
src/components

View file

@ -11,11 +11,11 @@ const hamburger_src_url = `url("${hamburger.src}")`;
<span class="visually-hidden">Firq Website Logo</span>
</a>
<ul class="desktop">
<slot />
<slot name="desktop"/>
</ul>
<button class="mobile" aria-label="Navigation Button" tabindex="0" onclick="this.focus()">
<ul>
<slot />
<slot name="mobile"/>
</ul>
<div class="placeholder"></div>
<div class="hamburger-menu" role="menu"></div>