logoalt Hacker News

no_wizardlast Tuesday at 3:48 PM1 replyview on HN

Using the right elements (like button instead of a div) will take you very, very, very fair with little to no additional work.


Replies

tracker1last Tuesday at 5:15 PM

+1 here... <button> vs <a> in particular... if it's programmatic behavior, use a styled button if you want it to look like a link, and vice-versa for navigation behaviors.

I will add that a good component library should also handle some of this for you... in particular menu navigation, popouts/drawers etc. That said, can't say how many sites/apps have really broken behavior with this.