accessify-widget 0.3.69 → 0.3.71
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-C_npcTE4.js → index-DLo9u9kS.js} +65 -27
- package/dist/{index-C_npcTE4.js.map → index-DLo9u9kS.js.map} +1 -1
- package/dist/{keyboard-nav-CqFJkQl4.js → keyboard-nav-C9qVZ3e8.js} +2 -2
- package/dist/{keyboard-nav-CqFJkQl4.js.map → keyboard-nav-C9qVZ3e8.js.map} +1 -1
- package/dist/{link-highlight-DBGm067Y.js → link-highlight-D9gxFmiG.js} +3 -3
- package/dist/link-highlight-D9gxFmiG.js.map +1 -0
- package/dist/{page-structure-DLdQX4s0.js → page-structure-DL3Xdzlm.js} +9 -6
- package/dist/page-structure-DL3Xdzlm.js.map +1 -0
- package/dist/{reading-guide-VT8NciIL.js → reading-guide-C_jxzorm.js} +7 -1
- package/dist/reading-guide-C_jxzorm.js.map +1 -0
- package/dist/{reading-mask-BABChuCz.js → reading-mask-B_NxbhTN.js} +21 -7
- package/dist/reading-mask-B_NxbhTN.js.map +1 -0
- package/dist/{text-simplify-oUIixniy.js → text-simplify-BIFpqadq.js} +2 -2
- package/dist/text-simplify-BIFpqadq.js.map +1 -0
- package/dist/widget.js +1 -1
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/link-highlight-DBGm067Y.js.map +0 -1
- package/dist/page-structure-DLdQX4s0.js.map +0 -1
- package/dist/reading-guide-VT8NciIL.js.map +0 -1
- package/dist/reading-mask-BABChuCz.js.map +0 -1
- package/dist/text-simplify-oUIixniy.js.map +0 -1
package/dist/accessify.mjs
CHANGED
|
@@ -6642,16 +6642,16 @@ function FeatureGrid($$anchor, $$props) {
|
|
|
6642
6642
|
const FEATURE_LOADERS = {
|
|
6643
6643
|
contrast: () => import("./contrast-CqsOs6Uo.js"),
|
|
6644
6644
|
"text-size": () => import("./text-size-m_mHNPWo.js"),
|
|
6645
|
-
"keyboard-nav": () => import("./keyboard-nav-
|
|
6646
|
-
"link-highlight": () => import("./link-highlight-
|
|
6647
|
-
"reading-guide": () => import("./reading-guide-
|
|
6648
|
-
"reading-mask": () => import("./reading-mask-
|
|
6645
|
+
"keyboard-nav": () => import("./keyboard-nav-C9qVZ3e8.js"),
|
|
6646
|
+
"link-highlight": () => import("./link-highlight-D9gxFmiG.js"),
|
|
6647
|
+
"reading-guide": () => import("./reading-guide-C_jxzorm.js"),
|
|
6648
|
+
"reading-mask": () => import("./reading-mask-B_NxbhTN.js"),
|
|
6649
6649
|
"animation-stop": () => import("./animation-stop-DrDe9Q9n.js"),
|
|
6650
6650
|
"hide-images": () => import("./hide-images-B_LeCBcd.js"),
|
|
6651
6651
|
"big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
|
|
6652
|
-
"page-structure": () => import("./page-structure-
|
|
6652
|
+
"page-structure": () => import("./page-structure-DL3Xdzlm.js"),
|
|
6653
6653
|
tts: () => import("./tts-CjszLRnb.js"),
|
|
6654
|
-
"text-simplify": () => import("./text-simplify-
|
|
6654
|
+
"text-simplify": () => import("./text-simplify-BIFpqadq.js"),
|
|
6655
6655
|
"alt-text": () => Promise.resolve().then(() => altText)
|
|
6656
6656
|
};
|
|
6657
6657
|
let contrastMode = /* @__PURE__ */ state(proxy(readStoredContrastMode()));
|
|
@@ -7798,7 +7798,7 @@ function createWidgetStyles(config2) {
|
|
|
7798
7798
|
transition: transform var(--fast), box-shadow var(--fast), opacity var(--fast);
|
|
7799
7799
|
touch-action: none;
|
|
7800
7800
|
}
|
|
7801
|
-
.accessify-trigger:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(50,60,100,0.6); }
|
|
7801
|
+
.accessify-trigger:hover, .accessify-trigger:active { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(50,60,100,0.6); }
|
|
7802
7802
|
.accessify-trigger:active { transform: scale(0.96); }
|
|
7803
7803
|
.accessify-trigger--hidden { opacity:0; pointer-events:none; transform:scale(0.9); }
|
|
7804
7804
|
.accessify-trigger svg { width: 26px; height: 26px; }
|
|
@@ -7851,7 +7851,7 @@ function createWidgetStyles(config2) {
|
|
|
7851
7851
|
background: var(--surface); color: var(--text-dim);
|
|
7852
7852
|
cursor: pointer; transition: background var(--fast), color var(--fast);
|
|
7853
7853
|
}
|
|
7854
|
-
.accessify-header-btn:hover { background: var(--surface-hover); color: var(--text); }
|
|
7854
|
+
.accessify-header-btn:hover, .accessify-header-btn:active { background: var(--surface-hover); color: var(--text); }
|
|
7855
7855
|
.accessify-header-btn svg { width: 16px; height: 16px; }
|
|
7856
7856
|
.accessify-header-btn--icon { padding: 0; }
|
|
7857
7857
|
.accessify-header-btn--close { background: transparent; border-color: transparent; }
|
|
@@ -7880,8 +7880,8 @@ function createWidgetStyles(config2) {
|
|
|
7880
7880
|
font-size: 15px; font-weight: 700;
|
|
7881
7881
|
transition: background var(--fast);
|
|
7882
7882
|
}
|
|
7883
|
-
.accessify-lang-toggle:hover,
|
|
7884
|
-
.accessify-accordion-toggle:hover { background: var(--surface-hover); }
|
|
7883
|
+
.accessify-lang-toggle:hover, .accessify-lang-toggle:active,
|
|
7884
|
+
.accessify-accordion-toggle:hover, .accessify-accordion-toggle:active { background: var(--surface-hover); }
|
|
7885
7885
|
|
|
7886
7886
|
.accessify-lang-toggle-left,
|
|
7887
7887
|
.accessify-accordion-toggle-left {
|
|
@@ -7921,7 +7921,7 @@ function createWidgetStyles(config2) {
|
|
|
7921
7921
|
transition: background var(--fast);
|
|
7922
7922
|
min-height: 44px;
|
|
7923
7923
|
}
|
|
7924
|
-
.accessify-lang-option:hover { background: var(--surface-hover); }
|
|
7924
|
+
.accessify-lang-option:hover, .accessify-lang-option:active { background: var(--surface-hover); }
|
|
7925
7925
|
.accessify-lang-option[data-active="true"] { color: var(--accent); font-weight: 700; }
|
|
7926
7926
|
.accessify-lang-option svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
|
|
7927
7927
|
|
|
@@ -7934,7 +7934,7 @@ function createWidgetStyles(config2) {
|
|
|
7934
7934
|
font-family: inherit; text-align: left;
|
|
7935
7935
|
transition: background var(--fast);
|
|
7936
7936
|
}
|
|
7937
|
-
.accessify-accordion-option:hover { background: var(--surface-hover); }
|
|
7937
|
+
.accessify-accordion-option:hover, .accessify-accordion-option:active { background: var(--surface-hover); }
|
|
7938
7938
|
.accessify-accordion-option[data-active="true"] { background: var(--accent-soft); }
|
|
7939
7939
|
|
|
7940
7940
|
.accessify-accordion-option-left {
|
|
@@ -7999,7 +7999,7 @@ function createWidgetStyles(config2) {
|
|
|
7999
7999
|
text-align: center; line-height: 1.25;
|
|
8000
8000
|
transition: background var(--fast), color var(--fast), border-color var(--fast);
|
|
8001
8001
|
}
|
|
8002
|
-
.accessify-chip:hover { border-color: var(--border-hl); background: var(--surface-hover); }
|
|
8002
|
+
.accessify-chip:hover, .accessify-chip:active { border-color: var(--border-hl); background: var(--surface-hover); }
|
|
8003
8003
|
.accessify-chip[data-active="true"] {
|
|
8004
8004
|
background: var(--accent); color: var(--accent-on);
|
|
8005
8005
|
border-color: var(--accent);
|
|
@@ -8031,7 +8031,7 @@ function createWidgetStyles(config2) {
|
|
|
8031
8031
|
color: var(--text); cursor: pointer; font-size: 18px; font-weight: 700;
|
|
8032
8032
|
transition: background var(--fast); font-family: inherit;
|
|
8033
8033
|
}
|
|
8034
|
-
.accessify-stepper-btn:hover:not(:disabled) { background: var(--surface-hover); }
|
|
8034
|
+
.accessify-stepper-btn:hover:not(:disabled), .accessify-stepper-btn:active:not(:disabled) { background: var(--surface-hover); }
|
|
8035
8035
|
.accessify-stepper-btn:disabled { opacity: 0.3; cursor: default; }
|
|
8036
8036
|
.accessify-stepper-value {
|
|
8037
8037
|
min-width: 48px; text-align: center;
|
|
@@ -8057,7 +8057,7 @@ function createWidgetStyles(config2) {
|
|
|
8057
8057
|
cursor: pointer; text-align: center; font-family: inherit;
|
|
8058
8058
|
transition: transform var(--fast), border-color var(--fast), background var(--fast), box-shadow var(--fast);
|
|
8059
8059
|
}
|
|
8060
|
-
.accessify-card:hover { transform: translateY(-2px); border-color: var(--border-hl); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
|
|
8060
|
+
.accessify-card:hover, .accessify-card:active { transform: translateY(-2px); border-color: var(--border-hl); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
|
|
8061
8061
|
.accessify-card[data-active="true"] { border-color: var(--accent); background: var(--accent-soft); }
|
|
8062
8062
|
.accessify-card-icon {
|
|
8063
8063
|
display: inline-flex; align-items: center; justify-content: center;
|
|
@@ -8073,10 +8073,10 @@ function createWidgetStyles(config2) {
|
|
|
8073
8073
|
display: inline-flex; align-items: center; justify-content: center;
|
|
8074
8074
|
width: 22px; height: 22px; border-radius: 999px;
|
|
8075
8075
|
color: var(--text-dim); cursor: help; background: none; border: none;
|
|
8076
|
-
opacity: 0.
|
|
8076
|
+
opacity: 0.5; transition: opacity var(--fast), color var(--fast);
|
|
8077
8077
|
}
|
|
8078
8078
|
.accessify-card-info svg { width: 14px; height: 14px; }
|
|
8079
|
-
.accessify-card-info:hover { opacity: 1; color: var(--accent); }
|
|
8079
|
+
.accessify-card-info:hover, .accessify-card-info:active { opacity: 1; color: var(--accent); }
|
|
8080
8080
|
|
|
8081
8081
|
/* ─── Section Divider ─── */
|
|
8082
8082
|
.accessify-section-divider {
|
|
@@ -8099,7 +8099,7 @@ function createWidgetStyles(config2) {
|
|
|
8099
8099
|
display: flex; align-items: center; gap: 8px;
|
|
8100
8100
|
}
|
|
8101
8101
|
.accessify-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
|
|
8102
|
-
.accessify-footer a:hover { text-decoration: underline; }
|
|
8102
|
+
.accessify-footer a:hover, .accessify-footer a:active, .accessify-footer a:focus-visible { text-decoration: underline; }
|
|
8103
8103
|
|
|
8104
8104
|
.accessify-footer-close {
|
|
8105
8105
|
display: inline-flex; align-items: center; gap: 5px;
|
|
@@ -8110,7 +8110,7 @@ function createWidgetStyles(config2) {
|
|
|
8110
8110
|
transition: background var(--fast), color var(--fast), border-color var(--fast);
|
|
8111
8111
|
flex-shrink: 0;
|
|
8112
8112
|
}
|
|
8113
|
-
.accessify-footer-close:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
|
8113
|
+
.accessify-footer-close:hover, .accessify-footer-close:active, .accessify-footer-close:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
|
8114
8114
|
.accessify-footer-close svg { width: 14px; height: 14px; flex-shrink: 0; }
|
|
8115
8115
|
|
|
8116
8116
|
/* ─── Reduced Motion ─── */
|
|
@@ -8128,6 +8128,11 @@ function createWidgetStyles(config2) {
|
|
|
8128
8128
|
${isRight ? "right: 16px" : "left: 16px"};
|
|
8129
8129
|
width: 50px; height: 50px; border-radius: 14px;
|
|
8130
8130
|
}
|
|
8131
|
+
/* WCAG 2.5.8: touch targets ≥ 44px */
|
|
8132
|
+
.accessify-header-btn { width: 44px; height: 44px; }
|
|
8133
|
+
.accessify-stepper-btn { width: 44px; min-height: 44px; }
|
|
8134
|
+
.accessify-stepper { height: 44px; }
|
|
8135
|
+
.accessify-footer-close { min-height: 44px; padding: 8px 16px; }
|
|
8131
8136
|
}
|
|
8132
8137
|
`;
|
|
8133
8138
|
}
|
|
@@ -8424,8 +8429,10 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
|
|
|
8424
8429
|
const BADGE_ATTR = "data-accessify-badge";
|
|
8425
8430
|
const WRAPPER_ATTR = "data-accessify-badge-wrap";
|
|
8426
8431
|
const OVERLAY_ID = "accessify-badge-overlay";
|
|
8432
|
+
const BADGE_STYLE_ID = "accessify-badge-styles";
|
|
8427
8433
|
let badgePositionRAF = null;
|
|
8428
8434
|
let trackedBadges = [];
|
|
8435
|
+
let outsideClickHandler = null;
|
|
8429
8436
|
function getOrCreateOverlay() {
|
|
8430
8437
|
let overlay = document.getElementById(OVERLAY_ID);
|
|
8431
8438
|
if (!overlay) {
|
|
@@ -8443,6 +8450,18 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
|
|
|
8443
8450
|
});
|
|
8444
8451
|
document.body.appendChild(overlay);
|
|
8445
8452
|
}
|
|
8453
|
+
if (!document.getElementById(BADGE_STYLE_ID)) {
|
|
8454
|
+
const style = document.createElement("style");
|
|
8455
|
+
style.id = BADGE_STYLE_ID;
|
|
8456
|
+
style.textContent = `
|
|
8457
|
+
[${BADGE_ATTR}="badge"]:hover + [${BADGE_ATTR}="tooltip"] { display: block !important; }
|
|
8458
|
+
[${BADGE_ATTR}="badge"]:hover { background: rgba(0,0,0,0.85) !important; }
|
|
8459
|
+
@media (pointer: coarse) {
|
|
8460
|
+
[${BADGE_ATTR}="badge"] { width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 16px !important; }
|
|
8461
|
+
}
|
|
8462
|
+
`;
|
|
8463
|
+
document.head.appendChild(style);
|
|
8464
|
+
}
|
|
8446
8465
|
return overlay;
|
|
8447
8466
|
}
|
|
8448
8467
|
function positionBadge(target, badge, tooltip) {
|
|
@@ -8475,12 +8494,27 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
|
|
|
8475
8494
|
badgePositionRAF = requestAnimationFrame(tick);
|
|
8476
8495
|
};
|
|
8477
8496
|
badgePositionRAF = requestAnimationFrame(tick);
|
|
8497
|
+
if (!outsideClickHandler) {
|
|
8498
|
+
outsideClickHandler = (e) => {
|
|
8499
|
+
const target = e.target;
|
|
8500
|
+
if (target.getAttribute(BADGE_ATTR) === "badge") return;
|
|
8501
|
+
for (const entry of trackedBadges) {
|
|
8502
|
+
entry.tooltip.style.display = "none";
|
|
8503
|
+
entry.badge.style.background = "rgba(0,0,0,0.6)";
|
|
8504
|
+
}
|
|
8505
|
+
};
|
|
8506
|
+
document.addEventListener("click", outsideClickHandler, { passive: true });
|
|
8507
|
+
}
|
|
8478
8508
|
}
|
|
8479
8509
|
function stopBadgeTracking() {
|
|
8480
8510
|
if (badgePositionRAF !== null) {
|
|
8481
8511
|
cancelAnimationFrame(badgePositionRAF);
|
|
8482
8512
|
badgePositionRAF = null;
|
|
8483
8513
|
}
|
|
8514
|
+
if (outsideClickHandler) {
|
|
8515
|
+
document.removeEventListener("click", outsideClickHandler);
|
|
8516
|
+
outsideClickHandler = null;
|
|
8517
|
+
}
|
|
8484
8518
|
}
|
|
8485
8519
|
function addInfoBadge(target, altText2) {
|
|
8486
8520
|
if (target.getAttribute(BADGE_ATTR)) return;
|
|
@@ -8531,13 +8565,16 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
|
|
|
8531
8565
|
tooltip.setAttribute("translate", "no");
|
|
8532
8566
|
tooltip.classList.add("notranslate");
|
|
8533
8567
|
tooltip.setAttribute(BADGE_ATTR, "tooltip");
|
|
8534
|
-
badge.addEventListener("
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8568
|
+
badge.addEventListener("click", () => {
|
|
8569
|
+
const isOpen = tooltip.style.display === "block";
|
|
8570
|
+
for (const entry of trackedBadges) {
|
|
8571
|
+
entry.tooltip.style.display = "none";
|
|
8572
|
+
entry.badge.style.background = "rgba(0,0,0,0.6)";
|
|
8573
|
+
}
|
|
8574
|
+
if (!isOpen) {
|
|
8575
|
+
badge.style.background = "rgba(0,0,0,0.85)";
|
|
8576
|
+
tooltip.style.display = "block";
|
|
8577
|
+
}
|
|
8541
8578
|
});
|
|
8542
8579
|
overlay.appendChild(badge);
|
|
8543
8580
|
overlay.appendChild(tooltip);
|
|
@@ -8548,6 +8585,7 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
|
|
|
8548
8585
|
stopBadgeTracking();
|
|
8549
8586
|
trackedBadges = [];
|
|
8550
8587
|
document.getElementById(OVERLAY_ID)?.remove();
|
|
8588
|
+
document.getElementById(BADGE_STYLE_ID)?.remove();
|
|
8551
8589
|
document.querySelectorAll(`[${BADGE_ATTR}]`).forEach((el) => el.removeAttribute(BADGE_ATTR));
|
|
8552
8590
|
document.querySelectorAll(`[${WRAPPER_ATTR}]`).forEach((wrapper) => {
|
|
8553
8591
|
const img = wrapper.querySelector("img");
|
|
@@ -9061,4 +9099,4 @@ export {
|
|
|
9061
9099
|
init as i,
|
|
9062
9100
|
t
|
|
9063
9101
|
};
|
|
9064
|
-
//# sourceMappingURL=index-
|
|
9102
|
+
//# sourceMappingURL=index-DLo9u9kS.js.map
|