mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
Merge pull request #1022 from ulyssear/a11y-inert-content
Accessibility : Inert attribute for content outside of modal
This commit is contained in:
commit
be8e52104b
1 changed files with 11 additions and 0 deletions
|
@ -251,6 +251,11 @@ var ModalView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
show: function() {
|
||||
Array.from(document.body.children).forEach(function(child) {
|
||||
if (child.classList.contains('modalView')) return;
|
||||
child.setAttribute('inert', '');
|
||||
});
|
||||
|
||||
this.toggleZ(true);
|
||||
// on reflow, change our class to animate. for whatever
|
||||
// reason if this is done immediately, chrome might combine
|
||||
|
@ -268,6 +273,12 @@ var ModalView = Backbone.View.extend({
|
|||
this.toggleZ(false);
|
||||
}
|
||||
}.bind(this), this.getAnimationTime());
|
||||
|
||||
|
||||
Array.from(document.body.children).forEach(function(child) {
|
||||
if (child.classList.contains('modalView')) return;
|
||||
child.removeAttribute('inert');
|
||||
});
|
||||
},
|
||||
|
||||
getInsideElement: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue