diff options
author | kborchers <kris.borchers@gmail.com> | 2012-05-29 23:11:42 -0500 |
---|---|---|
committer | kborchers <kris.borchers@gmail.com> | 2012-05-29 23:11:42 -0500 |
commit | 240b22b1439df22408c5782e640e98cb335c7a2e (patch) | |
tree | 9b29456d0cf15c229335e3612b38763ed7520cb4 /ui | |
parent | 9f59d01fdc5e0a62f3bd2072b197d92ee107b2c3 (diff) | |
download | jquery-ui-240b22b1439df22408c5782e640e98cb335c7a2e.tar.gz jquery-ui-240b22b1439df22408c5782e640e98cb335c7a2e.zip |
Dialog: Use new uniqueId method for generating id's
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.dialog.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index e48c26400..4ef8a20cb 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -87,7 +87,6 @@ $.widget("ui.dialog", { options = this.options, title = options.title || " ", - titleId = $.ui.dialog.getTitleId( this.element ), uiDialog = ( this.uiDialog = $( "<div>" ) ) .addClass( uiDialogClasses + options.dialogClass ) @@ -105,10 +104,6 @@ $.widget("ui.dialog", { event.preventDefault(); } }) - .attr({ - role: "dialog", - "aria-labelledby": titleId - }) .mousedown(function( event ) { that.moveToTop( false, event ); }) @@ -140,8 +135,8 @@ $.widget("ui.dialog", { .appendTo( uiDialogTitlebarClose ), uiDialogTitle = $( "<span>" ) + .uniqueId() .addClass( "ui-dialog-title" ) - .attr( "id", titleId ) .html( title ) .prependTo( uiDialogTitlebar ), @@ -152,6 +147,11 @@ $.widget("ui.dialog", { .addClass( "ui-dialog-buttonset" ) .appendTo( uiDialogButtonPane ); + uiDialog.attr({ + role: "dialog", + "aria-labelledby": uiDialogTitle.attr( "id" ) + }); + uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection(); this._hoverable( uiDialogTitlebarClose ); this._focusable( uiDialogTitlebarClose ); |