MDL-62171 Theme boost: modal accessibility focus
[moodle.git] / lib / amd / src / modal.js
index 4b39d35..8b6e1ec 100644 (file)
@@ -565,7 +565,7 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
 
             this.root.removeClass('hide').addClass('show');
             this.accessibilityShow();
-            this.getTitle().focus();
+            this.getModal().focus();
             $('body').addClass('modal-open');
             this.root.trigger(ModalEvents.shown, this);
         }.bind(this));