Dijit Form Button

This is a drop-in replacement for the stock dijit.form.Button. The main change is the HTML template, which is now a <button> element with an optional internal <span> element to contain an icon when necessary. The regular dijit.form.Button's template is gone, and the JS controller code is updated to reflect the new DOM structure.

This change has less run time overhead and is much easier to style than the original version. Note: It is does not support IE 6/7.

Accessibility Benefits

  • Less code overhead and fewer accessibility-specific attributes living in the DOM
  • DOM is now semantically correct and uses the button element
  • Natively supports keyboard access
Download the button code