import $ from 'jquery';
var focusableElementsSelector = "a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";
// Based on the incredible accessible modal dialog.
function AccessibleDialog( modalDiv, $returnElement, title, closeButtonLabel) {
this.title = title;
this.closeButtonLabel = closeButtonLabel;
this.focusedElementBeforeModal = $returnElement;
this.baseId = $(modalDiv).attr('id') || Math.floor(Math.random() * 1000000000).toString();
var thisObj = this;
var modal = modalDiv;
this.modal = modal;
modal.addClass('able-modal-dialog');
var closeButton = $('