Index: /CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js	(revision 5073)
+++ /CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js	(revision 5074)
@@ -413,4 +413,8 @@
 		this.on( 'show', function()
 			{
+				// Setup tabIndex on showing the dialog instead of on loading
+				// to allow dynamic tab order happen in dialog definition.
+				setupFocus();
+
 				if( editor.config.dialog_startupFocusTab
 					&& me._.tabIdList.length > 1 )
@@ -422,5 +426,4 @@
 				{
 					this._.currentFocusIndex = -1;
-					setupFocus();
 
 					// Decide where to put the initial focus.
