3 ms·
Yes but what is the the cost of accessibility? How much more expensive is it to use a <button> compared to a <div> with attached event handlers?
by goto11 5y ago
Yes but what is the the cost of accessibility? How much more expensive is it to use a <button> compared to a <div> with attached event handlers?
- slver 5y agoIf only it were so simple.
- lmm 5y agoThe cost of doing accessibility is the cost of doing accessibility testing. If you're not actually testing your accessibility work, using a button instead of a div is pissing in the wind.
- goto11 5y agoSurely a button is more accessible than a div regardless?
- lmm 5y agoMaybe, maybe not. ("Surely" using the browser's CSS animations would be more efficient than reimplementing them yourself in JavaScript - but if actually you benchmark it, the opposite is true). If you're not actually testing it, how could you possibly know?