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