@zag-js/aria-hidden 1.17.4 → 1.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15,9 +15,10 @@ var correctTargets = (parent, targets) => targets.map((target) => {
|
|
|
15
15
|
console.error("[zag-js > ariaHidden] target", target, "in not contained inside", parent, ". Doing nothing");
|
|
16
16
|
return null;
|
|
17
17
|
}).filter((x) => Boolean(x));
|
|
18
|
+
var ignoreableNodes = /* @__PURE__ */ new Set(["script", "output", "status", "next-route-announcer"]);
|
|
18
19
|
var isIgnoredNode = (node) => {
|
|
19
|
-
if (node.localName
|
|
20
|
-
if (node.
|
|
20
|
+
if (ignoreableNodes.has(node.localName)) return true;
|
|
21
|
+
if (node.role === "status") return true;
|
|
21
22
|
if (node.hasAttribute("aria-live")) return true;
|
|
22
23
|
return node.matches("[data-live-announcer]");
|
|
23
24
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -13,9 +13,10 @@ var correctTargets = (parent, targets) => targets.map((target) => {
|
|
|
13
13
|
console.error("[zag-js > ariaHidden] target", target, "in not contained inside", parent, ". Doing nothing");
|
|
14
14
|
return null;
|
|
15
15
|
}).filter((x) => Boolean(x));
|
|
16
|
+
var ignoreableNodes = /* @__PURE__ */ new Set(["script", "output", "status", "next-route-announcer"]);
|
|
16
17
|
var isIgnoredNode = (node) => {
|
|
17
|
-
if (node.localName
|
|
18
|
-
if (node.
|
|
18
|
+
if (ignoreableNodes.has(node.localName)) return true;
|
|
19
|
+
if (node.role === "status") return true;
|
|
19
20
|
if (node.hasAttribute("aria-live")) return true;
|
|
20
21
|
return node.matches("[data-live-announcer]");
|
|
21
22
|
};
|