Last active
October 1, 2021 14:42
-
-
Save AllThingsSmitty/628b80ba11de5ee91d67 to your computer and use it in GitHub Desktop.
Accessible dropdown menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Based on @grayghostvisuals' accessible dropdown menu --> | |
<nav class="menu" id="a11y-menu" role="navigation" aria-label="Main menu"> | |
<ul class="nav level-1 list-reset" role="menubar" aria-hidden="false"> | |
<li class="has-subnav" role="menuitem" aria-haspopup="true"> | |
<a href="#about">About</a> | |
<ul class="level-2 list-reset" data-test="true" aria-hidden="true" role="menu"> | |
<li role="menuitem"><a href="#news" tabindex="-1">News</a></li> | |
<li role="menuitem"><a href="#governance" tabindex="-1">Governance</a></li> | |
<li role="menuitem"><a href="#diversity" tabindex="-1">Diversity</a></li> | |
<li role="menuitem"><a href="#contact" tabindex="-1">ContactUs</a></li> | |
</ul> | |
</li> | |
<li role="menuitem" aria-haspopup="true"> | |
<a href="#academics">Academics</a> | |
<ul class="level-2 list-reset" data-test="true" aria-hidden="true" role="menu" class="list-reset"> | |
<li role="menuitem"><a href="#programs" tabindex="-1">Degree Programs</a></li> | |
<li role="menuitem"><a href="#faculty" tabindex="-1">Faculty</a></li> | |
<li role="menuitem"><a href="#distance" tabindex="-1">Distance Learning</a></li> | |
<li role="menuitem"><a href="#libs" tabindex="-1">Libraries</a></li> | |
</ul> | |
</li> | |
<li role="menuitem" aria-haspopup="true"> | |
<a href="#admissions">Admissions</a> | |
<ul class="level-2 list-reset" data-test="true" aria-hidden="true" role="menu" class="list-reset"> | |
<li role="menuitem"><a href="#undergraduate" tabindex="-1">Undergraduate</a></li> | |
<li role="menuitem"><a href="#tuition" tabindex="-1">Tuition</a></li> | |
<li role="menuitem"><a href="#financial-aid" tabindex="-1">Financial Aid</a></li> | |
</ul> | |
</li> | |
<li role="menuitem" aria-haspopup="true"> | |
<a href="#visitors">Visitors</a> | |
<ul class="level-2 list-reset" data-test="true" aria-hidden="true" role="menu" class="list-reset"> | |
<li role="menuitem"><a href="#events" tabindex="-1">Events</a></li> | |
<li role="menuitem"><a href="#campus-map" tabindex="-1">Campus Map</a></li> | |
<li role="menuitem"><a href="#parking" tabindex="-1">Parking</a></li> | |
</ul> | |
</li> | |
</ul> | |
</nav> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment