DEV Community

Discussion on: styled-components, one more time

 
stereobooster profile image
stereobooster

ok

Thread Thread
 
suckup_de profile image
Lars Moelleken

Button

  • keyboard friendly
  • disabling via fieldset
  • different states
  • accessible by default
Thread Thread
 
gunnarbittersmann profile image
Gunnar Bittersmann

What’s the difference between <button type="button"> and <div class="button" role="button" tabindex="0">, you ask? It’s the behavior.

In her talk “ARIA, accessibility APIs & coding like you give a damn!”, Léonie Watson demonstated what it would take to turn a <div> into a button. And it takes a lot! (VideoSlides)

TL;DR: Don’t do it! Use the <button> element.