File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,15 @@ $.widget("ui.dialog", {
156156 "aria-labelledby" : uiDialogTitle . attr ( "id" )
157157 } ) ;
158158
159+ // We assume that any existing aria-describedby attribute means
160+ // that the dialog content is marked up properly
161+ // otherwise we brute force the content as the description
162+ if ( ! this . element . find ( "[aria-describedby]" ) . length ) {
163+ uiDialog . attr ( {
164+ "aria-describedby" : this . element . uniqueId ( ) . attr ( "id" )
165+ } ) ;
166+ }
167+
159168 uiDialogTitlebar . find ( "*" ) . add ( uiDialogTitlebar ) . disableSelection ( ) ;
160169 this . _hoverable ( uiDialogTitlebarClose ) ;
161170 this . _focusable ( uiDialogTitlebarClose ) ;
@@ -205,6 +214,7 @@ $.widget("ui.dialog", {
205214 }
206215 this . uiDialog . hide ( ) ;
207216 this . element
217+ . removeUniqueId ( )
208218 . removeClass ( "ui-dialog-content ui-widget-content" )
209219 . hide ( )
210220 . appendTo ( "body" ) ;
You can’t perform that action at this time.
0 commit comments