UNPKG

@guruhotel/aura-hooks

Version:

🪝 Hooks library designed by the Guruhotel team for Aura UI

1 lines 436 B
exports.__esModule=!0,exports.createAriaHider=function(e,r="body > :not(script)"){const t=Array.from(document.querySelectorAll(r)).map((r=>{if(r.contains(e))return;const t=r.getAttribute("aria-hidden");return null!==t&&"false"!==t||r.setAttribute("aria-hidden","true"),{node:r,ariaHidden:t}}));return()=>{t.forEach((e=>{e&&(null===e.ariaHidden?e.node.removeAttribute("aria-hidden"):e.node.setAttribute("aria-hidden",e.ariaHidden))}))}};