r3588 committed - Button: Added ARIA role.

r3588 committed - Button: Added ARIA role.

Revision: 3588
Author: scott.gonzalez
Date: Sat Jan 2 08:18:52 2010
Log: Button: Added ARIA role.
http://code.google.com/p/jquery-ui/source/detail?r=3588
Modified:
/branches/dev/ui/jquery.ui.button.js
=======================================
--- /branches/dev/ui/jquery.ui.button.js    Sat Jan 2 07:27:30 2010
+++ /branches/dev/ui/jquery.ui.button.js    Sat Jan 2 08:18:52 2010
@@ -41,6 +41,7 @@
        this.buttonElement
            .addClass(baseClasses)
+            .attr('role', 'button')
            .bind("mouseenter.button", function() {
                if (options.disabled) { return; }
                $(this).addClass("ui-state-hover");
@@ -141,6 +142,7 @@
    destroy: function() {
        this.buttonElement
            .removeClass(baseClasses + " " + otherClasses)
+            .removeAttr('role')
            .html(this.buttonElement.find(".ui-button-text").html());
        if (this.type == 'checkbox' || this.type == 'radio') {
--