Index: /CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js	(revision 4908)
+++ /CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js	(revision 4909)
@@ -1938,5 +1938,5 @@
 					styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {},
 					attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {},
-					innerHTML = ( contentsArg && contentsArg.call ? contentsArg( dialog, elementDefinition ) : contentsArg ) || '',
+					innerHTML = ( contentsArg && contentsArg.call ? contentsArg.call( this, dialog, elementDefinition ) : contentsArg ) || '',
 					domId = this.domId = attributes.id || CKEDITOR.tools.getNextNumber() + '_uiElement',
 					id = this.id = elementDefinition.id,
Index: /CKEditor/branches/features/aria/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/features/aria/_source/plugins/dialogui/plugin.js	(revision 4908)
+++ /CKEditor/branches/features/aria/_source/plugins/dialogui/plugin.js	(revision 4909)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -136,5 +136,5 @@
 								'</div>',
 								'<div class="cke_dialog_ui_labeled_content">',
-								contentHtml( dialog, elementDefinition ),
+								contentHtml.call( this, dialog, elementDefinition ),
 								'</div>' );
 					else
@@ -155,5 +155,5 @@
 									type : 'html',
 									html : '<span class="cke_dialog_ui_labeled_content">' +
-										contentHtml( dialog, elementDefinition ) +
+										contentHtml.call( this, dialog, elementDefinition ) +
 										'</span>'
 								}
@@ -243,4 +243,6 @@
 
 					html.push( '><input ' );
+
+					attributes[ 'aria-labelledby' ] = this._.labelId;
 					for ( var i in attributes )
 						html.push( i + '="' + attributes[i] + '" ' );
@@ -335,11 +337,13 @@
 								id : elementDefinition.id ? elementDefinition.id + '_checkbox' : CKEDITOR.tools.getNextNumber() + '_checkbox'
 							}, true ),
-						html = [],
-						attributes = { 'class' : 'cke_dialog_ui_checkbox_input', type : 'checkbox' };
+						html = [];
+
+					var labelId = CKEDITOR.tools.getNextNumber() + '_label';
+					var attributes = { 'class' : 'cke_dialog_ui_checkbox_input', type : 'checkbox', 'aria-labelledby' : labelId };
 					cleanInnerDefinition( myDefinition );
 					if ( elementDefinition[ 'default' ] )
 						attributes.checked = 'checked';
 					_.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes );
-					html.push( ' <label for="', attributes.id, '">',
+					html.push( ' <label id="', labelId, '" for="', attributes.id, '">',
 							CKEDITOR.tools.htmlEncode( elementDefinition.label ),
 							'</label>' );
@@ -386,5 +390,5 @@
 				{
 					var inputHtmlList = [], html = [],
-						commonAttributes = { 'class' : 'cke_dialog_ui_radio_item' },
+						commonAttributes = { 'class' : 'cke_dialog_ui_radio_item', 'aria-labelledby' : this._.labelId },
 						commonName = elementDefinition.id ? elementDefinition.id + '_radio' : CKEDITOR.tools.getNextNumber() + '_radio';
 					for ( var i = 0 ; i < elementDefinition.items.length ; i++ )
@@ -482,4 +486,5 @@
 				delete outerDefinition.style;
 
+				var labelId = CKEDITOR.tools.getNextNumber() + '_label';
 				CKEDITOR.ui.dialog.uiElement.call(
 					this,
@@ -494,7 +499,9 @@
 						title : elementDefinition.label,
 						hidefocus : 'true',
-						'class' : elementDefinition['class']
+						'class' : elementDefinition['class'],
+						role : 'button',
+						'aria-labelledby' : labelId
 					},
-					'<span class="cke_dialog_ui_button">' +
+					'<span id="' + labelId + '" class="cke_dialog_ui_button">' +
 						CKEDITOR.tools.htmlEncode( elementDefinition.label ) +
 					'</span>' );
@@ -544,5 +551,5 @@
 						html = [],
 						innerHTML = [],
-						attributes = { 'class' : 'cke_dialog_ui_input_select' };
+						attributes = { 'class' : 'cke_dialog_ui_input_select', 'aria-labelledby' : this._.labelId };
 
 					// Add multiple and size attributes from element definition.
Index: /CKEditor/branches/features/aria/_source/themes/default/theme.js
===================================================================
--- /CKEditor/branches/features/aria/_source/themes/default/theme.js	(revision 4908)
+++ /CKEditor/branches/features/aria/_source/themes/default/theme.js	(revision 4909)
@@ -172,5 +172,5 @@
 						'>' +
 						'<table class="cke_dialog', ' ' + CKEDITOR.env.cssClass,
-							' cke_', editor.lang.dir, '" style="position:absolute">' +
+							' cke_', editor.lang.dir, '" style="position:absolute" role="dialog" aria-labelledby="%title#" a>' +
 							'<tr><td>' +
 							'<div class="%body">' +
