WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Do Web developers tend to dislike the button element?

for

From: Swift, Daniel P.
Date: Aug 13, 2020 7:00AM


I also remember running into functional problems with older versions of IE and the button element. I can't remember what the specific problems were (going back 5 or so years), but it was enough of a show stopper that we could not use them.

Dan Swift
Senior Web Specialist
University Communications and Marketing
West Chester University
610.738.0589

From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Patrick H. Lauke
Sent: Wednesday, August 12, 2020 4:36 PM
To: <EMAIL REMOVED>
Subject: Re: [WebAIM] Do Web developers tend to dislike the button element?

Historically, <button> elements used to be very stubborn against
restyling cross-browser. One of the last annoying issues nowadays is in
IE11 (where still supported by a site), where by default <button> has a
visible "dipping" behaviour of one or two pixels when active, and it
needs a lot of fiddling (last time I looked, including an additional
wrapper element) to get rid of that.

There also used to be some funky behaviour when it came to events,
bubbling, etc in some browsers. That has luckily gone by the wayside now...

Because of this history, a lot of articles, how-tos, libraries, etc used
other elements like <a href="#"> or <span>s and <div>s...and this
tradition stuck.

--
Patrick H. Lauke

https://www.splintered.co.uk/<https://www.splintered.co.uk> | https://github.com/patrickhlauke<https://github.com/patrickhlauke>
https://flickr.com/photos/redux/<https://flickr.com/photos/redux> | https://www.deviantart.com/redux<https://www.deviantart.com/redux>
twitter: @patrick_h_lauke | skype: patrick_h_lauke