Hello! I'm Sarah. I'm a front-end developer and it's been an interesting ride since I started this journey a year ago and I'm here to learn learn and learn...
This is button, with all accessibility concerns a button should have. A button exists with or without a form, and in this case it's the right tool for the job. With a form, it could work even without JS, by submitting value click after click.
Mostly, you are right. But a button may render differently accross browsers, needs reseting etc. May be, it is too much for a beginners article. I am not an advocate. Just exploring dev.to after a while.
imho, no beginner should ever prefer
<div class="button"></div>
over<button></button>
... ever!yea, of course.
this isn't a form button, name could be "calcButton" etc.
This is button, with all accessibility concerns a button should have. A button exists with or without a form, and in this case it's the right tool for the job. With a form, it could work even without JS, by submitting value click after click.
Mostly, you are right. But a button may render differently accross browsers, needs reseting etc. May be, it is too much for a beginners article. I am not an advocate. Just exploring dev.to after a while.
A beginner should never ditch accessibility for layout that can be easily fixed ... layout is easy to fix, broken accessibility is a barrier.