MDL-68390 tool_usertours: Update to use aria-hidden module
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 30 Jul 2020 03:36:23 +0000 (11:36 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 30 Jul 2020 03:36:23 +0000 (11:36 +0800)
admin/tool/usertours/amd/build/tour.min.js
admin/tool/usertours/amd/build/tour.min.js.map
admin/tool/usertours/amd/src/tour.js

index 5be936a..e1f5986 100644 (file)
Binary files a/admin/tool/usertours/amd/build/tour.min.js and b/admin/tool/usertours/amd/build/tour.min.js differ
index c305e7a..382273a 100644 (file)
Binary files a/admin/tool/usertours/amd/build/tour.min.js.map and b/admin/tool/usertours/amd/build/tour.min.js.map differ
index 393f546..4e6936a 100644 (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);
             }
         };