accessify-widget 0.3.19 → 0.3.21

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-ZJae2VzU.js";
1
+ import { d, i } from "./index-bqpA9Puf.js";
2
2
  export {
3
3
  d as destroy,
4
4
  i as init
@@ -6637,16 +6637,16 @@ function FeatureGrid($$anchor, $$props) {
6637
6637
  const FEATURE_LOADERS = {
6638
6638
  contrast: () => import("./contrast-CqsICAkU.js"),
6639
6639
  "text-size": () => import("./text-size-m_mHNPWo.js"),
6640
- "keyboard-nav": () => import("./keyboard-nav-BdSCmx4b.js"),
6640
+ "keyboard-nav": () => import("./keyboard-nav-CPnRSBAa.js"),
6641
6641
  "link-highlight": () => import("./link-highlight-DBGm067Y.js"),
6642
6642
  "reading-guide": () => import("./reading-guide-VT8NciIL.js"),
6643
6643
  "reading-mask": () => import("./reading-mask-BABChuCz.js"),
6644
6644
  "animation-stop": () => import("./animation-stop-C0MwseK0.js"),
6645
6645
  "hide-images": () => import("./hide-images-B_LeCBcd.js"),
6646
6646
  "big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
6647
- "page-structure": () => import("./page-structure-D6bdtWiD.js"),
6647
+ "page-structure": () => import("./page-structure-Bp15mzNy.js"),
6648
6648
  tts: () => import("./tts-CjszLRnb.js"),
6649
- "text-simplify": () => import("./text-simplify-CU8icsDG.js"),
6649
+ "text-simplify": () => import("./text-simplify-DPTSSdUB.js"),
6650
6650
  "alt-text": () => Promise.resolve().then(() => altText)
6651
6651
  };
6652
6652
  let contrastMode = /* @__PURE__ */ state(proxy(readStoredContrastMode()));
@@ -8412,12 +8412,26 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
8412
8412
  if (isImg) {
8413
8413
  const parent = target.parentElement;
8414
8414
  if (!parent) return;
8415
- const parentPos = getComputedStyle(parent).position;
8416
- if (parentPos === "static") parent.style.position = "relative";
8417
- anchor = parent;
8418
- const imgEl = target;
8419
- badgeTop = `${imgEl.offsetTop + 6}px`;
8420
- badgeLeft = `${imgEl.offsetLeft + 6}px`;
8415
+ let overflowAncestor = null;
8416
+ let el = parent;
8417
+ while (el && el !== document.body) {
8418
+ const cs = getComputedStyle(el);
8419
+ if (cs.overflow === "hidden" && cs.position !== "static") {
8420
+ overflowAncestor = el;
8421
+ break;
8422
+ }
8423
+ el = el.parentElement;
8424
+ }
8425
+ if (overflowAncestor) {
8426
+ anchor = overflowAncestor;
8427
+ } else {
8428
+ const parentPos = getComputedStyle(parent).position;
8429
+ if (parentPos === "static") parent.style.position = "relative";
8430
+ anchor = parent;
8431
+ const imgEl = target;
8432
+ badgeTop = `${imgEl.offsetTop + 6}px`;
8433
+ badgeLeft = `${imgEl.offsetLeft + 6}px`;
8434
+ }
8421
8435
  } else {
8422
8436
  const pos = getComputedStyle(target).position;
8423
8437
  if (pos === "static") target.style.position = "relative";
@@ -8938,4 +8952,4 @@ export {
8938
8952
  init as i,
8939
8953
  t
8940
8954
  };
8941
- //# sourceMappingURL=index-ZJae2VzU.js.map
8955
+ //# sourceMappingURL=index-bqpA9Puf.js.map