Time to stop using the button element

The button element was rediscovered by Kevin Hale of Wufoo and Particletree fame and while reading through the post, thinking I gave you feedback during the Wufoo beta about the button element and it took you this long to see its’ advantages. I started reading the comments, one comment from Russell Beattie stopped me in my tracks.

Just to expand on the above comment about problems with WindowsCE/PocketPC – it’s not just those devices, but all mobile browsers that conform to the XHTML-MP (mobile profile) standard because (presumably) it’s based on XHTML-Basic, which doesn’t include the button element. I tested this on a couple phones I have and sure enough, the button elements aren’t even displayed.

I checked with my mobile and the button element failed, images and text inside the element displayed, but the button failed to work. So I read the XHTML-MP specifications (PDF) and sure enough the form support is only for :

  • form
  • input
  • label
  • option
  • select
  • textarea

There is also limited support for fieldset and optgroup.

Last year I championed the button element, going as far a doing a presentation on button the forgotten element to the Perth WSG. Now I will strongly counsel against using the button element because it is not supported in mobile browsers and mobile are a big part of the future of the web.

I will change my position about the button element once it is supported by the majority of mobile browsers, but until then do not use the button element.

4 Responses to “Time to stop using the button element”

  1. Gary Barber Says:

    Good spot.

    Yeah I noticed this on a site test. But was too busy to check the spec and just replaced with inputs to get the job out the door. Good warning. We should all read the specs! Add it too the list.. groan..

  2. Al Says:

    Wow, thats good to know. I think i have about a hundred forms to fix next week…

  3. Buttons – forgotten and immobile — Tyssen Design Says:

    [...] As Nick points out in a more recent post, Time to stop using the button element, it seems that the button element is not part of the XHTML-MP specification (PDF, 400K) which is a shame because as I wrote last year, and more recently by Kevin Hale of Particletree, buttons provide you with more styling flexibility than inputs and you can do some cool stuff with them. [...]

  4. Kay Smoljak Says:

    I know I’m late to the party on this, but over the past month I’ve been playing with the internet on my mobile a lot, and here’s what I’ve found: 99.998% of web sites that were not specifically designed and formatted for a mobile device are unusable on said mobile device. Devices are still in the cowboy years. I’m not giving up on buttons because of mobile devices just yet.

Google