Skip to main content

Search and Top Navigation

Ticket #3451: labelledby.patch
File labelledby.patch, 1.5 KB (added by scottgonzalez, September 19, 2008 01:05AM UTC)
Index: /Users/sgonzale/Documents/workspace/jQuery UI/ui/ui.dialog.js
===================================================================
--- /Users/sgonzale/Documents/workspace/jQuery UI/ui/ui.dialog.js	(revision 692)
+++ /Users/sgonzale/Documents/workspace/jQuery UI/ui/ui.dialog.js	(working copy)
@@ -49,16 +49,27 @@
 					height: '100%'
 				}),
 			
-			title = options.title || ' ',
-			uiDialogTitlebar = (this.uiDialogTitlebar =
-				$('
')) - .append('' + title + '') + uiDialogTitlebar = (this.uiDialogTitlebar = $('
')) + .addClass('ui-dialog-titlebar') .append('X') .prependTo(uiDialogContainer), + title = options.title || ' ', + titleId = $.ui.dialog.getTitleId(this.element), + uiDialogTitle = $('') + .addClass('ui-dialog-title') + .attr('id', titleId) + .html(title) + .prependTo(uiDialogTitlebar), + uiDialog = (this.uiDialog = uiDialogContainer.parent()) .appendTo(document.body) .hide() + // ARIA support + .attr({ + role: 'dialog', + 'aria-labelledby': titleId + }) .addClass('ui-dialog') .addClass(options.dialogClass) // add content classes to dialog @@ -407,6 +418,11 @@ getter: 'isOpen', + uuid: 0, + getTitleId: function($el) { + return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid); + }, + overlay: function(dialog) { this.$el = $.ui.dialog.overlay.create(dialog); }

Download in other formats:

Original Format