@duckduckgo/autoconsent 14.68.0 → 14.69.0

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.
@@ -1540,6 +1540,15 @@
1540
1540
  }
1541
1541
  return potentialPopups;
1542
1542
  }
1543
+ function isDialogLikeElement(node) {
1544
+ if (node.tagName === "DIALOG" && node.hasAttribute("open")) {
1545
+ return true;
1546
+ }
1547
+ if (node.getAttribute("role") === "dialog" || node.getAttribute("aria-modal") === "true") {
1548
+ return true;
1549
+ }
1550
+ return false;
1551
+ }
1543
1552
  function getPopupLikeElements() {
1544
1553
  const walker = document.createTreeWalker(
1545
1554
  document.documentElement,
@@ -1550,9 +1559,14 @@
1550
1559
  if (node.tagName === "BODY") {
1551
1560
  return NodeFilter.FILTER_SKIP;
1552
1561
  }
1553
- const cssPosition = window.getComputedStyle(node).position;
1554
- if ((cssPosition === "fixed" || cssPosition === "sticky") && isElementVisible(node)) {
1555
- return NodeFilter.FILTER_ACCEPT;
1562
+ if (isElementVisible(node)) {
1563
+ const cssPosition = window.getComputedStyle(node).position;
1564
+ if (cssPosition === "fixed" || cssPosition === "sticky") {
1565
+ return NodeFilter.FILTER_ACCEPT;
1566
+ }
1567
+ if (isDialogLikeElement(node)) {
1568
+ return NodeFilter.FILTER_ACCEPT;
1569
+ }
1556
1570
  }
1557
1571
  return NodeFilter.FILTER_SKIP;
1558
1572
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2026.3.31",
4
+ "version": "2026.4.8",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"