DEV Community

Discussion on: Responsive Navigation Menu for 2021🎖️|| CSS JS

Collapse
 
grahamthedev profile image
GrahamTheDev

No no no a thousand times no!

Do not use radio buttons for navigation! This is the least accessible solution you could probably have come up with next to just straight <div>s.

As they aren't in a form they may not be keyboard accessible, as you hide the radio inputs with display: none they are definitely not accessible.

But lets assume you don't care about disabled people, what about SEO? What about valid HTML. I mean it isn't difficult:-

<nav>
    <ul>
        <li><a href="#home">Home</a></li>
        <li><a href="#about">About</a></li>
        <li><a href="#services">Services</a></li>
        <li><a href="#contacts">Contacts</a></li>
    <ul>
</nav>
Enter fullscreen mode Exit fullscreen mode

I don't normally put negative comments on a post but you should probably delete this, it may do a lot more harm than good!

Collapse
 
andelkocvjetkovic profile image
Andelko Cvjetkovic • Edited

I'm sorry to, but I completely agree, also you shoudn't animate right property because it cause repaint in browsers. csstriggers.com/