@accesslint/core 0.3.10 → 0.3.11
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/index.cjs +5 -5
- package/dist/index.iife.js +5 -5
- package/dist/index.js +166 -139
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/keyboard/interactive-rules.d.ts.map +1 -1
- package/dist/rules/structure/list-rules.d.ts +1 -0
- package/dist/rules/structure/list-rules.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -408,7 +408,7 @@ function m(t) {
|
|
|
408
408
|
const n = e.map((o, s) => (s === 0 ? "" : o.delimiter) + o.selector).join("");
|
|
409
409
|
return _.set(t, n), n;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function Ti(t) {
|
|
412
412
|
const a = [], e = [];
|
|
413
413
|
let i = t;
|
|
414
414
|
for (; i; ) {
|
|
@@ -1161,7 +1161,7 @@ const et = {
|
|
|
1161
1161
|
return a;
|
|
1162
1162
|
}
|
|
1163
1163
|
};
|
|
1164
|
-
function
|
|
1164
|
+
function Ei(t) {
|
|
1165
1165
|
if (typeof t != "object" || t === null)
|
|
1166
1166
|
return "Rule spec must be an object";
|
|
1167
1167
|
const a = t;
|
|
@@ -1928,7 +1928,8 @@ const $t = {
|
|
|
1928
1928
|
const o = w(i), s = o.overflowX, l = o.overflowY;
|
|
1929
1929
|
if (!(s === "scroll" || s === "auto" || l === "scroll" || l === "auto")) continue;
|
|
1930
1930
|
if (i.scrollHeight > 0 || i.clientHeight > 0) {
|
|
1931
|
-
|
|
1931
|
+
const b = i.scrollHeight - i.clientHeight, f = i.scrollWidth - i.clientWidth;
|
|
1932
|
+
if (b <= 0 && f <= 0 || b < 36 && f < 36 || i.clientWidth < 64 && i.clientHeight < 64) continue;
|
|
1932
1933
|
} else {
|
|
1933
1934
|
const b = o.height !== "" || o.maxHeight !== "", f = ((e = i.textContent) == null ? void 0 : e.trim().length) ?? 0;
|
|
1934
1935
|
if (!b || f <= 50) continue;
|
|
@@ -2272,6 +2273,31 @@ const $t = {
|
|
|
2272
2273
|
guidance: "Definition lists have strict content requirements. Only <dt> (terms), <dd> (definitions), and <div> (for grouping dt/dd pairs) are valid children. Other elements break the list structure for screen readers. Move invalid elements outside the <dl>, or restructure using proper definition list markup.",
|
|
2273
2274
|
prompt: "Explain whether to move this element outside the <dl> or convert it to dt/dd."
|
|
2274
2275
|
}, Jt = k(Kt), Qt = {
|
|
2276
|
+
id: "listitem",
|
|
2277
|
+
wcag: ["1.3.1"],
|
|
2278
|
+
level: "A",
|
|
2279
|
+
description: "<li> elements must be contained in a <ul>, <ol>, or <menu>.",
|
|
2280
|
+
guidance: "List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Outside of these containers, assistive technologies cannot convey the list relationship. Wrap <li> elements in the appropriate list container.",
|
|
2281
|
+
prompt: "Explain that this <li> must be placed inside a <ul>, <ol>, or <menu> element.",
|
|
2282
|
+
run(t) {
|
|
2283
|
+
var e;
|
|
2284
|
+
const a = [];
|
|
2285
|
+
for (const i of t.querySelectorAll("li")) {
|
|
2286
|
+
if (g(i)) continue;
|
|
2287
|
+
const n = i.parentElement;
|
|
2288
|
+
if (!n) continue;
|
|
2289
|
+
const r = n.tagName.toLowerCase();
|
|
2290
|
+
r === "ul" || r === "ol" || r === "menu" || ((e = n.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase()) === "list" || a.push({
|
|
2291
|
+
ruleId: "listitem",
|
|
2292
|
+
selector: m(i),
|
|
2293
|
+
html: d(i),
|
|
2294
|
+
impact: "serious",
|
|
2295
|
+
message: "<li> is not contained in a <ul>, <ol>, or <menu>."
|
|
2296
|
+
});
|
|
2297
|
+
}
|
|
2298
|
+
return a;
|
|
2299
|
+
}
|
|
2300
|
+
}, Zt = {
|
|
2275
2301
|
id: "document-title",
|
|
2276
2302
|
wcag: ["2.4.2"],
|
|
2277
2303
|
level: "A",
|
|
@@ -2301,7 +2327,7 @@ const $t = {
|
|
|
2301
2327
|
}
|
|
2302
2328
|
return [];
|
|
2303
2329
|
}
|
|
2304
|
-
},
|
|
2330
|
+
}, ea = {
|
|
2305
2331
|
id: "bypass",
|
|
2306
2332
|
wcag: [],
|
|
2307
2333
|
level: "A",
|
|
@@ -2332,7 +2358,7 @@ const $t = {
|
|
|
2332
2358
|
context: `Missing: ${n.join(", ")}`
|
|
2333
2359
|
}];
|
|
2334
2360
|
}
|
|
2335
|
-
},
|
|
2361
|
+
}, ta = {
|
|
2336
2362
|
id: "page-has-heading-one",
|
|
2337
2363
|
wcag: [],
|
|
2338
2364
|
level: "A",
|
|
@@ -2370,7 +2396,7 @@ function he(t) {
|
|
|
2370
2396
|
const a = t.getAttribute("width"), e = t.getAttribute("height");
|
|
2371
2397
|
return (a === "0" || a === "1") && (e === "0" || e === "1");
|
|
2372
2398
|
}
|
|
2373
|
-
const
|
|
2399
|
+
const aa = {
|
|
2374
2400
|
id: "frame-title",
|
|
2375
2401
|
wcag: ["4.1.2"],
|
|
2376
2402
|
level: "A",
|
|
@@ -2395,7 +2421,7 @@ const ta = {
|
|
|
2395
2421
|
}
|
|
2396
2422
|
return a;
|
|
2397
2423
|
}
|
|
2398
|
-
},
|
|
2424
|
+
}, ia = {
|
|
2399
2425
|
id: "frame-title-unique",
|
|
2400
2426
|
wcag: ["4.1.2"],
|
|
2401
2427
|
level: "A",
|
|
@@ -2426,7 +2452,7 @@ const ta = {
|
|
|
2426
2452
|
});
|
|
2427
2453
|
return a;
|
|
2428
2454
|
}
|
|
2429
|
-
},
|
|
2455
|
+
}, na = {
|
|
2430
2456
|
id: "empty-heading",
|
|
2431
2457
|
wcag: [],
|
|
2432
2458
|
level: "A",
|
|
@@ -2456,7 +2482,7 @@ const ta = {
|
|
|
2456
2482
|
}
|
|
2457
2483
|
return a;
|
|
2458
2484
|
}
|
|
2459
|
-
},
|
|
2485
|
+
}, ra = {
|
|
2460
2486
|
id: "meta-viewport",
|
|
2461
2487
|
wcag: ["1.4.4"],
|
|
2462
2488
|
level: "AA",
|
|
@@ -2489,7 +2515,7 @@ const ta = {
|
|
|
2489
2515
|
}
|
|
2490
2516
|
return a;
|
|
2491
2517
|
}
|
|
2492
|
-
},
|
|
2518
|
+
}, oa = {
|
|
2493
2519
|
id: "meta-refresh",
|
|
2494
2520
|
wcag: ["2.2.1", "2.2.4", "3.2.5"],
|
|
2495
2521
|
level: "A",
|
|
@@ -2520,7 +2546,7 @@ const ta = {
|
|
|
2520
2546
|
}
|
|
2521
2547
|
return [];
|
|
2522
2548
|
}
|
|
2523
|
-
},
|
|
2549
|
+
}, sa = {
|
|
2524
2550
|
id: "blink",
|
|
2525
2551
|
selector: "blink",
|
|
2526
2552
|
check: { type: "selector-exists" },
|
|
@@ -2531,7 +2557,7 @@ const ta = {
|
|
|
2531
2557
|
level: "A",
|
|
2532
2558
|
guidance: "Blinking content can cause seizures in users with photosensitive epilepsy and is distracting for users with attention disorders. The <blink> element is deprecated and should never be used. If you need to draw attention to content, use less intrusive methods like color, borders, or icons.",
|
|
2533
2559
|
prompt: "Suggest static alternatives to the blinking effect."
|
|
2534
|
-
},
|
|
2560
|
+
}, la = k(sa), ca = {
|
|
2535
2561
|
id: "marquee",
|
|
2536
2562
|
selector: "marquee",
|
|
2537
2563
|
check: { type: "selector-exists" },
|
|
@@ -2542,7 +2568,7 @@ const ta = {
|
|
|
2542
2568
|
level: "A",
|
|
2543
2569
|
guidance: "Scrolling or moving content is difficult for many users to read, especially those with cognitive or visual disabilities. The <marquee> element is deprecated. Replace scrolling text with static content. If content must scroll, provide pause/stop controls and ensure it stops after 5 seconds.",
|
|
2544
2570
|
prompt: "Suggest static alternatives or accessible carousel patterns."
|
|
2545
|
-
},
|
|
2571
|
+
}, ua = k(ca), da = {
|
|
2546
2572
|
id: "p-as-heading",
|
|
2547
2573
|
wcag: [],
|
|
2548
2574
|
level: "A",
|
|
@@ -2569,7 +2595,7 @@ const ta = {
|
|
|
2569
2595
|
}
|
|
2570
2596
|
return a;
|
|
2571
2597
|
}
|
|
2572
|
-
},
|
|
2598
|
+
}, ma = {
|
|
2573
2599
|
id: "aria-roles",
|
|
2574
2600
|
wcag: ["4.1.2"],
|
|
2575
2601
|
level: "A",
|
|
@@ -2590,7 +2616,7 @@ const ta = {
|
|
|
2590
2616
|
}
|
|
2591
2617
|
return a;
|
|
2592
2618
|
}
|
|
2593
|
-
},
|
|
2619
|
+
}, ha = {
|
|
2594
2620
|
id: "aria-valid-attr",
|
|
2595
2621
|
wcag: ["4.1.2"],
|
|
2596
2622
|
level: "A",
|
|
@@ -2600,7 +2626,7 @@ const ta = {
|
|
|
2600
2626
|
run(t) {
|
|
2601
2627
|
return U(t).validAttr;
|
|
2602
2628
|
}
|
|
2603
|
-
},
|
|
2629
|
+
}, pa = {
|
|
2604
2630
|
id: "aria-valid-attr-value",
|
|
2605
2631
|
wcag: ["4.1.2"],
|
|
2606
2632
|
level: "A",
|
|
@@ -2610,7 +2636,7 @@ const ta = {
|
|
|
2610
2636
|
run(t) {
|
|
2611
2637
|
return U(t).validAttrValue;
|
|
2612
2638
|
}
|
|
2613
|
-
},
|
|
2639
|
+
}, ga = {
|
|
2614
2640
|
checkbox: ["aria-checked"],
|
|
2615
2641
|
combobox: ["aria-expanded"],
|
|
2616
2642
|
heading: ["aria-level"],
|
|
@@ -2624,7 +2650,7 @@ const ta = {
|
|
|
2624
2650
|
slider: ["aria-valuenow"],
|
|
2625
2651
|
spinbutton: ["aria-valuenow"],
|
|
2626
2652
|
switch: ["aria-checked"]
|
|
2627
|
-
},
|
|
2653
|
+
}, ba = {
|
|
2628
2654
|
id: "aria-required-attr",
|
|
2629
2655
|
wcag: ["4.1.2"],
|
|
2630
2656
|
level: "A",
|
|
@@ -2635,7 +2661,7 @@ const ta = {
|
|
|
2635
2661
|
const a = [];
|
|
2636
2662
|
for (const e of t.querySelectorAll("[role]")) {
|
|
2637
2663
|
if (g(e) || e instanceof HTMLElement && e.style.display === "none") continue;
|
|
2638
|
-
const i = e.getAttribute("role").trim().toLowerCase(), n =
|
|
2664
|
+
const i = e.getAttribute("role").trim().toLowerCase(), n = ga[i];
|
|
2639
2665
|
if (n && !(i === "checkbox" && e instanceof HTMLInputElement && e.type === "checkbox") && !(i === "radio" && e instanceof HTMLInputElement && e.type === "radio") && !(i === "option" && e instanceof HTMLOptionElement) && !(i === "heading" && /^h[1-6]$/i.test(e.tagName))) {
|
|
2640
2666
|
if (i === "separator") {
|
|
2641
2667
|
const r = e.getAttribute("tabindex");
|
|
@@ -2659,7 +2685,7 @@ const ta = {
|
|
|
2659
2685
|
return a;
|
|
2660
2686
|
}
|
|
2661
2687
|
};
|
|
2662
|
-
function
|
|
2688
|
+
function fa(t) {
|
|
2663
2689
|
var r, o, s;
|
|
2664
2690
|
const a = [], e = t.className;
|
|
2665
2691
|
e && typeof e == "string" && e.trim() && a.push(`Classes: ${e.trim().slice(0, 100)}`);
|
|
@@ -2676,7 +2702,7 @@ function ba(t) {
|
|
|
2676
2702
|
return a.length > 0 ? a.join(`
|
|
2677
2703
|
`) : void 0;
|
|
2678
2704
|
}
|
|
2679
|
-
const
|
|
2705
|
+
const va = {
|
|
2680
2706
|
id: "button-name",
|
|
2681
2707
|
wcag: ["4.1.2"],
|
|
2682
2708
|
level: "A",
|
|
@@ -2695,12 +2721,12 @@ const fa = {
|
|
|
2695
2721
|
html: d(e),
|
|
2696
2722
|
impact: "critical",
|
|
2697
2723
|
message: "Button has no discernible text.",
|
|
2698
|
-
context:
|
|
2724
|
+
context: fa(e)
|
|
2699
2725
|
});
|
|
2700
2726
|
}
|
|
2701
2727
|
return a;
|
|
2702
2728
|
}
|
|
2703
|
-
},
|
|
2729
|
+
}, ya = {
|
|
2704
2730
|
alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
|
|
2705
2731
|
alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
|
|
2706
2732
|
application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
|
|
@@ -2772,7 +2798,7 @@ const fa = {
|
|
|
2772
2798
|
tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
|
|
2773
2799
|
treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
|
|
2774
2800
|
treeitem: /* @__PURE__ */ new Set(["aria-checked", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"])
|
|
2775
|
-
},
|
|
2801
|
+
}, wa = /* @__PURE__ */ new Set([
|
|
2776
2802
|
"aria-atomic",
|
|
2777
2803
|
"aria-busy",
|
|
2778
2804
|
"aria-controls",
|
|
@@ -2796,7 +2822,7 @@ const fa = {
|
|
|
2796
2822
|
"aria-roledescription",
|
|
2797
2823
|
"aria-braillelabel",
|
|
2798
2824
|
"aria-brailleroledescription"
|
|
2799
|
-
]),
|
|
2825
|
+
]), Aa = {
|
|
2800
2826
|
id: "aria-allowed-attr",
|
|
2801
2827
|
wcag: ["4.1.2"],
|
|
2802
2828
|
level: "A",
|
|
@@ -2809,10 +2835,10 @@ const fa = {
|
|
|
2809
2835
|
if (g(e)) continue;
|
|
2810
2836
|
const i = q(e);
|
|
2811
2837
|
if (!i) continue;
|
|
2812
|
-
const n =
|
|
2838
|
+
const n = ya[i];
|
|
2813
2839
|
if (n)
|
|
2814
2840
|
for (const r of e.attributes) {
|
|
2815
|
-
if (!r.name.startsWith("aria-") ||
|
|
2841
|
+
if (!r.name.startsWith("aria-") || wa.has(r.name) || n.has(r.name)) continue;
|
|
2816
2842
|
const o = n.size > 0 ? [...n].join(", ") : "none (only global ARIA attributes)";
|
|
2817
2843
|
a.push({
|
|
2818
2844
|
ruleId: "aria-allowed-attr",
|
|
@@ -2826,7 +2852,7 @@ const fa = {
|
|
|
2826
2852
|
}
|
|
2827
2853
|
return a;
|
|
2828
2854
|
}
|
|
2829
|
-
},
|
|
2855
|
+
}, xa = /* @__PURE__ */ new Set([
|
|
2830
2856
|
"base",
|
|
2831
2857
|
"col",
|
|
2832
2858
|
"colgroup",
|
|
@@ -2948,10 +2974,10 @@ const fa = {
|
|
|
2948
2974
|
video: /* @__PURE__ */ new Set(["application"]),
|
|
2949
2975
|
wbr: /* @__PURE__ */ new Set(["none", "presentation"])
|
|
2950
2976
|
};
|
|
2951
|
-
function
|
|
2977
|
+
function Sa(t) {
|
|
2952
2978
|
var e;
|
|
2953
2979
|
const a = t.tagName.toLowerCase();
|
|
2954
|
-
if (
|
|
2980
|
+
if (xa.has(a))
|
|
2955
2981
|
return "none";
|
|
2956
2982
|
if (a === "a" && t.hasAttribute("href"))
|
|
2957
2983
|
return E["a[href]"];
|
|
@@ -2963,7 +2989,7 @@ function xa(t) {
|
|
|
2963
2989
|
}
|
|
2964
2990
|
return E[a] || "any";
|
|
2965
2991
|
}
|
|
2966
|
-
const
|
|
2992
|
+
const ka = {
|
|
2967
2993
|
id: "aria-allowed-role",
|
|
2968
2994
|
wcag: ["4.1.2"],
|
|
2969
2995
|
level: "A",
|
|
@@ -2979,7 +3005,7 @@ const Sa = {
|
|
|
2979
3005
|
if (!n) continue;
|
|
2980
3006
|
const r = de(i);
|
|
2981
3007
|
if (r && n === r) continue;
|
|
2982
|
-
const o =
|
|
3008
|
+
const o = Sa(i);
|
|
2983
3009
|
o === "none" ? a.push({
|
|
2984
3010
|
ruleId: "aria-allowed-role",
|
|
2985
3011
|
selector: m(i),
|
|
@@ -3027,7 +3053,7 @@ const Sa = {
|
|
|
3027
3053
|
tab: ["tablist"],
|
|
3028
3054
|
treeitem: ["tree", "group"]
|
|
3029
3055
|
};
|
|
3030
|
-
function
|
|
3056
|
+
function Ia(t, a) {
|
|
3031
3057
|
var r;
|
|
3032
3058
|
const e = ((r = t.getAttribute("aria-owns")) == null ? void 0 : r.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
|
|
3033
3059
|
for (const o of t.querySelectorAll("*")) {
|
|
@@ -3045,9 +3071,9 @@ function ka(t, a) {
|
|
|
3045
3071
|
if (!o.some((l) => n.has(l))) return !1;
|
|
3046
3072
|
return !0;
|
|
3047
3073
|
}
|
|
3048
|
-
const
|
|
3074
|
+
const Ta = {
|
|
3049
3075
|
id: "aria-required-children",
|
|
3050
|
-
wcag: ["
|
|
3076
|
+
wcag: ["1.3.1"],
|
|
3051
3077
|
level: "A",
|
|
3052
3078
|
description: "Certain ARIA roles require specific child roles to be present.",
|
|
3053
3079
|
guidance: "Some ARIA roles represent containers that must contain specific child roles for proper semantics. For example, a list must contain listitems, a menu must contain menuitems. Add the required child elements with appropriate roles, or use native HTML elements that provide these semantics implicitly (e.g., <ul> with <li>).",
|
|
@@ -3060,7 +3086,7 @@ const Ia = {
|
|
|
3060
3086
|
const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
|
|
3061
3087
|
if (!n || !(n in ie)) continue;
|
|
3062
3088
|
const r = ie[n];
|
|
3063
|
-
if (!
|
|
3089
|
+
if (!Ia(i, r)) {
|
|
3064
3090
|
const o = r.map((s) => s.join(" or ")).join(", ");
|
|
3065
3091
|
a.push({
|
|
3066
3092
|
ruleId: "aria-required-children",
|
|
@@ -3073,9 +3099,9 @@ const Ia = {
|
|
|
3073
3099
|
}
|
|
3074
3100
|
return a;
|
|
3075
3101
|
}
|
|
3076
|
-
},
|
|
3102
|
+
}, Ea = {
|
|
3077
3103
|
id: "aria-required-parent",
|
|
3078
|
-
wcag: ["
|
|
3104
|
+
wcag: ["1.3.1"],
|
|
3079
3105
|
level: "A",
|
|
3080
3106
|
description: "Certain ARIA roles must be contained within specific parent roles.",
|
|
3081
3107
|
guidance: "Some ARIA roles represent items that must exist within specific container roles. For example, a listitem must be within a list, a tab must be within a tablist. Wrap the element in the appropriate parent, or use native HTML elements that provide this structure (e.g., <li> inside <ul>).",
|
|
@@ -3123,7 +3149,7 @@ const Ia = {
|
|
|
3123
3149
|
"embed",
|
|
3124
3150
|
"area[href]"
|
|
3125
3151
|
].join(", ");
|
|
3126
|
-
function
|
|
3152
|
+
function Ca(t) {
|
|
3127
3153
|
let a = t;
|
|
3128
3154
|
const e = t.ownerDocument, i = e.defaultView;
|
|
3129
3155
|
for (; a && a !== e.body; ) {
|
|
@@ -3136,7 +3162,7 @@ function Ea(t) {
|
|
|
3136
3162
|
}
|
|
3137
3163
|
return !0;
|
|
3138
3164
|
}
|
|
3139
|
-
const
|
|
3165
|
+
const La = {
|
|
3140
3166
|
id: "aria-hidden-body",
|
|
3141
3167
|
selector: 'body[aria-hidden="true"]',
|
|
3142
3168
|
check: { type: "selector-exists" },
|
|
@@ -3148,7 +3174,7 @@ const Ca = {
|
|
|
3148
3174
|
guidance: "Setting aria-hidden='true' on the body element hides all page content from assistive technologies, making the page completely inaccessible to screen reader users. Remove aria-hidden from the body element. If you need to hide content temporarily (e.g., behind a modal), use aria-hidden on specific sections instead.",
|
|
3149
3175
|
prompt: "Instruct to remove aria-hidden='true' from the body element.",
|
|
3150
3176
|
skipAriaHidden: !1
|
|
3151
|
-
},
|
|
3177
|
+
}, qa = k(La), Ra = {
|
|
3152
3178
|
id: "aria-hidden-focus",
|
|
3153
3179
|
wcag: ["4.1.2"],
|
|
3154
3180
|
level: "A",
|
|
@@ -3164,7 +3190,7 @@ const Ca = {
|
|
|
3164
3190
|
for (const n of i)
|
|
3165
3191
|
if (n instanceof HTMLElement) {
|
|
3166
3192
|
const r = n.getAttribute("tabindex");
|
|
3167
|
-
if (r === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !
|
|
3193
|
+
if (r === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Ca(n)) continue;
|
|
3168
3194
|
const o = n.tagName.toLowerCase();
|
|
3169
3195
|
let s;
|
|
3170
3196
|
r !== null ? s = `has tabindex="${r}"` : o === "a" && n.hasAttribute("href") ? s = "is a link with href" : o === "button" ? s = "is a <button>" : o === "input" ? s = `is an <input type="${n.type}">` : o === "select" ? s = "is a <select>" : o === "textarea" ? s = "is a <textarea>" : o === "iframe" ? s = "is an <iframe>" : s = `is a natively focusable <${o}>`;
|
|
@@ -3181,7 +3207,7 @@ const Ca = {
|
|
|
3181
3207
|
}
|
|
3182
3208
|
return a;
|
|
3183
3209
|
}
|
|
3184
|
-
},
|
|
3210
|
+
}, Na = {
|
|
3185
3211
|
id: "aria-command-name",
|
|
3186
3212
|
wcag: ["4.1.2"],
|
|
3187
3213
|
level: "A",
|
|
@@ -3207,7 +3233,7 @@ const Ca = {
|
|
|
3207
3233
|
}
|
|
3208
3234
|
return a;
|
|
3209
3235
|
}
|
|
3210
|
-
},
|
|
3236
|
+
}, $a = {
|
|
3211
3237
|
id: "aria-input-field-name",
|
|
3212
3238
|
wcag: ["4.1.2"],
|
|
3213
3239
|
level: "A",
|
|
@@ -3228,7 +3254,7 @@ const Ca = {
|
|
|
3228
3254
|
}
|
|
3229
3255
|
return a;
|
|
3230
3256
|
}
|
|
3231
|
-
},
|
|
3257
|
+
}, Ma = {
|
|
3232
3258
|
id: "aria-toggle-field-name",
|
|
3233
3259
|
wcag: ["4.1.2"],
|
|
3234
3260
|
level: "A",
|
|
@@ -3249,7 +3275,7 @@ const Ca = {
|
|
|
3249
3275
|
}
|
|
3250
3276
|
return a;
|
|
3251
3277
|
}
|
|
3252
|
-
},
|
|
3278
|
+
}, Ha = {
|
|
3253
3279
|
id: "aria-meter-name",
|
|
3254
3280
|
wcag: ["4.1.2"],
|
|
3255
3281
|
level: "A",
|
|
@@ -3270,7 +3296,7 @@ const Ca = {
|
|
|
3270
3296
|
}
|
|
3271
3297
|
return a;
|
|
3272
3298
|
}
|
|
3273
|
-
},
|
|
3299
|
+
}, Da = {
|
|
3274
3300
|
id: "aria-progressbar-name",
|
|
3275
3301
|
wcag: ["4.1.2"],
|
|
3276
3302
|
level: "A",
|
|
@@ -3291,7 +3317,7 @@ const Ca = {
|
|
|
3291
3317
|
}
|
|
3292
3318
|
return a;
|
|
3293
3319
|
}
|
|
3294
|
-
},
|
|
3320
|
+
}, Oa = {
|
|
3295
3321
|
id: "aria-dialog-name",
|
|
3296
3322
|
wcag: ["4.1.2"],
|
|
3297
3323
|
level: "A",
|
|
@@ -3312,7 +3338,7 @@ const Ca = {
|
|
|
3312
3338
|
}
|
|
3313
3339
|
return a;
|
|
3314
3340
|
}
|
|
3315
|
-
},
|
|
3341
|
+
}, Ba = {
|
|
3316
3342
|
id: "aria-tooltip-name",
|
|
3317
3343
|
wcag: ["4.1.2"],
|
|
3318
3344
|
level: "A",
|
|
@@ -3333,7 +3359,7 @@ const Ca = {
|
|
|
3333
3359
|
}
|
|
3334
3360
|
return a;
|
|
3335
3361
|
}
|
|
3336
|
-
},
|
|
3362
|
+
}, Fa = {
|
|
3337
3363
|
id: "aria-treeitem-name",
|
|
3338
3364
|
wcag: ["4.1.2"],
|
|
3339
3365
|
level: "A",
|
|
@@ -3354,7 +3380,7 @@ const Ca = {
|
|
|
3354
3380
|
}
|
|
3355
3381
|
return a;
|
|
3356
3382
|
}
|
|
3357
|
-
},
|
|
3383
|
+
}, Wa = {
|
|
3358
3384
|
id: "aria-prohibited-attr",
|
|
3359
3385
|
wcag: ["4.1.2"],
|
|
3360
3386
|
level: "A",
|
|
@@ -3364,14 +3390,14 @@ const Ca = {
|
|
|
3364
3390
|
run(t) {
|
|
3365
3391
|
return U(t).prohibitedAttr;
|
|
3366
3392
|
}
|
|
3367
|
-
},
|
|
3393
|
+
}, _a = [
|
|
3368
3394
|
"a[href]",
|
|
3369
3395
|
"button:not([disabled])",
|
|
3370
3396
|
'input:not([disabled]):not([type="hidden"])',
|
|
3371
3397
|
"select:not([disabled])",
|
|
3372
3398
|
"textarea:not([disabled])",
|
|
3373
3399
|
'[tabindex]:not([tabindex="-1"])'
|
|
3374
|
-
].join(", "),
|
|
3400
|
+
].join(", "), Pa = [
|
|
3375
3401
|
"aria-atomic",
|
|
3376
3402
|
"aria-busy",
|
|
3377
3403
|
"aria-controls",
|
|
@@ -3388,15 +3414,15 @@ const Ca = {
|
|
|
3388
3414
|
];
|
|
3389
3415
|
function oe(t) {
|
|
3390
3416
|
const a = [];
|
|
3391
|
-
t.matches(
|
|
3392
|
-
for (const e of
|
|
3417
|
+
t.matches(_a) && a.push("element is focusable");
|
|
3418
|
+
for (const e of Pa)
|
|
3393
3419
|
if (t.hasAttribute(e)) {
|
|
3394
3420
|
a.push(`has ${e}`);
|
|
3395
3421
|
break;
|
|
3396
3422
|
}
|
|
3397
3423
|
return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
|
|
3398
3424
|
}
|
|
3399
|
-
const
|
|
3425
|
+
const ja = {
|
|
3400
3426
|
id: "presentation-role-conflict",
|
|
3401
3427
|
wcag: ["4.1.2"],
|
|
3402
3428
|
level: "A",
|
|
@@ -3429,7 +3455,7 @@ const Pa = {
|
|
|
3429
3455
|
}
|
|
3430
3456
|
return a;
|
|
3431
3457
|
}
|
|
3432
|
-
},
|
|
3458
|
+
}, Va = {
|
|
3433
3459
|
id: "summary-name",
|
|
3434
3460
|
wcag: ["4.1.2"],
|
|
3435
3461
|
level: "A",
|
|
@@ -3451,7 +3477,7 @@ const Pa = {
|
|
|
3451
3477
|
return a;
|
|
3452
3478
|
}
|
|
3453
3479
|
};
|
|
3454
|
-
function
|
|
3480
|
+
function za(t) {
|
|
3455
3481
|
var n, r;
|
|
3456
3482
|
const a = [], e = t.getAttribute("href");
|
|
3457
3483
|
e && a.push(`href: ${e}`);
|
|
@@ -3468,7 +3494,7 @@ function Va(t) {
|
|
|
3468
3494
|
return a.length > 0 ? a.join(`
|
|
3469
3495
|
`) : void 0;
|
|
3470
3496
|
}
|
|
3471
|
-
const
|
|
3497
|
+
const Ua = {
|
|
3472
3498
|
id: "link-name",
|
|
3473
3499
|
wcag: ["2.4.4", "4.1.2"],
|
|
3474
3500
|
level: "A",
|
|
@@ -3485,12 +3511,12 @@ const za = {
|
|
|
3485
3511
|
html: d(e),
|
|
3486
3512
|
impact: "serious",
|
|
3487
3513
|
message: "Link has no discernible text.",
|
|
3488
|
-
context:
|
|
3514
|
+
context: za(e)
|
|
3489
3515
|
});
|
|
3490
3516
|
}
|
|
3491
3517
|
return a;
|
|
3492
3518
|
}
|
|
3493
|
-
},
|
|
3519
|
+
}, Ga = {
|
|
3494
3520
|
id: "skip-link",
|
|
3495
3521
|
wcag: ["2.4.1"],
|
|
3496
3522
|
level: "A",
|
|
@@ -3516,7 +3542,7 @@ const za = {
|
|
|
3516
3542
|
}
|
|
3517
3543
|
return a;
|
|
3518
3544
|
}
|
|
3519
|
-
},
|
|
3545
|
+
}, Ya = /* @__PURE__ */ new Set([
|
|
3520
3546
|
"block",
|
|
3521
3547
|
"flex",
|
|
3522
3548
|
"grid",
|
|
@@ -3524,23 +3550,23 @@ const za = {
|
|
|
3524
3550
|
"table-cell",
|
|
3525
3551
|
"list-item",
|
|
3526
3552
|
"flow-root"
|
|
3527
|
-
]),
|
|
3553
|
+
]), Xa = /* @__PURE__ */ new Set([
|
|
3528
3554
|
"inline",
|
|
3529
3555
|
"inline-block",
|
|
3530
3556
|
"inline-flex",
|
|
3531
3557
|
"inline-grid"
|
|
3532
3558
|
]);
|
|
3533
|
-
function
|
|
3559
|
+
function Ka(t) {
|
|
3534
3560
|
let a = t.parentElement;
|
|
3535
3561
|
for (; a; ) {
|
|
3536
3562
|
const e = w(a).display;
|
|
3537
|
-
if (
|
|
3538
|
-
return
|
|
3563
|
+
if (Ya.has(e))
|
|
3564
|
+
return Ja(a) ? a : null;
|
|
3539
3565
|
a = a.parentElement;
|
|
3540
3566
|
}
|
|
3541
3567
|
return null;
|
|
3542
3568
|
}
|
|
3543
|
-
function
|
|
3569
|
+
function Ja(t) {
|
|
3544
3570
|
const a = t.ownerDocument.createTreeWalker(
|
|
3545
3571
|
t,
|
|
3546
3572
|
NodeFilter.SHOW_TEXT
|
|
@@ -3560,7 +3586,7 @@ function Ka(t) {
|
|
|
3560
3586
|
}
|
|
3561
3587
|
return /[a-zA-Z\u00C0-\u024F]{2,}/.test(e);
|
|
3562
3588
|
}
|
|
3563
|
-
function
|
|
3589
|
+
function Qa(t, a) {
|
|
3564
3590
|
const e = t.ownerDocument.createTreeWalker(
|
|
3565
3591
|
t,
|
|
3566
3592
|
NodeFilter.SHOW_TEXT
|
|
@@ -3581,7 +3607,7 @@ function Ja(t, a) {
|
|
|
3581
3607
|
}
|
|
3582
3608
|
return null;
|
|
3583
3609
|
}
|
|
3584
|
-
function
|
|
3610
|
+
function Za(t, a) {
|
|
3585
3611
|
const e = t.textDecorationLine || t.textDecoration || "", i = a.textDecorationLine || a.textDecoration || "";
|
|
3586
3612
|
if ((e.includes("underline") || e.includes("line-through")) && e !== i)
|
|
3587
3613
|
return !0;
|
|
@@ -3606,7 +3632,7 @@ function se(t) {
|
|
|
3606
3632
|
function le(t, a, e) {
|
|
3607
3633
|
return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
|
|
3608
3634
|
}
|
|
3609
|
-
const
|
|
3635
|
+
const ei = {
|
|
3610
3636
|
id: "link-in-text-block",
|
|
3611
3637
|
wcag: ["1.4.1"],
|
|
3612
3638
|
level: "A",
|
|
@@ -3618,12 +3644,12 @@ const Za = {
|
|
|
3618
3644
|
for (const e of t.querySelectorAll("a[href]")) {
|
|
3619
3645
|
if (g(e) || !A(e).trim() || e.closest('nav, header, footer, [role="navigation"], [role="banner"], [role="contentinfo"]')) continue;
|
|
3620
3646
|
const i = w(e), n = i.display || "inline";
|
|
3621
|
-
if (!
|
|
3622
|
-
const r =
|
|
3647
|
+
if (!Xa.has(n)) continue;
|
|
3648
|
+
const r = Ka(e);
|
|
3623
3649
|
if (!r) continue;
|
|
3624
3650
|
const o = w(r);
|
|
3625
|
-
if (
|
|
3626
|
-
const s = N(i.color), l =
|
|
3651
|
+
if (Za(i, o)) continue;
|
|
3652
|
+
const s = N(i.color), l = Qa(r);
|
|
3627
3653
|
if (!s || !l) continue;
|
|
3628
3654
|
const h = R(...s), c = R(...l), u = me(h, c);
|
|
3629
3655
|
if (u >= 3) continue;
|
|
@@ -3639,7 +3665,7 @@ const Za = {
|
|
|
3639
3665
|
}
|
|
3640
3666
|
return a;
|
|
3641
3667
|
}
|
|
3642
|
-
},
|
|
3668
|
+
}, ti = {
|
|
3643
3669
|
id: "html-has-lang",
|
|
3644
3670
|
wcag: ["3.1.1"],
|
|
3645
3671
|
level: "A",
|
|
@@ -3673,17 +3699,17 @@ const Za = {
|
|
|
3673
3699
|
}
|
|
3674
3700
|
return [];
|
|
3675
3701
|
}
|
|
3676
|
-
},
|
|
3702
|
+
}, ai = new Set(
|
|
3677
3703
|
"aa ab ae af ak am an ar as av ay az ba be bg bh bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu".split(" ")
|
|
3678
|
-
),
|
|
3704
|
+
), ii = new Set(
|
|
3679
3705
|
"aar abk afr aka amh ara arg asm ava ave aym aze bak bam bel ben bih bis bod bos bre bul cat ces cha che chu chv cor cos cre cym dan deu div dzo ell eng epo est eus ewe fao fas fij fin fra fry ful gla gle glg glv grn guj hat hau hbs heb her hin hmo hrv hun hye ibo iii iku ile ina ind ipk isl ita jav jpn kal kan kas kat kau kaz khm kik kin kir kom kon kor kua kur lao lat lav lim lin lit ltz lub lug mah mal mar mkd mlg mlt mon mri msa mya nau nav nbl nde ndo nep nld nno nob nor nya oci oji ori orm oss pan pli pol por pus que roh ron run rus sag san sin slk slv sme smo sna snd som sot spa sqi srd srp ssw sun swa swe tah tam tat tel tgk tgl tha tir ton tsn tso tuk tur twi uig ukr urd uzb ven vie vol wln wol xho yid yor zha zho zul".split(" ")
|
|
3680
|
-
),
|
|
3706
|
+
), ni = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
|
|
3681
3707
|
function pe(t) {
|
|
3682
|
-
if (!
|
|
3708
|
+
if (!ni.test(t)) return !1;
|
|
3683
3709
|
const a = t.split("-")[0].toLowerCase();
|
|
3684
|
-
return a.length === 2 ?
|
|
3710
|
+
return a.length === 2 ? ai.has(a) : a.length === 3 ? !ii.has(a) : !1;
|
|
3685
3711
|
}
|
|
3686
|
-
const
|
|
3712
|
+
const ri = {
|
|
3687
3713
|
id: "html-lang-valid",
|
|
3688
3714
|
wcag: ["3.1.1"],
|
|
3689
3715
|
level: "A",
|
|
@@ -3734,7 +3760,7 @@ function ce(t) {
|
|
|
3734
3760
|
}
|
|
3735
3761
|
return !1;
|
|
3736
3762
|
}
|
|
3737
|
-
const
|
|
3763
|
+
const oi = {
|
|
3738
3764
|
id: "valid-lang",
|
|
3739
3765
|
wcag: ["3.1.2"],
|
|
3740
3766
|
level: "AA",
|
|
@@ -3766,7 +3792,7 @@ const ri = {
|
|
|
3766
3792
|
}
|
|
3767
3793
|
return a;
|
|
3768
3794
|
}
|
|
3769
|
-
},
|
|
3795
|
+
}, si = {
|
|
3770
3796
|
id: "html-xml-lang-mismatch",
|
|
3771
3797
|
wcag: ["3.1.1"],
|
|
3772
3798
|
level: "A",
|
|
@@ -3789,7 +3815,7 @@ const ri = {
|
|
|
3789
3815
|
}
|
|
3790
3816
|
return [];
|
|
3791
3817
|
}
|
|
3792
|
-
},
|
|
3818
|
+
}, li = {
|
|
3793
3819
|
id: "td-headers-attr",
|
|
3794
3820
|
wcag: ["1.3.1"],
|
|
3795
3821
|
level: "A",
|
|
@@ -3828,7 +3854,7 @@ const ri = {
|
|
|
3828
3854
|
}
|
|
3829
3855
|
return a;
|
|
3830
3856
|
}
|
|
3831
|
-
},
|
|
3857
|
+
}, ci = {
|
|
3832
3858
|
id: "th-has-data-cells",
|
|
3833
3859
|
wcag: ["1.3.1"],
|
|
3834
3860
|
level: "A",
|
|
@@ -3850,7 +3876,7 @@ const ri = {
|
|
|
3850
3876
|
}
|
|
3851
3877
|
return a;
|
|
3852
3878
|
}
|
|
3853
|
-
},
|
|
3879
|
+
}, ui = {
|
|
3854
3880
|
id: "td-has-header",
|
|
3855
3881
|
wcag: ["1.3.1"],
|
|
3856
3882
|
level: "A",
|
|
@@ -3903,7 +3929,7 @@ const ri = {
|
|
|
3903
3929
|
}
|
|
3904
3930
|
return a;
|
|
3905
3931
|
}
|
|
3906
|
-
},
|
|
3932
|
+
}, di = {
|
|
3907
3933
|
id: "scope-attr-valid",
|
|
3908
3934
|
wcag: ["1.3.1"],
|
|
3909
3935
|
level: "A",
|
|
@@ -3926,7 +3952,7 @@ const ri = {
|
|
|
3926
3952
|
}
|
|
3927
3953
|
return a;
|
|
3928
3954
|
}
|
|
3929
|
-
},
|
|
3955
|
+
}, mi = {
|
|
3930
3956
|
id: "empty-table-header",
|
|
3931
3957
|
wcag: [],
|
|
3932
3958
|
level: "A",
|
|
@@ -3949,7 +3975,7 @@ const ri = {
|
|
|
3949
3975
|
}
|
|
3950
3976
|
return a;
|
|
3951
3977
|
}
|
|
3952
|
-
}, O = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"],
|
|
3978
|
+
}, O = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], hi = {
|
|
3953
3979
|
id: "duplicate-id-aria",
|
|
3954
3980
|
wcag: ["4.1.2"],
|
|
3955
3981
|
level: "A",
|
|
@@ -3997,7 +4023,7 @@ Referenced by: ${h}` : ""}`
|
|
|
3997
4023
|
}
|
|
3998
4024
|
return a;
|
|
3999
4025
|
}
|
|
4000
|
-
},
|
|
4026
|
+
}, pi = {
|
|
4001
4027
|
id: "video-caption",
|
|
4002
4028
|
wcag: ["1.2.2"],
|
|
4003
4029
|
level: "A",
|
|
@@ -4018,7 +4044,7 @@ Referenced by: ${h}` : ""}`
|
|
|
4018
4044
|
}
|
|
4019
4045
|
return a;
|
|
4020
4046
|
}
|
|
4021
|
-
},
|
|
4047
|
+
}, gi = {
|
|
4022
4048
|
id: "audio-caption",
|
|
4023
4049
|
wcag: ["1.2.1"],
|
|
4024
4050
|
level: "A",
|
|
@@ -4040,7 +4066,7 @@ Referenced by: ${h}` : ""}`
|
|
|
4040
4066
|
}
|
|
4041
4067
|
return a;
|
|
4042
4068
|
}
|
|
4043
|
-
},
|
|
4069
|
+
}, bi = /* @__PURE__ */ new Set([
|
|
4044
4070
|
"SCRIPT",
|
|
4045
4071
|
"STYLE",
|
|
4046
4072
|
"NOSCRIPT",
|
|
@@ -4059,10 +4085,10 @@ Referenced by: ${h}` : ""}`
|
|
|
4059
4085
|
function ue([t, a, e]) {
|
|
4060
4086
|
return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
|
|
4061
4087
|
}
|
|
4062
|
-
function
|
|
4088
|
+
function fi(t) {
|
|
4063
4089
|
return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!(t.closest("fieldset[disabled]") || t.getAttribute("aria-disabled") === "true");
|
|
4064
4090
|
}
|
|
4065
|
-
function
|
|
4091
|
+
function vi(t, a) {
|
|
4066
4092
|
if (t.tagName !== "LABEL") return !1;
|
|
4067
4093
|
const e = t, i = e.htmlFor;
|
|
4068
4094
|
if (i) {
|
|
@@ -4074,7 +4100,7 @@ function fi(t, a) {
|
|
|
4074
4100
|
const r = e.id;
|
|
4075
4101
|
return !!(r && a.querySelector(`[aria-labelledby~="${r}"][aria-disabled="true"]`));
|
|
4076
4102
|
}
|
|
4077
|
-
function
|
|
4103
|
+
function yi(t) {
|
|
4078
4104
|
const a = t.clip;
|
|
4079
4105
|
if (a && a.startsWith("rect(")) {
|
|
4080
4106
|
const i = a.match(/[\d.]+/g);
|
|
@@ -4088,17 +4114,17 @@ function vi(t) {
|
|
|
4088
4114
|
}
|
|
4089
4115
|
return !1;
|
|
4090
4116
|
}
|
|
4091
|
-
function
|
|
4117
|
+
function wi(t) {
|
|
4092
4118
|
if (g(t)) return !0;
|
|
4093
4119
|
let a = t;
|
|
4094
4120
|
for (; a; ) {
|
|
4095
4121
|
const e = w(a);
|
|
4096
|
-
if (e.display === "none" || e.visibility === "hidden" ||
|
|
4122
|
+
if (e.display === "none" || e.visibility === "hidden" || yi(e)) return !0;
|
|
4097
4123
|
a = a.parentElement;
|
|
4098
4124
|
}
|
|
4099
4125
|
return !1;
|
|
4100
4126
|
}
|
|
4101
|
-
function
|
|
4127
|
+
function Ai(t) {
|
|
4102
4128
|
let a = 1, e = t;
|
|
4103
4129
|
for (; e; ) {
|
|
4104
4130
|
const i = w(e), n = parseFloat(i.opacity);
|
|
@@ -4106,7 +4132,7 @@ function wi(t) {
|
|
|
4106
4132
|
}
|
|
4107
4133
|
return a;
|
|
4108
4134
|
}
|
|
4109
|
-
function
|
|
4135
|
+
function xi(t) {
|
|
4110
4136
|
let a = t;
|
|
4111
4137
|
for (; a; ) {
|
|
4112
4138
|
const e = w(a), i = e.filter;
|
|
@@ -4119,10 +4145,10 @@ function Ai(t) {
|
|
|
4119
4145
|
}
|
|
4120
4146
|
return !1;
|
|
4121
4147
|
}
|
|
4122
|
-
function
|
|
4148
|
+
function Si(t) {
|
|
4123
4149
|
return t.closest("select") !== null;
|
|
4124
4150
|
}
|
|
4125
|
-
const
|
|
4151
|
+
const ki = {
|
|
4126
4152
|
id: "color-contrast",
|
|
4127
4153
|
wcag: ["1.4.3"],
|
|
4128
4154
|
level: "AA",
|
|
@@ -4137,13 +4163,13 @@ const Si = {
|
|
|
4137
4163
|
for (; r = i.nextNode(); ) {
|
|
4138
4164
|
if (!r.textContent || !r.textContent.trim()) continue;
|
|
4139
4165
|
const o = r.parentElement;
|
|
4140
|
-
if (!o || n.has(o) || (n.add(o),
|
|
4166
|
+
if (!o || n.has(o) || (n.add(o), bi.has(o.tagName))) continue;
|
|
4141
4167
|
const s = o.tagName;
|
|
4142
|
-
if (s === "BODY" || s === "HTML" ||
|
|
4168
|
+
if (s === "BODY" || s === "HTML" || Si(o) || fi(o) || vi(o, t) || wi(o)) continue;
|
|
4143
4169
|
const l = w(o);
|
|
4144
|
-
if (parseFloat(l.opacity) === 0 ||
|
|
4170
|
+
if (parseFloat(l.opacity) === 0 || Ai(o) < 0.1) continue;
|
|
4145
4171
|
const h = l.textShadow;
|
|
4146
|
-
if (h && h !== "none" && h !== "initial" ||
|
|
4172
|
+
if (h && h !== "none" && h !== "initial" || xi(o)) continue;
|
|
4147
4173
|
const c = N(l.color);
|
|
4148
4174
|
if (!c) continue;
|
|
4149
4175
|
const u = l.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/) || l.color.match(/rgba?\(.+?\/\s*([\d.]+%?)\s*\)/);
|
|
@@ -4167,15 +4193,15 @@ const Si = {
|
|
|
4167
4193
|
}
|
|
4168
4194
|
}, ge = [
|
|
4169
4195
|
// Document Structure
|
|
4170
|
-
Qt,
|
|
4171
4196
|
Zt,
|
|
4172
4197
|
ea,
|
|
4173
4198
|
ta,
|
|
4174
4199
|
aa,
|
|
4175
|
-
|
|
4200
|
+
ia,
|
|
4176
4201
|
ra,
|
|
4177
|
-
|
|
4178
|
-
|
|
4202
|
+
oa,
|
|
4203
|
+
la,
|
|
4204
|
+
ua,
|
|
4179
4205
|
// Images
|
|
4180
4206
|
ze,
|
|
4181
4207
|
Ge,
|
|
@@ -4202,8 +4228,8 @@ const Si = {
|
|
|
4202
4228
|
Ht,
|
|
4203
4229
|
// Structure
|
|
4204
4230
|
Dt,
|
|
4205
|
-
|
|
4206
|
-
|
|
4231
|
+
na,
|
|
4232
|
+
da,
|
|
4207
4233
|
Ot,
|
|
4208
4234
|
Bt,
|
|
4209
4235
|
Ft,
|
|
@@ -4215,18 +4241,18 @@ const Si = {
|
|
|
4215
4241
|
zt,
|
|
4216
4242
|
Ut,
|
|
4217
4243
|
Yt,
|
|
4244
|
+
Qt,
|
|
4218
4245
|
Xt,
|
|
4219
4246
|
Jt,
|
|
4220
4247
|
// ARIA
|
|
4221
|
-
da,
|
|
4222
4248
|
ma,
|
|
4223
4249
|
ha,
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4250
|
+
pa,
|
|
4251
|
+
ba,
|
|
4252
|
+
Aa,
|
|
4253
|
+
ka,
|
|
4228
4254
|
Ta,
|
|
4229
|
-
|
|
4255
|
+
Ea,
|
|
4230
4256
|
qa,
|
|
4231
4257
|
Ra,
|
|
4232
4258
|
Na,
|
|
@@ -4237,40 +4263,41 @@ const Si = {
|
|
|
4237
4263
|
Oa,
|
|
4238
4264
|
Ba,
|
|
4239
4265
|
Fa,
|
|
4240
|
-
|
|
4241
|
-
fa,
|
|
4266
|
+
Wa,
|
|
4242
4267
|
ja,
|
|
4268
|
+
va,
|
|
4269
|
+
Va,
|
|
4243
4270
|
// Links
|
|
4244
|
-
za,
|
|
4245
4271
|
Ua,
|
|
4246
|
-
|
|
4247
|
-
// Language
|
|
4272
|
+
Ga,
|
|
4248
4273
|
ei,
|
|
4249
|
-
|
|
4274
|
+
// Language
|
|
4275
|
+
ti,
|
|
4250
4276
|
ri,
|
|
4251
4277
|
oi,
|
|
4252
|
-
// Tables
|
|
4253
4278
|
si,
|
|
4279
|
+
// Tables
|
|
4254
4280
|
li,
|
|
4255
4281
|
ci,
|
|
4256
4282
|
ui,
|
|
4257
4283
|
di,
|
|
4258
|
-
// Parsing
|
|
4259
4284
|
mi,
|
|
4260
|
-
//
|
|
4285
|
+
// Parsing
|
|
4261
4286
|
hi,
|
|
4287
|
+
// Media
|
|
4262
4288
|
pi,
|
|
4289
|
+
gi,
|
|
4263
4290
|
// Color
|
|
4264
|
-
|
|
4291
|
+
ki
|
|
4265
4292
|
];
|
|
4266
4293
|
let G = [], be = /* @__PURE__ */ new Set();
|
|
4267
|
-
function
|
|
4294
|
+
function Ci(t) {
|
|
4268
4295
|
t.additionalRules && (G = t.additionalRules), t.disabledRules && (be = new Set(t.disabledRules));
|
|
4269
4296
|
}
|
|
4270
4297
|
function fe() {
|
|
4271
4298
|
return ge.filter((a) => !be.has(a.id)).concat(G);
|
|
4272
4299
|
}
|
|
4273
|
-
function
|
|
4300
|
+
function Li(t) {
|
|
4274
4301
|
ve();
|
|
4275
4302
|
const a = fe(), e = [];
|
|
4276
4303
|
let i = 0;
|
|
@@ -4294,7 +4321,7 @@ function Ci(t) {
|
|
|
4294
4321
|
function ve() {
|
|
4295
4322
|
Ie(), we(), Ae(), Oe(), De(), Ee();
|
|
4296
4323
|
}
|
|
4297
|
-
function
|
|
4324
|
+
function qi(t) {
|
|
4298
4325
|
var i;
|
|
4299
4326
|
ve();
|
|
4300
4327
|
const a = fe(), e = [];
|
|
@@ -4310,9 +4337,9 @@ function Li(t) {
|
|
|
4310
4337
|
ruleCount: a.length
|
|
4311
4338
|
};
|
|
4312
4339
|
}
|
|
4313
|
-
const
|
|
4314
|
-
function
|
|
4315
|
-
const a =
|
|
4340
|
+
const Ii = new Map(ge.map((t) => [t.id, t]));
|
|
4341
|
+
function Ri(t) {
|
|
4342
|
+
const a = Ii.get(t);
|
|
4316
4343
|
return a || G.find((e) => e.id === t);
|
|
4317
4344
|
}
|
|
4318
4345
|
export {
|
|
@@ -4322,20 +4349,20 @@ export {
|
|
|
4322
4349
|
Oe as clearColorCaches,
|
|
4323
4350
|
we as clearComputedRoleCache,
|
|
4324
4351
|
k as compileDeclarativeRule,
|
|
4325
|
-
|
|
4326
|
-
|
|
4352
|
+
Ci as configureRules,
|
|
4353
|
+
Li as createChunkedAudit,
|
|
4327
4354
|
v as getAccessibleName,
|
|
4328
4355
|
A as getAccessibleTextContent,
|
|
4329
4356
|
fe as getActiveRules,
|
|
4330
4357
|
q as getComputedRole,
|
|
4331
4358
|
d as getHtmlSnippet,
|
|
4332
4359
|
de as getImplicitRole,
|
|
4333
|
-
|
|
4360
|
+
Ri as getRuleById,
|
|
4334
4361
|
m as getSelector,
|
|
4335
4362
|
g as isAriaHidden,
|
|
4336
4363
|
ke as isValidRole,
|
|
4337
|
-
|
|
4364
|
+
Ti as querySelectorShadowAware,
|
|
4338
4365
|
ge as rules,
|
|
4339
|
-
|
|
4340
|
-
|
|
4366
|
+
qi as runAudit,
|
|
4367
|
+
Ei as validateDeclarativeRule
|
|
4341
4368
|
};
|