@zag-js/aria-hidden
Advanced tools
Comparing version 0.0.0-dev-20221229205502 to 0.0.0-dev-20230201181615
@@ -31,3 +31,2 @@ "use strict"; | ||
function ariaHidden(targets, rootEl) { | ||
var _a; | ||
const exclude = targets.filter(Boolean); | ||
@@ -37,6 +36,6 @@ if (exclude.length === 0) | ||
const doc = exclude[0].ownerDocument || document; | ||
const win = (_a = doc.defaultView) != null ? _a : window; | ||
const win = doc.defaultView ?? window; | ||
const visibleNodes = new Set(exclude); | ||
const hiddenNodes = /* @__PURE__ */ new Set(); | ||
const root = rootEl != null ? rootEl : doc.body; | ||
const root = rootEl ?? doc.body; | ||
const walker = doc.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, { | ||
@@ -60,4 +59,3 @@ acceptNode(node2) { | ||
const hide = (node2) => { | ||
var _a2; | ||
let refCount = (_a2 = elementCountMap.get(node2)) != null ? _a2 : 0; | ||
let refCount = elementCountMap.get(node2) ?? 0; | ||
if (node2.getAttribute("aria-hidden") === "true" && refCount === 0) { | ||
@@ -64,0 +62,0 @@ return; |
{ | ||
"name": "@zag-js/aria-hidden", | ||
"version": "0.0.0-dev-20221229205502", | ||
"version": "0.0.0-dev-20230201181615", | ||
"description": "Hide targets from screen readers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8985
188