Why you shouldn't use a div for everything - creating accessible buttons and navigations

Описание к видео Why you shouldn't use a div for everything - creating accessible buttons and navigations

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/Ba...
✅ More on Visually Hidden: https://www.scottohara.me/blog/2017/0...

📚 Resources I used to help make this video:
✅ AcceDe Web Accessibility Guidelines: https://www.accede-web.com/en/guideli...
✅ Paul J Adam's Accessible Hamburger Menu: https://pauljadam.com/demos/hamburger...
✅ Ally Style Guide's Mobile Navigation: https://a11y-style-guide.com/style-gu...
✅ Building Accessible Menu Systems on Smashing Magazine: https://www.smashingmagazine.com/2017...

⌚ 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
💬   / discord  

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!
📺   / kevinpowellcss  

---

Help support my channel
👨‍🎓 Get a course: https://www.kevinpowell.co/courses
👕 Buy a shirt: https://teespring.com/stores/making-t...
💖 Support me on Patreon:   / 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:   / 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!

Комментарии

Информация по комментариям в разработке