mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +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() {
|
show: function() {
|
||||||
|
Array.from(document.body.children).forEach(function(child) {
|
||||||
|
if (child.classList.contains('modalView')) return;
|
||||||
|
child.setAttribute('inert', '');
|
||||||
|
});
|
||||||
|
|
||||||
this.toggleZ(true);
|
this.toggleZ(true);
|
||||||
// on reflow, change our class to animate. for whatever
|
// on reflow, change our class to animate. for whatever
|
||||||
// reason if this is done immediately, chrome might combine
|
// reason if this is done immediately, chrome might combine
|
||||||
|
@ -268,6 +273,12 @@ var ModalView = Backbone.View.extend({
|
||||||
this.toggleZ(false);
|
this.toggleZ(false);
|
||||||
}
|
}
|
||||||
}.bind(this), this.getAnimationTime());
|
}.bind(this), this.getAnimationTime());
|
||||||
|
|
||||||
|
|
||||||
|
Array.from(document.body.children).forEach(function(child) {
|
||||||
|
if (child.classList.contains('modalView')) return;
|
||||||
|
child.removeAttribute('inert');
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getInsideElement: function() {
|
getInsideElement: function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue