r3295 committed - tooltip: replaced crappy role="describedby" with aria-describedby

r3295 committed - tooltip: replaced crappy role="describedby" with aria-describedby


Revision: 3295
Author: joern.zaefferer
Date: Thu Sep 24 13:15:48 2009
Log: tooltip: replaced crappy role="describedby" with aria-describedby
http://code.google.com/p/jquery-ui/source/detail?r=3295
Modified:
/branches/dev/tests/visual/tooltip/default.html
/branches/dev/ui/jquery.ui.tooltip.js
=======================================
--- /branches/dev/tests/visual/tooltip/default.html    Thu Sep 24 13:02:36 2009
+++ /branches/dev/tests/visual/tooltip/default.html    Thu Sep 24 13:15:48 2009
@@ -19,7 +19,7 @@
        function enable() {
            // default
-            $("#context1, form").tooltip();
+            $("#context1, form input").tooltip();
            // custom class, replaces ui-widget-content
            $("#context2").tooltip({
=======================================
--- /branches/dev/ui/jquery.ui.tooltip.js    Thu Sep 24 13:02:36 2009
+++ /branches/dev/ui/jquery.ui.tooltip.js    Thu Sep 24 13:15:48 2009
@@ -18,7 +18,7 @@
$.widget("ui.tooltip", {
    _init: function() {
        var self = this;
-        this.tooltip = $("<div/>").attr("id", "uitooltip" +
increments++).attr("role", "tooltip").attr("aria-hidden", "true").addClass("ui-tooltip
ui-widget
ui-corner-all").addClass(this.options.tooltipClass).appendTo(document.body).hide();
+        this.tooltip = $("<div/>").attr("id", "ui-tooltip-" +
increments++).attr("role", "tooltip").attr("aria-hidden", "true").addClass("ui-tooltip
ui-widget
ui-corner-all").addClass(this.options.tooltipClass).appendTo(document.body).hide();
        this.opacity = this.tooltip.css("opacity");
        this.element
        .bind("focus.tooltip mouseover.tooltip", function(event) {
@@ -59,7 +59,7 @@
        }));
        this.tooltip.attr("aria-hidden", "false");
-        target.attr("role", "describedby-" + this.tooltip.attr("id"));
+        target.attr("aria-describedby", this.tooltip.attr("id"));
        if (this.tooltip.is(":animated"))
            this.tooltip.stop().show().fadeTo("normal", this.opacity);
@@ -71,7 +71,7 @@
        if (!this.current)
            return;
-        this.current.removeAttr("role");
+        this.current.removeAttr("aria-describedby");
        this.tooltip.attr("aria-hidden", "true");
        if (this.tooltip.is(':animated'))