A React project which aims to be an accessible, responsive, boilerplate top navigation menu with a "Mega Menu"!
- WCAG 2.1 AA compliant
- W3C valid markup
- Fly-out menus
- Supports keyboard navigation and screen readers
- Responsively designed to adapt to modern mobile and desktop screen sizes
- Lightly styled with Emotion
- Supports theme customization with vanilla CSS, as demonstrated in the
synthwave.css
theme - Tested and supported on Edge, Safari, Firefox, and Chrome
- Includes CSS animations that respect the prefers-reduced-motion media query for users who prefer reduced motion
- Includes a demo project using Next.js, showcasing how to integrate the menu with a Next.js application
- What is a "Mega Menu"? A Mega Menu is a large dropdown navigation menu that displays multiple links and categories at once. It often organizes content into columns or sections, allowing users to see a broader range of options at a glance. It is typically used for websites with a lot of content or categories, like e-commerce or large informational sites.
- Why would someone use a Mega Menu? Mega menus are important for building an online e-commerce presence because they enhance navigation by allowing users to quickly browse and access a wide range of products or categories. They help improve the user experience by organizing complex inventories into clear, accessible sections, reducing the time it takes for customers to find what they're looking for, which can lead to higher engagement and conversion rates.
- Can I use this just for a simple website menu? Yes! This project is designed to be flexible and can be used for any type of website navigation. You can customize the menu to fit your needs, whether you want a simple dropdown menu or a more complex Mega Menu.
Visit: https://jasonrundell-react-mega-menu.vercel.app/
Donna Vitan for the accessibility consultation
Web Accessibility Tutorials (WCAG) Menu Structure
Web Accessibility Tutorials (WCAG) Fly-out Menus
JavaScript Event KeyCodes by Wes Bos
Supporting the Keyboard for Mobile
"Building Accessible Menu Systems" by Heydon Pickering
Using the aria-hidden Attribute
Learn by reading these:
- "Your Interactive Makes Me Sick"
- "Accessibility for Vestibular Disorders: How My Temporary Disability Changed My Perspective"
- "An Introduction to the Reduced Motion Media Query"
- "prefers-reduced-motion: Sometimes Less Movement is More"
- W3C: Understanding Success Criterion 2.3.3: Animation from Interactions
- MDN Reference
- Open settings for Accessibility
- Toggle Reduce Motion On/Off
- Open settings for Accessibility
- Toggle Reduce Motion On/Off
- Press the Win+R keys to open Run, type
SystemPropertiesPerformance.exe
into Run, and click/tap on OK to directly open to the Visual Effects tab in Performance Options. - Check (enable - default) or uncheck (disable)
Animate controls and elements inside windows
. - If you don't see an immediate change, then you can restart the explorer process or sign out and sign in to apply instead.
- Search in your system settings for Remove Animations and toggle On/Off, or
- Go to your system settings > Accessibility and look for a toggle to reduce motion or turn off animations
- If you have a browser app already open, you'll have to force quit it to have the setting take effect
Icons from the Free for Web download pack by Font Awesome