Socket
Socket
Sign inDemoInstall

@zag-js/aria-hidden

Package Overview
Dependencies
0
Maintainers
1
Versions
664
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0-dev-20221005155029 to 0.0.0-dev-20221031080845

8

dist/index.js

@@ -31,2 +31,3 @@ "use strict";

function ariaHidden(targets, rootEl) {
var _a;
const exclude = targets.filter(Boolean);

@@ -36,6 +37,6 @@ if (exclude.length === 0)

const doc = exclude[0].ownerDocument || document;
const win = doc.defaultView ?? window;
const win = (_a = doc.defaultView) != null ? _a : window;
const visibleNodes = new Set(exclude);
const hiddenNodes = /* @__PURE__ */ new Set();
const root = rootEl ?? doc.body;
const root = rootEl != null ? rootEl : doc.body;
const walker = doc.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {

@@ -59,3 +60,4 @@ acceptNode(node2) {

const hide = (node2) => {
let refCount = elementCountMap.get(node2) ?? 0;
var _a2;
let refCount = (_a2 = elementCountMap.get(node2)) != null ? _a2 : 0;
if (node2.getAttribute("aria-hidden") === "true" && refCount === 0) {

@@ -62,0 +64,0 @@ return;

{
"name": "@zag-js/aria-hidden",
"version": "0.0.0-dev-20221005155029",
"version": "0.0.0-dev-20221031080845",
"description": "Hide targets from screen readers",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc