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.2.1 to 0.2.2

8

dist/index.js

@@ -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.2.1",
"version": "0.2.2",
"description": "Hide targets from screen readers",

@@ -5,0 +5,0 @@ "keywords": [

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