diff options
| author | Patrick H. Lauke <[email protected]> | 2018-12-05 18:58:09 +0000 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2018-12-05 20:58:09 +0200 |
| commit | 6c00dd08bc719d3fa5ada8211f65edf3b73c6d1b (patch) | |
| tree | 7a16e2be5db86bad43f8eabb55a8c64e6ae84116 /js/src | |
| parent | 8fb6e84fa0a1060247268f2c0890c268ca0e7d1b (diff) | |
| download | bootstrap-6c00dd08bc719d3fa5ada8211f65edf3b73c6d1b.tar.xz bootstrap-6c00dd08bc719d3fa5ada8211f65edf3b73c6d1b.zip | |
Add aria-modal to modals (#27780)
Dynamically set/remove `aria-modal="true"` when a modal is shown/hidden
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/modal.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 5dfb64407..2d4401ff8 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -243,6 +243,7 @@ class Modal { this._element.style.display = 'block' this._element.removeAttribute('aria-hidden') + this._element.setAttribute('aria-modal', true) this._element.scrollTop = 0 if (transition) { @@ -314,6 +315,7 @@ class Modal { _hideModal() { this._element.style.display = 'none' this._element.setAttribute('aria-hidden', true) + this._element.removeAttribute('aria-modal') this._isTransitioning = false this._showBackdrop(() => { $(document.body).removeClass(ClassName.OPEN) |
