DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

Discussion on: Tell us what your top unpopular tech opinion is 😈

Collapse
 
gmartigny profile image
Guillaume Martigny

I don't get why use <form> to make buttons? You can just style a <a> with css to look like a button and not break accessibility.

Collapse
 
fleshmecha profile image
〄

I run my website through the wave test for checking accessibility and it’s never said form action to change pages is a problem. Can you explain why this breaks accessibility in your view? I’d love to learn something new.

Thread Thread
 
gmartigny profile image
Guillaume Martigny

I'm not an accessibility expert. But the simpler the better for screen-reader.

<form action="page.html">
    <button type="submit">Click</button>
</form>

vs

<a href="page.html">Click</a>

What's make you prefer the former one ?