Hacker News new | past | comments | ask | show | jobs | submit login

The button html element is old enough to vote.

Since it's introduction, jQuery was born and died. Backbone was created and became obsolete. React took over the internet. Webpack, babel, and node were invented.

With all that change, I think it's safe to say web technologies are adopted or not based on inertia.

I think you are being over-generous.




Perhaps. I happen to be in a space with lots of "old enough to vote" code still running.

On the other hand, the Compose "button" in gmail is ... a <div>:

<div class="T-I T-I-KE L3" style="user-select: none" role="button" tabindex="0" jscontroller="eIu7Db" jsaction="click:dlrqf; clickmod:dlrqf" jslog="20510; u014N:cOuCgd,Kr2w4b" gh="cm">Compose</div>


Maybe came across more crossly than I intended... I have a blog I started in the 90s so I hear you.

FWIW, my issue with using divs is not that they should never be used as buttons. It's that few people who use them that way go to the effort of doing it correctly. It's absolutely possible to do it right and have a functioning/ accessible js button.

Either go the full way and do it right—with accessibility—or just style the standard components. In most cases the latter is the easiest way to go if you care about getting it right.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: