Skip to content

Commit

Permalink
Add name="" attribute to <details> element in main navigation (#329)
Browse files Browse the repository at this point in the history
This is being tested by browsers (safari, edge, opera in preview. Stable in chrome 120) to create a native "accordion" effect only allowing one <details> element with the same name attribute to be open at a time
  • Loading branch information
swantzter authored Dec 6, 2023
1 parent d23c373 commit 3b0f21f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>Libera.&ZeroWidthSpace;Chat</h1>
<a id="nav-close" class="nav-close hidden" aria-controls="main-nav"><span>Close</span></a>
{% for navgroup in site.data.nav %}
{% if navgroup.items %}
<details>
<details name="main-navigation">
<summary
{% if navgroup.highlight %}class="highlight"{% endif %}
>{{ navgroup.name }}</summary>
Expand Down

0 comments on commit 3b0f21f

Please sign in to comment.