diff options
Diffstat (limited to 'js/dist/modal.js')
| -rw-r--r-- | js/dist/modal.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/dist/modal.js b/js/dist/modal.js index 84cf9835e..0ed976d4d 100644 --- a/js/dist/modal.js +++ b/js/dist/modal.js @@ -27,6 +27,7 @@ var Modal = (function ($) { var JQUERY_NO_CONFLICT = $.fn[NAME]; var TRANSITION_DURATION = 300; var BACKDROP_TRANSITION_DURATION = 150; + var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key var Default = { backdrop: true, @@ -222,6 +223,7 @@ var Modal = (function ($) { } this._element.style.display = 'block'; + this._element.removeAttribute('aria-hidden'); this._element.scrollTop = 0; if (transition) { @@ -270,7 +272,7 @@ var Modal = (function ($) { if (this._isShown && this._config.keyboard) { $(this._element).on(Event.KEYDOWN_DISMISS, function (event) { - if (event.which === 27) { + if (event.which === ESCAPE_KEYCODE) { _this4.hide(); } }); @@ -293,6 +295,7 @@ var Modal = (function ($) { var _this5 = this; this._element.style.display = 'none'; + this._element.setAttribute('aria-hidden', 'true'); this._showBackdrop(function () { $(document.body).removeClass(ClassName.OPEN); _this5._resetAdjustments(); @@ -398,7 +401,7 @@ var Modal = (function ($) { } if (this._isBodyOverflowing && !isModalOverflowing) { - this._element.style.paddingRight = this._scrollbarWidth + 'px~'; + this._element.style.paddingRight = this._scrollbarWidth + 'px'; } } }, { |
