accessify-widget 0.3.27 → 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.
- package/dist/accessify.min.js +1 -1
- package/dist/accessify.min.js.map +1 -1
- package/dist/accessify.mjs +1 -1
- package/dist/{index-YTcc-BmV.js → index-D6GcBTuB.js} +9 -5
- package/dist/{index-YTcc-BmV.js.map → index-D6GcBTuB.js.map} +1 -1
- package/dist/{keyboard-nav-DeZ9sBGT.js → keyboard-nav-BIZE2lZd.js} +2 -2
- package/dist/{keyboard-nav-DeZ9sBGT.js.map → keyboard-nav-BIZE2lZd.js.map} +1 -1
- package/dist/loader.min.js +1 -1
- package/dist/{page-structure-I80rIKIx.js → page-structure-C_APqo1V.js} +2 -2
- package/dist/{page-structure-I80rIKIx.js.map → page-structure-C_APqo1V.js.map} +1 -1
- package/dist/{text-simplify-BH_5q_V4.js → text-simplify-aOTfXmCO.js} +31 -19
- package/dist/text-simplify-aOTfXmCO.js.map +1 -0
- package/dist/widget.js +1 -1
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/text-simplify-BH_5q_V4.js.map +0 -1
package/dist/accessify.mjs
CHANGED
|
@@ -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-
|
|
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-
|
|
6651
|
+
"page-structure": () => import("./page-structure-C_APqo1V.js"),
|
|
6652
6652
|
tts: () => import("./tts-CjszLRnb.js"),
|
|
6653
|
-
"text-simplify": () => import("./text-simplify-
|
|
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
|
|
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-
|
|
8946
|
+
//# sourceMappingURL=index-D6GcBTuB.js.map
|