Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Add aria labels and logic to mobile menu button.
Browse files Browse the repository at this point in the history
  • Loading branch information
Potherca committed Aug 24, 2024
1 parent 2099807 commit d2fd438
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
<header>
<nav>
<a href="https://metro.muze.nl/"><img alt="MetroJS Logo" src="https://metro.muze.nl/logo.svg"></a>
<button></button>
<ul>
<button
aria-controls="menu"
aria-expanded="false"
aria-label="Toggle Menu"
onfocusin="this.setAttribute('aria-expanded', 'true')"
onfocusout="this.setAttribute('aria-expanded', 'false')"
onkeydown="if (event.keyCode === 27) this.blur()"
>Open Menu</button>
<ul id="menu" aria-label="Close Menu">
<li><a href="#">Introduction</a>
<ul>
<li><a href="#/introduction.1.js">Example</a></li>
Expand Down

0 comments on commit d2fd438

Please sign in to comment.