accessify-widget 0.3.28 → 0.3.29

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-BneOnCbA.js";
1
+ import { d, i } from "./index-D6GcBTuB.js";
2
2
  export {
3
3
  d as destroy,
4
4
  i as init
@@ -6641,16 +6641,16 @@ function FeatureGrid($$anchor, $$props) {
6641
6641
  const FEATURE_LOADERS = {
6642
6642
  contrast: () => import("./contrast-CqsICAkU.js"),
6643
6643
  "text-size": () => import("./text-size-m_mHNPWo.js"),
6644
- "keyboard-nav": () => import("./keyboard-nav-cdi24lWr.js"),
6644
+ "keyboard-nav": () => import("./keyboard-nav-BIZE2lZd.js"),
6645
6645
  "link-highlight": () => import("./link-highlight-DBGm067Y.js"),
6646
6646
  "reading-guide": () => import("./reading-guide-VT8NciIL.js"),
6647
6647
  "reading-mask": () => import("./reading-mask-BABChuCz.js"),
6648
6648
  "animation-stop": () => import("./animation-stop-C0MwseK0.js"),
6649
6649
  "hide-images": () => import("./hide-images-B_LeCBcd.js"),
6650
6650
  "big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
6651
- "page-structure": () => import("./page-structure-z8l0ufdb.js"),
6651
+ "page-structure": () => import("./page-structure-C_APqo1V.js"),
6652
6652
  tts: () => import("./tts-CjszLRnb.js"),
6653
- "text-simplify": () => import("./text-simplify-DP0GiRFK.js"),
6653
+ "text-simplify": () => import("./text-simplify-aOTfXmCO.js"),
6654
6654
  "alt-text": () => Promise.resolve().then(() => altText)
6655
6655
  };
6656
6656
  let contrastMode = /* @__PURE__ */ state(proxy(readStoredContrastMode()));
@@ -8258,6 +8258,8 @@ async function autoApplyCachedAltTexts(widgetConfig) {
8258
8258
  const serverCache = await fetchServerAltTexts(siteKey, proxyUrl, pageLang);
8259
8259
  for (const [url, alt] of serverCache) {
8260
8260
  cache.set(url, alt);
8261
+ const norm = normalizeImageUrl(url);
8262
+ if (norm !== url) cache.set(norm, alt);
8261
8263
  setCachedAltText(url, alt, pageLang).catch(() => {
8262
8264
  });
8263
8265
  }
@@ -8270,7 +8272,9 @@ async function autoApplyCachedAltTexts(widgetConfig) {
8270
8272
  function applyToImg(img) {
8271
8273
  if (img.closest("#accessify-root") || img.closest("accessify-widget")) return false;
8272
8274
  const src = getImageSrc(img);
8273
- const cached = cache.get(src) || cache.get(normalizeImageUrl(src)) || cache.get(img.src);
8275
+ const norm = normalizeImageUrl(src);
8276
+ const imgSrcNorm = normalizeImageUrl(img.src);
8277
+ const cached = cache.get(src) || cache.get(norm) || cache.get(img.src) || cache.get(imgSrcNorm);
8274
8278
  if (!cached) return false;
8275
8279
  const alt = img.getAttribute("alt");
8276
8280
  if (alt === null || alt.trim() === "") {
@@ -8939,4 +8943,4 @@ export {
8939
8943
  init as i,
8940
8944
  t
8941
8945
  };
8942
- //# sourceMappingURL=index-BneOnCbA.js.map
8946
+ //# sourceMappingURL=index-D6GcBTuB.js.map