@accesslint/core 0.3.10 → 0.3.12
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 +216 -168
- package/dist/rules/aria/aria-children-parent.d.ts.map +1 -1
- 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 Ei(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 Ci(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),
|
|
@@ -3013,7 +3039,19 @@ const Sa = {
|
|
|
3013
3039
|
tablist: [["tab"]],
|
|
3014
3040
|
tree: [["treeitem", "group"]],
|
|
3015
3041
|
treegrid: [["row", "rowgroup"]]
|
|
3016
|
-
},
|
|
3042
|
+
}, Ia = /* @__PURE__ */ new Set([
|
|
3043
|
+
"doc-bibliography",
|
|
3044
|
+
"doc-endnotes",
|
|
3045
|
+
"grid",
|
|
3046
|
+
"group",
|
|
3047
|
+
"list",
|
|
3048
|
+
"listbox",
|
|
3049
|
+
"rowgroup",
|
|
3050
|
+
"table",
|
|
3051
|
+
"tablist",
|
|
3052
|
+
"tree",
|
|
3053
|
+
"treegrid"
|
|
3054
|
+
]), ne = {
|
|
3017
3055
|
caption: ["figure", "table", "grid", "treegrid"],
|
|
3018
3056
|
// cell/gridcell/columnheader/rowheader must be in a row
|
|
3019
3057
|
// but we skip checking native td/th since they're handled by HTML semantics
|
|
@@ -3027,27 +3065,32 @@ const Sa = {
|
|
|
3027
3065
|
tab: ["tablist"],
|
|
3028
3066
|
treeitem: ["tree", "group"]
|
|
3029
3067
|
};
|
|
3030
|
-
function
|
|
3031
|
-
var
|
|
3032
|
-
const e = ((
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3068
|
+
function Ta(t, a) {
|
|
3069
|
+
var o;
|
|
3070
|
+
const e = ((o = t.getAttribute("aria-owns")) == null ? void 0 : o.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
|
|
3071
|
+
let r = !1;
|
|
3072
|
+
for (const s of t.querySelectorAll("*")) {
|
|
3073
|
+
if (g(s)) continue;
|
|
3074
|
+
r = !0;
|
|
3075
|
+
const l = q(s);
|
|
3076
|
+
l && n.add(l);
|
|
3036
3077
|
}
|
|
3037
|
-
for (const
|
|
3038
|
-
const
|
|
3039
|
-
if (
|
|
3040
|
-
|
|
3041
|
-
|
|
3078
|
+
for (const s of e) {
|
|
3079
|
+
const l = i.getElementById(s);
|
|
3080
|
+
if (l && !g(l)) {
|
|
3081
|
+
r = !0;
|
|
3082
|
+
const h = q(l);
|
|
3083
|
+
h && n.add(h);
|
|
3042
3084
|
}
|
|
3043
3085
|
}
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3086
|
+
if (!r) return "empty";
|
|
3087
|
+
for (const s of a)
|
|
3088
|
+
if (!s.some((l) => n.has(l))) return "fail";
|
|
3089
|
+
return "pass";
|
|
3047
3090
|
}
|
|
3048
|
-
const
|
|
3091
|
+
const Ea = {
|
|
3049
3092
|
id: "aria-required-children",
|
|
3050
|
-
wcag: ["
|
|
3093
|
+
wcag: ["1.3.1"],
|
|
3051
3094
|
level: "A",
|
|
3052
3095
|
description: "Certain ARIA roles require specific child roles to be present.",
|
|
3053
3096
|
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>).",
|
|
@@ -3058,24 +3101,28 @@ const Ia = {
|
|
|
3058
3101
|
for (const i of t.querySelectorAll("[role]")) {
|
|
3059
3102
|
if (g(i)) continue;
|
|
3060
3103
|
const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
|
|
3061
|
-
if (!n || !(n in ie)) continue;
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
const
|
|
3065
|
-
|
|
3066
|
-
ruleId: "aria-required-children",
|
|
3067
|
-
selector: m(i),
|
|
3068
|
-
html: d(i),
|
|
3069
|
-
impact: "critical",
|
|
3070
|
-
message: `Role "${n}" requires children with role: ${o}.`
|
|
3071
|
-
});
|
|
3104
|
+
if (!n || !(n in ie) || i.getAttribute("aria-busy") === "true") continue;
|
|
3105
|
+
if (n === "combobox") {
|
|
3106
|
+
if (i.getAttribute("aria-expanded") !== "true") continue;
|
|
3107
|
+
const l = i.tagName.toLowerCase();
|
|
3108
|
+
if (l === "input" || l === "textarea") continue;
|
|
3072
3109
|
}
|
|
3110
|
+
const r = ie[n], o = Ta(i, r);
|
|
3111
|
+
if (o === "pass" || o === "empty" && Ia.has(n)) continue;
|
|
3112
|
+
const s = r.map((l) => l.join(" or ")).join(", ");
|
|
3113
|
+
a.push({
|
|
3114
|
+
ruleId: "aria-required-children",
|
|
3115
|
+
selector: m(i),
|
|
3116
|
+
html: d(i),
|
|
3117
|
+
impact: "critical",
|
|
3118
|
+
message: `Role "${n}" requires children with role: ${s}.`
|
|
3119
|
+
});
|
|
3073
3120
|
}
|
|
3074
3121
|
return a;
|
|
3075
3122
|
}
|
|
3076
|
-
},
|
|
3123
|
+
}, Ca = {
|
|
3077
3124
|
id: "aria-required-parent",
|
|
3078
|
-
wcag: ["
|
|
3125
|
+
wcag: ["1.3.1"],
|
|
3079
3126
|
level: "A",
|
|
3080
3127
|
description: "Certain ARIA roles must be contained within specific parent roles.",
|
|
3081
3128
|
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 +3170,7 @@ const Ia = {
|
|
|
3123
3170
|
"embed",
|
|
3124
3171
|
"area[href]"
|
|
3125
3172
|
].join(", ");
|
|
3126
|
-
function
|
|
3173
|
+
function La(t) {
|
|
3127
3174
|
let a = t;
|
|
3128
3175
|
const e = t.ownerDocument, i = e.defaultView;
|
|
3129
3176
|
for (; a && a !== e.body; ) {
|
|
@@ -3136,7 +3183,7 @@ function Ea(t) {
|
|
|
3136
3183
|
}
|
|
3137
3184
|
return !0;
|
|
3138
3185
|
}
|
|
3139
|
-
const
|
|
3186
|
+
const qa = {
|
|
3140
3187
|
id: "aria-hidden-body",
|
|
3141
3188
|
selector: 'body[aria-hidden="true"]',
|
|
3142
3189
|
check: { type: "selector-exists" },
|
|
@@ -3148,7 +3195,7 @@ const Ca = {
|
|
|
3148
3195
|
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
3196
|
prompt: "Instruct to remove aria-hidden='true' from the body element.",
|
|
3150
3197
|
skipAriaHidden: !1
|
|
3151
|
-
},
|
|
3198
|
+
}, Ra = k(qa), Na = {
|
|
3152
3199
|
id: "aria-hidden-focus",
|
|
3153
3200
|
wcag: ["4.1.2"],
|
|
3154
3201
|
level: "A",
|
|
@@ -3164,7 +3211,7 @@ const Ca = {
|
|
|
3164
3211
|
for (const n of i)
|
|
3165
3212
|
if (n instanceof HTMLElement) {
|
|
3166
3213
|
const r = n.getAttribute("tabindex");
|
|
3167
|
-
if (r === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !
|
|
3214
|
+
if (r === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !La(n)) continue;
|
|
3168
3215
|
const o = n.tagName.toLowerCase();
|
|
3169
3216
|
let s;
|
|
3170
3217
|
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 +3228,7 @@ const Ca = {
|
|
|
3181
3228
|
}
|
|
3182
3229
|
return a;
|
|
3183
3230
|
}
|
|
3184
|
-
},
|
|
3231
|
+
}, $a = {
|
|
3185
3232
|
id: "aria-command-name",
|
|
3186
3233
|
wcag: ["4.1.2"],
|
|
3187
3234
|
level: "A",
|
|
@@ -3207,7 +3254,7 @@ const Ca = {
|
|
|
3207
3254
|
}
|
|
3208
3255
|
return a;
|
|
3209
3256
|
}
|
|
3210
|
-
},
|
|
3257
|
+
}, Ma = {
|
|
3211
3258
|
id: "aria-input-field-name",
|
|
3212
3259
|
wcag: ["4.1.2"],
|
|
3213
3260
|
level: "A",
|
|
@@ -3228,7 +3275,7 @@ const Ca = {
|
|
|
3228
3275
|
}
|
|
3229
3276
|
return a;
|
|
3230
3277
|
}
|
|
3231
|
-
},
|
|
3278
|
+
}, Ha = {
|
|
3232
3279
|
id: "aria-toggle-field-name",
|
|
3233
3280
|
wcag: ["4.1.2"],
|
|
3234
3281
|
level: "A",
|
|
@@ -3249,7 +3296,7 @@ const Ca = {
|
|
|
3249
3296
|
}
|
|
3250
3297
|
return a;
|
|
3251
3298
|
}
|
|
3252
|
-
},
|
|
3299
|
+
}, Da = {
|
|
3253
3300
|
id: "aria-meter-name",
|
|
3254
3301
|
wcag: ["4.1.2"],
|
|
3255
3302
|
level: "A",
|
|
@@ -3270,7 +3317,7 @@ const Ca = {
|
|
|
3270
3317
|
}
|
|
3271
3318
|
return a;
|
|
3272
3319
|
}
|
|
3273
|
-
},
|
|
3320
|
+
}, Oa = {
|
|
3274
3321
|
id: "aria-progressbar-name",
|
|
3275
3322
|
wcag: ["4.1.2"],
|
|
3276
3323
|
level: "A",
|
|
@@ -3291,7 +3338,7 @@ const Ca = {
|
|
|
3291
3338
|
}
|
|
3292
3339
|
return a;
|
|
3293
3340
|
}
|
|
3294
|
-
},
|
|
3341
|
+
}, Ba = {
|
|
3295
3342
|
id: "aria-dialog-name",
|
|
3296
3343
|
wcag: ["4.1.2"],
|
|
3297
3344
|
level: "A",
|
|
@@ -3312,7 +3359,7 @@ const Ca = {
|
|
|
3312
3359
|
}
|
|
3313
3360
|
return a;
|
|
3314
3361
|
}
|
|
3315
|
-
},
|
|
3362
|
+
}, Fa = {
|
|
3316
3363
|
id: "aria-tooltip-name",
|
|
3317
3364
|
wcag: ["4.1.2"],
|
|
3318
3365
|
level: "A",
|
|
@@ -3333,7 +3380,7 @@ const Ca = {
|
|
|
3333
3380
|
}
|
|
3334
3381
|
return a;
|
|
3335
3382
|
}
|
|
3336
|
-
},
|
|
3383
|
+
}, Wa = {
|
|
3337
3384
|
id: "aria-treeitem-name",
|
|
3338
3385
|
wcag: ["4.1.2"],
|
|
3339
3386
|
level: "A",
|
|
@@ -3354,7 +3401,7 @@ const Ca = {
|
|
|
3354
3401
|
}
|
|
3355
3402
|
return a;
|
|
3356
3403
|
}
|
|
3357
|
-
},
|
|
3404
|
+
}, _a = {
|
|
3358
3405
|
id: "aria-prohibited-attr",
|
|
3359
3406
|
wcag: ["4.1.2"],
|
|
3360
3407
|
level: "A",
|
|
@@ -3364,14 +3411,14 @@ const Ca = {
|
|
|
3364
3411
|
run(t) {
|
|
3365
3412
|
return U(t).prohibitedAttr;
|
|
3366
3413
|
}
|
|
3367
|
-
},
|
|
3414
|
+
}, Pa = [
|
|
3368
3415
|
"a[href]",
|
|
3369
3416
|
"button:not([disabled])",
|
|
3370
3417
|
'input:not([disabled]):not([type="hidden"])',
|
|
3371
3418
|
"select:not([disabled])",
|
|
3372
3419
|
"textarea:not([disabled])",
|
|
3373
3420
|
'[tabindex]:not([tabindex="-1"])'
|
|
3374
|
-
].join(", "),
|
|
3421
|
+
].join(", "), ja = [
|
|
3375
3422
|
"aria-atomic",
|
|
3376
3423
|
"aria-busy",
|
|
3377
3424
|
"aria-controls",
|
|
@@ -3388,15 +3435,15 @@ const Ca = {
|
|
|
3388
3435
|
];
|
|
3389
3436
|
function oe(t) {
|
|
3390
3437
|
const a = [];
|
|
3391
|
-
t.matches(
|
|
3392
|
-
for (const e of
|
|
3438
|
+
t.matches(Pa) && a.push("element is focusable");
|
|
3439
|
+
for (const e of ja)
|
|
3393
3440
|
if (t.hasAttribute(e)) {
|
|
3394
3441
|
a.push(`has ${e}`);
|
|
3395
3442
|
break;
|
|
3396
3443
|
}
|
|
3397
3444
|
return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
|
|
3398
3445
|
}
|
|
3399
|
-
const
|
|
3446
|
+
const Va = {
|
|
3400
3447
|
id: "presentation-role-conflict",
|
|
3401
3448
|
wcag: ["4.1.2"],
|
|
3402
3449
|
level: "A",
|
|
@@ -3429,7 +3476,7 @@ const Pa = {
|
|
|
3429
3476
|
}
|
|
3430
3477
|
return a;
|
|
3431
3478
|
}
|
|
3432
|
-
},
|
|
3479
|
+
}, za = {
|
|
3433
3480
|
id: "summary-name",
|
|
3434
3481
|
wcag: ["4.1.2"],
|
|
3435
3482
|
level: "A",
|
|
@@ -3451,7 +3498,7 @@ const Pa = {
|
|
|
3451
3498
|
return a;
|
|
3452
3499
|
}
|
|
3453
3500
|
};
|
|
3454
|
-
function
|
|
3501
|
+
function Ua(t) {
|
|
3455
3502
|
var n, r;
|
|
3456
3503
|
const a = [], e = t.getAttribute("href");
|
|
3457
3504
|
e && a.push(`href: ${e}`);
|
|
@@ -3468,7 +3515,7 @@ function Va(t) {
|
|
|
3468
3515
|
return a.length > 0 ? a.join(`
|
|
3469
3516
|
`) : void 0;
|
|
3470
3517
|
}
|
|
3471
|
-
const
|
|
3518
|
+
const Ga = {
|
|
3472
3519
|
id: "link-name",
|
|
3473
3520
|
wcag: ["2.4.4", "4.1.2"],
|
|
3474
3521
|
level: "A",
|
|
@@ -3485,12 +3532,12 @@ const za = {
|
|
|
3485
3532
|
html: d(e),
|
|
3486
3533
|
impact: "serious",
|
|
3487
3534
|
message: "Link has no discernible text.",
|
|
3488
|
-
context:
|
|
3535
|
+
context: Ua(e)
|
|
3489
3536
|
});
|
|
3490
3537
|
}
|
|
3491
3538
|
return a;
|
|
3492
3539
|
}
|
|
3493
|
-
},
|
|
3540
|
+
}, Ya = {
|
|
3494
3541
|
id: "skip-link",
|
|
3495
3542
|
wcag: ["2.4.1"],
|
|
3496
3543
|
level: "A",
|
|
@@ -3516,7 +3563,7 @@ const za = {
|
|
|
3516
3563
|
}
|
|
3517
3564
|
return a;
|
|
3518
3565
|
}
|
|
3519
|
-
},
|
|
3566
|
+
}, Xa = /* @__PURE__ */ new Set([
|
|
3520
3567
|
"block",
|
|
3521
3568
|
"flex",
|
|
3522
3569
|
"grid",
|
|
@@ -3524,23 +3571,23 @@ const za = {
|
|
|
3524
3571
|
"table-cell",
|
|
3525
3572
|
"list-item",
|
|
3526
3573
|
"flow-root"
|
|
3527
|
-
]),
|
|
3574
|
+
]), Ka = /* @__PURE__ */ new Set([
|
|
3528
3575
|
"inline",
|
|
3529
3576
|
"inline-block",
|
|
3530
3577
|
"inline-flex",
|
|
3531
3578
|
"inline-grid"
|
|
3532
3579
|
]);
|
|
3533
|
-
function
|
|
3580
|
+
function Ja(t) {
|
|
3534
3581
|
let a = t.parentElement;
|
|
3535
3582
|
for (; a; ) {
|
|
3536
3583
|
const e = w(a).display;
|
|
3537
|
-
if (
|
|
3538
|
-
return
|
|
3584
|
+
if (Xa.has(e))
|
|
3585
|
+
return Qa(a) ? a : null;
|
|
3539
3586
|
a = a.parentElement;
|
|
3540
3587
|
}
|
|
3541
3588
|
return null;
|
|
3542
3589
|
}
|
|
3543
|
-
function
|
|
3590
|
+
function Qa(t) {
|
|
3544
3591
|
const a = t.ownerDocument.createTreeWalker(
|
|
3545
3592
|
t,
|
|
3546
3593
|
NodeFilter.SHOW_TEXT
|
|
@@ -3560,7 +3607,7 @@ function Ka(t) {
|
|
|
3560
3607
|
}
|
|
3561
3608
|
return /[a-zA-Z\u00C0-\u024F]{2,}/.test(e);
|
|
3562
3609
|
}
|
|
3563
|
-
function
|
|
3610
|
+
function Za(t, a) {
|
|
3564
3611
|
const e = t.ownerDocument.createTreeWalker(
|
|
3565
3612
|
t,
|
|
3566
3613
|
NodeFilter.SHOW_TEXT
|
|
@@ -3581,7 +3628,7 @@ function Ja(t, a) {
|
|
|
3581
3628
|
}
|
|
3582
3629
|
return null;
|
|
3583
3630
|
}
|
|
3584
|
-
function
|
|
3631
|
+
function ei(t, a) {
|
|
3585
3632
|
const e = t.textDecorationLine || t.textDecoration || "", i = a.textDecorationLine || a.textDecoration || "";
|
|
3586
3633
|
if ((e.includes("underline") || e.includes("line-through")) && e !== i)
|
|
3587
3634
|
return !0;
|
|
@@ -3606,7 +3653,7 @@ function se(t) {
|
|
|
3606
3653
|
function le(t, a, e) {
|
|
3607
3654
|
return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
|
|
3608
3655
|
}
|
|
3609
|
-
const
|
|
3656
|
+
const ti = {
|
|
3610
3657
|
id: "link-in-text-block",
|
|
3611
3658
|
wcag: ["1.4.1"],
|
|
3612
3659
|
level: "A",
|
|
@@ -3618,12 +3665,12 @@ const Za = {
|
|
|
3618
3665
|
for (const e of t.querySelectorAll("a[href]")) {
|
|
3619
3666
|
if (g(e) || !A(e).trim() || e.closest('nav, header, footer, [role="navigation"], [role="banner"], [role="contentinfo"]')) continue;
|
|
3620
3667
|
const i = w(e), n = i.display || "inline";
|
|
3621
|
-
if (!
|
|
3622
|
-
const r =
|
|
3668
|
+
if (!Ka.has(n)) continue;
|
|
3669
|
+
const r = Ja(e);
|
|
3623
3670
|
if (!r) continue;
|
|
3624
3671
|
const o = w(r);
|
|
3625
|
-
if (
|
|
3626
|
-
const s = N(i.color), l =
|
|
3672
|
+
if (ei(i, o)) continue;
|
|
3673
|
+
const s = N(i.color), l = Za(r);
|
|
3627
3674
|
if (!s || !l) continue;
|
|
3628
3675
|
const h = R(...s), c = R(...l), u = me(h, c);
|
|
3629
3676
|
if (u >= 3) continue;
|
|
@@ -3639,7 +3686,7 @@ const Za = {
|
|
|
3639
3686
|
}
|
|
3640
3687
|
return a;
|
|
3641
3688
|
}
|
|
3642
|
-
},
|
|
3689
|
+
}, ai = {
|
|
3643
3690
|
id: "html-has-lang",
|
|
3644
3691
|
wcag: ["3.1.1"],
|
|
3645
3692
|
level: "A",
|
|
@@ -3673,17 +3720,17 @@ const Za = {
|
|
|
3673
3720
|
}
|
|
3674
3721
|
return [];
|
|
3675
3722
|
}
|
|
3676
|
-
},
|
|
3723
|
+
}, ii = new Set(
|
|
3677
3724
|
"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
|
-
),
|
|
3725
|
+
), ni = new Set(
|
|
3679
3726
|
"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
|
-
),
|
|
3727
|
+
), ri = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
|
|
3681
3728
|
function pe(t) {
|
|
3682
|
-
if (!
|
|
3729
|
+
if (!ri.test(t)) return !1;
|
|
3683
3730
|
const a = t.split("-")[0].toLowerCase();
|
|
3684
|
-
return a.length === 2 ?
|
|
3731
|
+
return a.length === 2 ? ii.has(a) : a.length === 3 ? !ni.has(a) : !1;
|
|
3685
3732
|
}
|
|
3686
|
-
const
|
|
3733
|
+
const oi = {
|
|
3687
3734
|
id: "html-lang-valid",
|
|
3688
3735
|
wcag: ["3.1.1"],
|
|
3689
3736
|
level: "A",
|
|
@@ -3734,7 +3781,7 @@ function ce(t) {
|
|
|
3734
3781
|
}
|
|
3735
3782
|
return !1;
|
|
3736
3783
|
}
|
|
3737
|
-
const
|
|
3784
|
+
const si = {
|
|
3738
3785
|
id: "valid-lang",
|
|
3739
3786
|
wcag: ["3.1.2"],
|
|
3740
3787
|
level: "AA",
|
|
@@ -3766,7 +3813,7 @@ const ri = {
|
|
|
3766
3813
|
}
|
|
3767
3814
|
return a;
|
|
3768
3815
|
}
|
|
3769
|
-
},
|
|
3816
|
+
}, li = {
|
|
3770
3817
|
id: "html-xml-lang-mismatch",
|
|
3771
3818
|
wcag: ["3.1.1"],
|
|
3772
3819
|
level: "A",
|
|
@@ -3789,7 +3836,7 @@ const ri = {
|
|
|
3789
3836
|
}
|
|
3790
3837
|
return [];
|
|
3791
3838
|
}
|
|
3792
|
-
},
|
|
3839
|
+
}, ci = {
|
|
3793
3840
|
id: "td-headers-attr",
|
|
3794
3841
|
wcag: ["1.3.1"],
|
|
3795
3842
|
level: "A",
|
|
@@ -3828,7 +3875,7 @@ const ri = {
|
|
|
3828
3875
|
}
|
|
3829
3876
|
return a;
|
|
3830
3877
|
}
|
|
3831
|
-
},
|
|
3878
|
+
}, ui = {
|
|
3832
3879
|
id: "th-has-data-cells",
|
|
3833
3880
|
wcag: ["1.3.1"],
|
|
3834
3881
|
level: "A",
|
|
@@ -3850,7 +3897,7 @@ const ri = {
|
|
|
3850
3897
|
}
|
|
3851
3898
|
return a;
|
|
3852
3899
|
}
|
|
3853
|
-
},
|
|
3900
|
+
}, di = {
|
|
3854
3901
|
id: "td-has-header",
|
|
3855
3902
|
wcag: ["1.3.1"],
|
|
3856
3903
|
level: "A",
|
|
@@ -3903,7 +3950,7 @@ const ri = {
|
|
|
3903
3950
|
}
|
|
3904
3951
|
return a;
|
|
3905
3952
|
}
|
|
3906
|
-
},
|
|
3953
|
+
}, mi = {
|
|
3907
3954
|
id: "scope-attr-valid",
|
|
3908
3955
|
wcag: ["1.3.1"],
|
|
3909
3956
|
level: "A",
|
|
@@ -3926,7 +3973,7 @@ const ri = {
|
|
|
3926
3973
|
}
|
|
3927
3974
|
return a;
|
|
3928
3975
|
}
|
|
3929
|
-
},
|
|
3976
|
+
}, hi = {
|
|
3930
3977
|
id: "empty-table-header",
|
|
3931
3978
|
wcag: [],
|
|
3932
3979
|
level: "A",
|
|
@@ -3949,7 +3996,7 @@ const ri = {
|
|
|
3949
3996
|
}
|
|
3950
3997
|
return a;
|
|
3951
3998
|
}
|
|
3952
|
-
}, O = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"],
|
|
3999
|
+
}, O = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], pi = {
|
|
3953
4000
|
id: "duplicate-id-aria",
|
|
3954
4001
|
wcag: ["4.1.2"],
|
|
3955
4002
|
level: "A",
|
|
@@ -3997,7 +4044,7 @@ Referenced by: ${h}` : ""}`
|
|
|
3997
4044
|
}
|
|
3998
4045
|
return a;
|
|
3999
4046
|
}
|
|
4000
|
-
},
|
|
4047
|
+
}, gi = {
|
|
4001
4048
|
id: "video-caption",
|
|
4002
4049
|
wcag: ["1.2.2"],
|
|
4003
4050
|
level: "A",
|
|
@@ -4018,7 +4065,7 @@ Referenced by: ${h}` : ""}`
|
|
|
4018
4065
|
}
|
|
4019
4066
|
return a;
|
|
4020
4067
|
}
|
|
4021
|
-
},
|
|
4068
|
+
}, bi = {
|
|
4022
4069
|
id: "audio-caption",
|
|
4023
4070
|
wcag: ["1.2.1"],
|
|
4024
4071
|
level: "A",
|
|
@@ -4040,7 +4087,7 @@ Referenced by: ${h}` : ""}`
|
|
|
4040
4087
|
}
|
|
4041
4088
|
return a;
|
|
4042
4089
|
}
|
|
4043
|
-
},
|
|
4090
|
+
}, fi = /* @__PURE__ */ new Set([
|
|
4044
4091
|
"SCRIPT",
|
|
4045
4092
|
"STYLE",
|
|
4046
4093
|
"NOSCRIPT",
|
|
@@ -4059,10 +4106,10 @@ Referenced by: ${h}` : ""}`
|
|
|
4059
4106
|
function ue([t, a, e]) {
|
|
4060
4107
|
return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
|
|
4061
4108
|
}
|
|
4062
|
-
function
|
|
4109
|
+
function vi(t) {
|
|
4063
4110
|
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
4111
|
}
|
|
4065
|
-
function
|
|
4112
|
+
function yi(t, a) {
|
|
4066
4113
|
if (t.tagName !== "LABEL") return !1;
|
|
4067
4114
|
const e = t, i = e.htmlFor;
|
|
4068
4115
|
if (i) {
|
|
@@ -4074,7 +4121,7 @@ function fi(t, a) {
|
|
|
4074
4121
|
const r = e.id;
|
|
4075
4122
|
return !!(r && a.querySelector(`[aria-labelledby~="${r}"][aria-disabled="true"]`));
|
|
4076
4123
|
}
|
|
4077
|
-
function
|
|
4124
|
+
function wi(t) {
|
|
4078
4125
|
const a = t.clip;
|
|
4079
4126
|
if (a && a.startsWith("rect(")) {
|
|
4080
4127
|
const i = a.match(/[\d.]+/g);
|
|
@@ -4088,17 +4135,17 @@ function vi(t) {
|
|
|
4088
4135
|
}
|
|
4089
4136
|
return !1;
|
|
4090
4137
|
}
|
|
4091
|
-
function
|
|
4138
|
+
function Ai(t) {
|
|
4092
4139
|
if (g(t)) return !0;
|
|
4093
4140
|
let a = t;
|
|
4094
4141
|
for (; a; ) {
|
|
4095
4142
|
const e = w(a);
|
|
4096
|
-
if (e.display === "none" || e.visibility === "hidden" ||
|
|
4143
|
+
if (e.display === "none" || e.visibility === "hidden" || wi(e)) return !0;
|
|
4097
4144
|
a = a.parentElement;
|
|
4098
4145
|
}
|
|
4099
4146
|
return !1;
|
|
4100
4147
|
}
|
|
4101
|
-
function
|
|
4148
|
+
function xi(t) {
|
|
4102
4149
|
let a = 1, e = t;
|
|
4103
4150
|
for (; e; ) {
|
|
4104
4151
|
const i = w(e), n = parseFloat(i.opacity);
|
|
@@ -4106,7 +4153,7 @@ function wi(t) {
|
|
|
4106
4153
|
}
|
|
4107
4154
|
return a;
|
|
4108
4155
|
}
|
|
4109
|
-
function
|
|
4156
|
+
function Si(t) {
|
|
4110
4157
|
let a = t;
|
|
4111
4158
|
for (; a; ) {
|
|
4112
4159
|
const e = w(a), i = e.filter;
|
|
@@ -4119,10 +4166,10 @@ function Ai(t) {
|
|
|
4119
4166
|
}
|
|
4120
4167
|
return !1;
|
|
4121
4168
|
}
|
|
4122
|
-
function
|
|
4169
|
+
function ki(t) {
|
|
4123
4170
|
return t.closest("select") !== null;
|
|
4124
4171
|
}
|
|
4125
|
-
const
|
|
4172
|
+
const Ii = {
|
|
4126
4173
|
id: "color-contrast",
|
|
4127
4174
|
wcag: ["1.4.3"],
|
|
4128
4175
|
level: "AA",
|
|
@@ -4137,13 +4184,13 @@ const Si = {
|
|
|
4137
4184
|
for (; r = i.nextNode(); ) {
|
|
4138
4185
|
if (!r.textContent || !r.textContent.trim()) continue;
|
|
4139
4186
|
const o = r.parentElement;
|
|
4140
|
-
if (!o || n.has(o) || (n.add(o),
|
|
4187
|
+
if (!o || n.has(o) || (n.add(o), fi.has(o.tagName))) continue;
|
|
4141
4188
|
const s = o.tagName;
|
|
4142
|
-
if (s === "BODY" || s === "HTML" ||
|
|
4189
|
+
if (s === "BODY" || s === "HTML" || ki(o) || vi(o) || yi(o, t) || Ai(o)) continue;
|
|
4143
4190
|
const l = w(o);
|
|
4144
|
-
if (parseFloat(l.opacity) === 0 ||
|
|
4191
|
+
if (parseFloat(l.opacity) === 0 || xi(o) < 0.1) continue;
|
|
4145
4192
|
const h = l.textShadow;
|
|
4146
|
-
if (h && h !== "none" && h !== "initial" ||
|
|
4193
|
+
if (h && h !== "none" && h !== "initial" || Si(o)) continue;
|
|
4147
4194
|
const c = N(l.color);
|
|
4148
4195
|
if (!c) continue;
|
|
4149
4196
|
const u = l.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/) || l.color.match(/rgba?\(.+?\/\s*([\d.]+%?)\s*\)/);
|
|
@@ -4167,15 +4214,15 @@ const Si = {
|
|
|
4167
4214
|
}
|
|
4168
4215
|
}, ge = [
|
|
4169
4216
|
// Document Structure
|
|
4170
|
-
Qt,
|
|
4171
4217
|
Zt,
|
|
4172
4218
|
ea,
|
|
4173
4219
|
ta,
|
|
4174
4220
|
aa,
|
|
4175
|
-
|
|
4221
|
+
ia,
|
|
4176
4222
|
ra,
|
|
4177
|
-
|
|
4178
|
-
|
|
4223
|
+
oa,
|
|
4224
|
+
la,
|
|
4225
|
+
ua,
|
|
4179
4226
|
// Images
|
|
4180
4227
|
ze,
|
|
4181
4228
|
Ge,
|
|
@@ -4202,8 +4249,8 @@ const Si = {
|
|
|
4202
4249
|
Ht,
|
|
4203
4250
|
// Structure
|
|
4204
4251
|
Dt,
|
|
4205
|
-
|
|
4206
|
-
|
|
4252
|
+
na,
|
|
4253
|
+
da,
|
|
4207
4254
|
Ot,
|
|
4208
4255
|
Bt,
|
|
4209
4256
|
Ft,
|
|
@@ -4215,19 +4262,18 @@ const Si = {
|
|
|
4215
4262
|
zt,
|
|
4216
4263
|
Ut,
|
|
4217
4264
|
Yt,
|
|
4265
|
+
Qt,
|
|
4218
4266
|
Xt,
|
|
4219
4267
|
Jt,
|
|
4220
4268
|
// ARIA
|
|
4221
|
-
da,
|
|
4222
4269
|
ma,
|
|
4223
4270
|
ha,
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
qa,
|
|
4271
|
+
pa,
|
|
4272
|
+
ba,
|
|
4273
|
+
Aa,
|
|
4274
|
+
ka,
|
|
4275
|
+
Ea,
|
|
4276
|
+
Ca,
|
|
4231
4277
|
Ra,
|
|
4232
4278
|
Na,
|
|
4233
4279
|
$a,
|
|
@@ -4237,40 +4283,42 @@ const Si = {
|
|
|
4237
4283
|
Oa,
|
|
4238
4284
|
Ba,
|
|
4239
4285
|
Fa,
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4286
|
+
Wa,
|
|
4287
|
+
_a,
|
|
4288
|
+
Va,
|
|
4289
|
+
va,
|
|
4244
4290
|
za,
|
|
4245
|
-
|
|
4246
|
-
|
|
4291
|
+
// Links
|
|
4292
|
+
Ga,
|
|
4293
|
+
Ya,
|
|
4294
|
+
ti,
|
|
4247
4295
|
// Language
|
|
4248
|
-
|
|
4249
|
-
ni,
|
|
4250
|
-
ri,
|
|
4296
|
+
ai,
|
|
4251
4297
|
oi,
|
|
4252
|
-
// Tables
|
|
4253
4298
|
si,
|
|
4254
4299
|
li,
|
|
4300
|
+
// Tables
|
|
4255
4301
|
ci,
|
|
4256
4302
|
ui,
|
|
4257
4303
|
di,
|
|
4258
|
-
// Parsing
|
|
4259
4304
|
mi,
|
|
4260
|
-
// Media
|
|
4261
4305
|
hi,
|
|
4306
|
+
// Parsing
|
|
4262
4307
|
pi,
|
|
4308
|
+
// Media
|
|
4309
|
+
gi,
|
|
4310
|
+
bi,
|
|
4263
4311
|
// Color
|
|
4264
|
-
|
|
4312
|
+
Ii
|
|
4265
4313
|
];
|
|
4266
4314
|
let G = [], be = /* @__PURE__ */ new Set();
|
|
4267
|
-
function
|
|
4315
|
+
function Li(t) {
|
|
4268
4316
|
t.additionalRules && (G = t.additionalRules), t.disabledRules && (be = new Set(t.disabledRules));
|
|
4269
4317
|
}
|
|
4270
4318
|
function fe() {
|
|
4271
4319
|
return ge.filter((a) => !be.has(a.id)).concat(G);
|
|
4272
4320
|
}
|
|
4273
|
-
function
|
|
4321
|
+
function qi(t) {
|
|
4274
4322
|
ve();
|
|
4275
4323
|
const a = fe(), e = [];
|
|
4276
4324
|
let i = 0;
|
|
@@ -4294,7 +4342,7 @@ function Ci(t) {
|
|
|
4294
4342
|
function ve() {
|
|
4295
4343
|
Ie(), we(), Ae(), Oe(), De(), Ee();
|
|
4296
4344
|
}
|
|
4297
|
-
function
|
|
4345
|
+
function Ri(t) {
|
|
4298
4346
|
var i;
|
|
4299
4347
|
ve();
|
|
4300
4348
|
const a = fe(), e = [];
|
|
@@ -4310,9 +4358,9 @@ function Li(t) {
|
|
|
4310
4358
|
ruleCount: a.length
|
|
4311
4359
|
};
|
|
4312
4360
|
}
|
|
4313
|
-
const
|
|
4314
|
-
function
|
|
4315
|
-
const a =
|
|
4361
|
+
const Ti = new Map(ge.map((t) => [t.id, t]));
|
|
4362
|
+
function Ni(t) {
|
|
4363
|
+
const a = Ti.get(t);
|
|
4316
4364
|
return a || G.find((e) => e.id === t);
|
|
4317
4365
|
}
|
|
4318
4366
|
export {
|
|
@@ -4322,20 +4370,20 @@ export {
|
|
|
4322
4370
|
Oe as clearColorCaches,
|
|
4323
4371
|
we as clearComputedRoleCache,
|
|
4324
4372
|
k as compileDeclarativeRule,
|
|
4325
|
-
|
|
4326
|
-
|
|
4373
|
+
Li as configureRules,
|
|
4374
|
+
qi as createChunkedAudit,
|
|
4327
4375
|
v as getAccessibleName,
|
|
4328
4376
|
A as getAccessibleTextContent,
|
|
4329
4377
|
fe as getActiveRules,
|
|
4330
4378
|
q as getComputedRole,
|
|
4331
4379
|
d as getHtmlSnippet,
|
|
4332
4380
|
de as getImplicitRole,
|
|
4333
|
-
|
|
4381
|
+
Ni as getRuleById,
|
|
4334
4382
|
m as getSelector,
|
|
4335
4383
|
g as isAriaHidden,
|
|
4336
4384
|
ke as isValidRole,
|
|
4337
|
-
|
|
4385
|
+
Ei as querySelectorShadowAware,
|
|
4338
4386
|
ge as rules,
|
|
4339
|
-
|
|
4340
|
-
|
|
4387
|
+
Ri as runAudit,
|
|
4388
|
+
Ci as validateDeclarativeRule
|
|
4341
4389
|
};
|