diff options
| author | Rohit Sharma <[email protected]> | 2020-06-04 13:05:09 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-06-04 10:35:09 +0300 |
| commit | 5faf41eb4837491fa8193910c5816efadb4dbc5a (patch) | |
| tree | 6fd1c3508ef5bc75401df650f363e51a526485e1 /js/src | |
| parent | 358d637d1c664950fea501f928cc9f0247f2b8f0 (diff) | |
| download | bootstrap-5faf41eb4837491fa8193910c5816efadb4dbc5a.tar.xz bootstrap-5faf41eb4837491fa8193910c5816efadb4dbc5a.zip | |
Add role="dialog" in modals via JavaScript (#30936)
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 749f47cef..f5b5721f4 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -248,6 +248,7 @@ class Modal { this._element.style.display = 'block' this._element.removeAttribute('aria-hidden') this._element.setAttribute('aria-modal', true) + this._element.setAttribute('role', 'dialog') this._element.scrollTop = 0 if (modalBody) { @@ -323,6 +324,7 @@ class Modal { this._element.style.display = 'none' this._element.setAttribute('aria-hidden', true) this._element.removeAttribute('aria-modal') + this._element.removeAttribute('role') this._isTransitioning = false this._showBackdrop(() => { document.body.classList.remove(CLASS_NAME_OPEN) |
