|
|
|
|
|
by shakna
1235 days ago
|
|
Except modern HTML actually has a builtin which is accessible, and works far better with screenreaders and other assistant technologies. The details element. <details>
<summary>Menu</summary>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/thing">Thing</a></li>
</ul>
</details>
You may want to add a tiny bit of CSS, like adding a border, and setting the cursor to a pointer, for your sighted users: details {
padding: 0.5em;
border-style: solid;
border-width: 1px;
border-radius: 0.25em;
cursor: pointer;
}
|
|
Hopefully this will change soon. I’ll amend the article when this will be the case.