Why you shouldn't use a div for everything - creating accessible buttons and navigations
About
No channel description available.
Latest Posts
Video Description
I think it's important to highlight when we've made past mistakes and show the right way to do it when we find those mistakes. π Links β The finished code: https://codepen.io/kevinpowell/pen/BaVdrLm β More on Visually Hidden: https://www.scottohara.me/blog/2017/04/14/inclusively-hidden.html π Resources I used to help make this video: β AcceDe Web Accessibility Guidelines: https://www.accede-web.com/en/guidelines/rich-interface-components/hamburger-menu/ β Paul J Adam's Accessible Hamburger Menu: https://pauljadam.com/demos/hamburger-menu.html β Ally Style Guide's Mobile Navigation: https://a11y-style-guide.com/style-guide/section-navigation.html#kssref-navigation-navigation-mobile β Building Accessible Menu Systems on Smashing Magazine: https://www.smashingmagazine.com/2017/11/building-accessible-menu-systems/#navigation-menu-buttons β Timestamps 00:00 - Introduction 00:29 - The mistake I made 01:18 - Why divs donβt make good buttons 03:10 - Fixing the styling of the button 03:48 - The second big mistake 05:20 - Adding extra context to our button 09:27 - Fixing up the CSS 10:47 - Updating the original jQuery to JavaScript 12:03 - Adding the aria-expanded to the JS 13:20 - Making improvements to the JS 18:38 - The next problem - removing the menu when itβs closed 19:31 - Why itβs important to do all this 20:49 - Toggling the display of the ul 23:29 - Fixing the animation #css -- Come hang out with other dev's in my Discord Community π¬ https://discord.gg/nTYCvrK Keep up to date with everything I'm up to β https://www.kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! πΊ https://www.twitch.tv/kevinpowellcss --- Help support my channel π¨βπ Get a course: https://www.kevinpowell.co/courses π Buy a shirt: https://teespring.com/stores/making-the-internet-awesome π Support me on Patreon: https://www.patreon.com/kevinpowell --- My editor: VS Code - https://code.visualstudio.com/ --- I'm on some other places on the internet too! If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Twitter: https://twitter.com/KevinJPowell Codepen: https://codepen.io/kevinpowell/ Github: https://github.com/kevin-powell --- And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
You May Also Like
Craft Essentials You Need Now
AI-recommended products based on this video

Elmer's Disappearing Purple School Glue Stick, 20G, 0.7-Ounce Each, 3-Pack (61666Q)

Adhesive Remover Spray, Sticker Lifter Liquid Tape Multifunctional Glue Remover Adhesive Spray, 120ml Safely Removes Stickers Labels Decals Tape Chewing Gum Grease Tar Crayon Glue

3PCS Dog Grooming Scissors kit Thinning Shears Scissors Curved Scissor Comb Stainless Steel Pet Cat Dog Grooming for Dogs Cats Pets Professional Straight Scissor Comb

LEGO Icons Williams Racing FW14B & Nigel Mansell F1 Model Car Kit - Building Set for Adults, Ages 18+ - F1 DIY Craft for Display - Gift Idea for Fans of F1-10353

LEGO Icons Leonardo da Vinci's Flying Machine DIY Kit - Ornithopter Building Set for Adults, Ages 18+ - Craft for Home or Office Decor with Display Stand - Gift Idea - 10363

Koolmox Koolmox Canvas Grocery Bag, 6-Pack 22'' Large Bags with Reinforced Handles, 12 Oz Heavy Duty Reusable Washable Grocery Shopping Bags Plain Bags for Teacher Paint Embroidery Draw DIY Art Craft Totes

Purple Ladybug Decorate Your Own Water Bottle for Kids Craft Kits - DIY Unicorn Girls Gifts 8-12 Years Old, Arts and Crafts for Girls Age 8-10 - Fun Travel Activities for Kids

LEGO Icons Leonardo da Vinci's Flying Machine DIY Kit - Ornithopter Building Set for Adults, Ages 18+ - Craft for Home or Office Decor with Display Stand - Gift Idea - 10363

LEGO Icons Williams Racing FW14B & Nigel Mansell F1 Model Car Kit - Building Set for Adults, Ages 18+ - F1 DIY Craft for Display - Gift Idea for Fans of F1-10353




















