Keyboard-accessible drop-down navigation
Focusable element before
Focusable element after
Features
- Three levels of navigation
- Organic list structure
- Hover on non-touch devices
- Touch control when a touch event is detected
- Mouse hover support on hybrid devices
- Accessible by the Tab key
- Accessible without JavaScript
- Using WAI-ARIA a11y attributes aria-expanded and aria-haspopup
- Mobile version with touch control
- Delayed hover effect for diagonally accessible third-level nav
- Supporting nav items with or without a link
- IE8+ support
- No dependencies
- 1 KB of JavaScript and 1 KB of CSS
GitHub project