accessify-widget 0.3.7 → 0.3.8

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.
@@ -1,4 +1,4 @@
1
- import { d, i } from "./index-C_cEJXg7.js";
1
+ import { d, i } from "./index-C3jQHPAw.js";
2
2
  export {
3
3
  d as destroy,
4
4
  i as init
@@ -6433,14 +6433,14 @@ function FeatureGrid($$anchor, $$props) {
6433
6433
  const FEATURE_LOADERS = {
6434
6434
  contrast: () => import("./contrast-CqsICAkU.js"),
6435
6435
  "text-size": () => import("./text-size-C6OFhCGi.js"),
6436
- "keyboard-nav": () => import("./keyboard-nav-BN8NOhTx.js"),
6436
+ "keyboard-nav": () => import("./keyboard-nav-CzeLetKR.js"),
6437
6437
  "link-highlight": () => import("./link-highlight-DBGm067Y.js"),
6438
6438
  "reading-guide": () => import("./reading-guide-VT8NciIL.js"),
6439
6439
  "reading-mask": () => import("./reading-mask-BABChuCz.js"),
6440
6440
  "animation-stop": () => import("./animation-stop-C0MwseK0.js"),
6441
6441
  "hide-images": () => import("./hide-images-B_LeCBcd.js"),
6442
6442
  "big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
6443
- "page-structure": () => import("./page-structure-CK_agCbv.js"),
6443
+ "page-structure": () => import("./page-structure-DFT1USJ1.js"),
6444
6444
  tts: () => import("./tts-CjszLRnb.js"),
6445
6445
  "text-simplify": () => import("./text-simplify-Cvhpio7g.js"),
6446
6446
  "alt-text": () => Promise.resolve().then(() => altText)
@@ -8175,19 +8175,17 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
8175
8175
  }
8176
8176
  function scanForBackgroundImages() {
8177
8177
  const found = [];
8178
- const candidates = document.querySelectorAll(
8179
- 'header, [class*="hero"], [class*="banner"], [class*="header"], [class*="bg-"], [class*="background"], [style*="background"]'
8180
- );
8181
- for (const el of candidates) {
8178
+ const allElements = document.querySelectorAll("*");
8179
+ for (const el of allElements) {
8182
8180
  if (el.closest("#accessify-root") || el.closest("accessify-widget")) continue;
8183
8181
  if (el.getAttribute("data-accessify-bg-alt")) continue;
8182
+ if (el.offsetWidth < 200 || el.offsetHeight < 150) continue;
8184
8183
  const style = getComputedStyle(el);
8185
8184
  const bg = style.backgroundImage;
8186
8185
  if (!bg || bg === "none") continue;
8187
8186
  const urlMatch = bg.match(/url\(["']?([^"')]+)["']?\)/);
8188
8187
  if (!urlMatch) continue;
8189
- const rect = el.getBoundingClientRect();
8190
- if (rect.width < 100 || rect.height < 100) continue;
8188
+ if (urlMatch[1].startsWith("data:image/svg")) continue;
8191
8189
  if (el.getAttribute("role") === "img" && el.getAttribute("aria-label")) continue;
8192
8190
  found.push(el);
8193
8191
  }
@@ -8582,4 +8580,4 @@ export {
8582
8580
  init as i,
8583
8581
  t
8584
8582
  };
8585
- //# sourceMappingURL=index-C_cEJXg7.js.map
8583
+ //# sourceMappingURL=index-C3jQHPAw.js.map