Accessibility - nav toggle

I took Kevin's responsive layouts course few weeks ago and in one of the challenges I remember him changing a code for hidden menu (hidden because of hamburger button on the phone) from display:none; to visibility:hidden; height:0; position:absolute; explaining that it's better for accessibility. Today I watched this video https://www.youtube.com/watch?v=YAqRQoN8ykI focused on accessibility in navigations in which display: none was used again. I don't know if the video is older (1.12.2022) or the course is (unknown) and now I'm not sure which approach is actually better or if there is even difference. What is the correct solution regarding accessibility?
Kevin Powell
YouTube
Why you shouldn't use a div for everything - creating accessible bu...
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: āœ… AcceD...
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server