MDL-68390 tool_usertours: Update to use aria-hidden module

This commit is contained in:
Andrew Nicols
2020-07-30 11:36:23 +08:00
parent eb06f92457
commit 7c56d5589d
3 changed files with 5 additions and 5 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -21,6 +21,7 @@
*/
import $ from 'jquery';
import * as Aria from 'core/aria';
import Popper from 'core/popper';
/**
@@ -1498,7 +1499,7 @@ export default class Tour {
let hidden = child.attr(attrName);
if (!hidden) {
child.attr(stateHolder, true);
child.attr(attrName, true);
Aria.hide(child);
}
};
@@ -1519,12 +1520,11 @@ export default class Tour {
*/
accessibilityHide() {
let stateHolder = 'data-has-hidden';
let attrName = 'aria-hidden';
let showFunction = function(child) {
let hidden = child.attr(stateHolder);
if (typeof hidden !== 'undefined') {
child.removeAttr(stateHolder);
child.removeAttr(attrName);
Aria.unhide(child);
}
};