Dialog, Progressbar: Combined ARIA attribute settings into one .attr() call.

This commit is contained in:
Scott González 2008-11-07 13:57:31 +00:00
parent d942907043
commit fc406b754c
2 changed files with 10 additions and 6 deletions

View File

@ -83,8 +83,10 @@ $.widget("ui.dialog", {
(options.closeOnEscape && ev.keyCode (options.closeOnEscape && ev.keyCode
&& ev.keyCode == $.keyCode.ESCAPE && self.close()); && ev.keyCode == $.keyCode.ESCAPE && self.close());
}) })
.attr("role","dialog") .attr({
.attr("aria-labelledby", titleId) role: 'dialog',
'aria-labelledby': titleId
})
.mouseup(function() { .mouseup(function() {
self.moveToTop(); self.moveToTop();
}), }),

View File

@ -25,10 +25,12 @@ $.widget("ui.progressbar", {
this.element this.element
.addClass("ui-progressbar") .addClass("ui-progressbar")
.width(options.width) .width(options.width)
.attr("role","progressbar") .attr({
.attr("aria-valuemin","0") role: "progressbar",
.attr("aria-valuemax","100") "aria-valuemin": 0,
.attr("aria-valuenow","0"); "aria-valuemax": 100,
"aria-valuenow": 0
});
$.extend(this, { $.extend(this, {
active: false, active: false,