I'm following along with a YouTube video & it's teaching me about buttons. The video uses the attribute role
, but how come they use role
instead of type
?
<button type="button"></button>
<button role="button"></button>
Which one should I use and why? None of the HTML documentation I've looked up shows a role as an attribute for the button.