@accesslint/core 0.3.12 → 0.3.14
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 +508 -450
- package/dist/rules/aria/aria-children-parent.d.ts.map +1 -1
- package/dist/rules/color/color-contrast.d.ts.map +1 -1
- package/dist/rules/engine.d.ts.map +1 -1
- package/dist/rules/links/link-rules.d.ts.map +1 -1
- package/dist/rules/structure/meta-rules.d.ts.map +1 -1
- package/dist/rules/utils/aria.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
let
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
let O = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
function Se() {
|
|
3
|
+
O = /* @__PURE__ */ new WeakMap();
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function he(t) {
|
|
6
6
|
var i;
|
|
7
7
|
const a = t.tagName.toLowerCase(), e = (i = t.getAttribute("type")) == null ? void 0 : i.toLowerCase();
|
|
8
8
|
switch (a) {
|
|
@@ -119,22 +119,22 @@ function de(t) {
|
|
|
119
119
|
}
|
|
120
120
|
function q(t) {
|
|
121
121
|
var n;
|
|
122
|
-
const a =
|
|
122
|
+
const a = O.get(t);
|
|
123
123
|
if (a !== void 0) return a;
|
|
124
|
-
const i = ((n = t.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase()) || null ||
|
|
125
|
-
return
|
|
124
|
+
const i = ((n = t.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase()) || null || he(t);
|
|
125
|
+
return O.set(t, i), i;
|
|
126
126
|
}
|
|
127
|
-
let
|
|
128
|
-
function
|
|
129
|
-
|
|
127
|
+
let B = /* @__PURE__ */ new WeakMap();
|
|
128
|
+
function ke() {
|
|
129
|
+
B = /* @__PURE__ */ new WeakMap();
|
|
130
130
|
}
|
|
131
131
|
function v(t) {
|
|
132
|
-
const a =
|
|
132
|
+
const a = B.get(t);
|
|
133
133
|
if (a !== void 0) return a;
|
|
134
|
-
const e =
|
|
135
|
-
return
|
|
134
|
+
const e = Ie(t);
|
|
135
|
+
return B.set(t, e), e;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Ie(t) {
|
|
138
138
|
var r, o, s, l, h;
|
|
139
139
|
const a = t.getAttribute("aria-labelledby");
|
|
140
140
|
if (a) {
|
|
@@ -181,7 +181,7 @@ function xe(t) {
|
|
|
181
181
|
}
|
|
182
182
|
return t instanceof HTMLImageElement || t instanceof HTMLAreaElement ? ((l = t.alt) == null ? void 0 : l.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((h = t.alt) == null ? void 0 : h.trim()) ?? "" : "";
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Te = /* @__PURE__ */ new Set([
|
|
185
185
|
"alert",
|
|
186
186
|
"alertdialog",
|
|
187
187
|
"application",
|
|
@@ -265,34 +265,36 @@ const Se = /* @__PURE__ */ new Set([
|
|
|
265
265
|
"treegrid",
|
|
266
266
|
"treeitem"
|
|
267
267
|
]);
|
|
268
|
-
function
|
|
268
|
+
function Ee(t) {
|
|
269
269
|
const a = t.trim().toLowerCase().replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "");
|
|
270
|
-
return
|
|
270
|
+
return Te.has(a);
|
|
271
271
|
}
|
|
272
272
|
function T(t) {
|
|
273
273
|
let a = t;
|
|
274
274
|
for (; a; ) {
|
|
275
|
-
if (
|
|
276
|
-
if (typeof getComputedStyle == "function") {
|
|
277
|
-
const e = getComputedStyle(a);
|
|
278
|
-
if (e.display === "none" || e.visibility === "hidden") return !0;
|
|
279
|
-
} else if (a instanceof HTMLElement && a.style.display === "none") return !0;
|
|
275
|
+
if (pe(a)) return !0;
|
|
280
276
|
a = a.parentElement;
|
|
281
277
|
}
|
|
282
278
|
return !1;
|
|
283
279
|
}
|
|
284
|
-
let
|
|
285
|
-
function
|
|
286
|
-
|
|
280
|
+
let _ = /* @__PURE__ */ new WeakMap();
|
|
281
|
+
function Ce() {
|
|
282
|
+
_ = /* @__PURE__ */ new WeakMap();
|
|
287
283
|
}
|
|
288
284
|
function g(t) {
|
|
289
|
-
const a =
|
|
285
|
+
const a = _.get(t);
|
|
290
286
|
if (a !== void 0) return a;
|
|
291
287
|
let e;
|
|
292
|
-
return t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none") ? e = !0 : t.parentElement ? e = g(t.parentElement) : e = !1,
|
|
288
|
+
return t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none") ? e = !0 : t.parentElement ? e = g(t.parentElement) : e = !1, _.set(t, e), e;
|
|
293
289
|
}
|
|
294
|
-
function
|
|
295
|
-
|
|
290
|
+
function pe(t) {
|
|
291
|
+
if (t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && t.hidden) return !0;
|
|
292
|
+
if (typeof getComputedStyle == "function") {
|
|
293
|
+
const a = getComputedStyle(t);
|
|
294
|
+
if (a.display === "none" || a.visibility === "hidden") return !0;
|
|
295
|
+
} else if (t instanceof HTMLElement && t.style.display === "none")
|
|
296
|
+
return !0;
|
|
297
|
+
return !1;
|
|
296
298
|
}
|
|
297
299
|
function A(t) {
|
|
298
300
|
var e, i, n, r, o;
|
|
@@ -302,7 +304,7 @@ function A(t) {
|
|
|
302
304
|
a += s.textContent ?? "";
|
|
303
305
|
else if (s.nodeType === 1) {
|
|
304
306
|
const l = s;
|
|
305
|
-
if (!
|
|
307
|
+
if (!pe(l)) {
|
|
306
308
|
const h = (e = l.tagName) == null ? void 0 : e.toLowerCase();
|
|
307
309
|
if (h === "img" || h === "area") {
|
|
308
310
|
const c = l.getAttribute("aria-labelledby");
|
|
@@ -330,14 +332,14 @@ function A(t) {
|
|
|
330
332
|
}
|
|
331
333
|
return a;
|
|
332
334
|
}
|
|
333
|
-
let
|
|
334
|
-
function
|
|
335
|
-
|
|
335
|
+
let P = /* @__PURE__ */ new WeakMap();
|
|
336
|
+
function Le() {
|
|
337
|
+
P = /* @__PURE__ */ new WeakMap();
|
|
336
338
|
}
|
|
337
|
-
function
|
|
339
|
+
function qe(t) {
|
|
338
340
|
return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
339
341
|
}
|
|
340
|
-
const
|
|
342
|
+
const Re = [
|
|
341
343
|
"data-testid",
|
|
342
344
|
"data-test-id",
|
|
343
345
|
"data-cy",
|
|
@@ -347,12 +349,12 @@ const Le = [
|
|
|
347
349
|
"for",
|
|
348
350
|
"aria-label"
|
|
349
351
|
];
|
|
350
|
-
function
|
|
352
|
+
function Ne(t) {
|
|
351
353
|
const a = t.tagName.toLowerCase();
|
|
352
|
-
for (const i of
|
|
354
|
+
for (const i of Re) {
|
|
353
355
|
const n = t.getAttribute(i);
|
|
354
356
|
if (n != null && n.length > 0 && n.length < 100)
|
|
355
|
-
return `${a}[${i}="${
|
|
357
|
+
return `${a}[${i}="${qe(n)}"]`;
|
|
356
358
|
}
|
|
357
359
|
const e = t.parentElement;
|
|
358
360
|
if (e) {
|
|
@@ -373,7 +375,7 @@ function H(t) {
|
|
|
373
375
|
i.unshift(`#${CSS.escape(n.id)}`);
|
|
374
376
|
break;
|
|
375
377
|
}
|
|
376
|
-
if (i.unshift(
|
|
378
|
+
if (i.unshift(Ne(n)), i.length >= 2) {
|
|
377
379
|
const r = i.join(" > ");
|
|
378
380
|
try {
|
|
379
381
|
const o = a.querySelectorAll(r);
|
|
@@ -387,7 +389,7 @@ function H(t) {
|
|
|
387
389
|
}
|
|
388
390
|
function m(t) {
|
|
389
391
|
var r;
|
|
390
|
-
const a =
|
|
392
|
+
const a = P.get(t);
|
|
391
393
|
if (a !== void 0) return a;
|
|
392
394
|
const e = [];
|
|
393
395
|
let i = t;
|
|
@@ -406,9 +408,9 @@ function m(t) {
|
|
|
406
408
|
}
|
|
407
409
|
}
|
|
408
410
|
const n = e.map((o, s) => (s === 0 ? "" : o.delimiter) + o.selector).join("");
|
|
409
|
-
return
|
|
411
|
+
return P.set(t, n), n;
|
|
410
412
|
}
|
|
411
|
-
function
|
|
413
|
+
function Ri(t) {
|
|
412
414
|
const a = [], e = [];
|
|
413
415
|
let i = t;
|
|
414
416
|
for (; i; ) {
|
|
@@ -445,7 +447,7 @@ function d(t) {
|
|
|
445
447
|
const a = t.outerHTML;
|
|
446
448
|
return a.length > 200 ? a.slice(0, 200) + "..." : a;
|
|
447
449
|
}
|
|
448
|
-
const
|
|
450
|
+
const $e = /* @__PURE__ */ new Set([
|
|
449
451
|
"aria-activedescendant",
|
|
450
452
|
"aria-atomic",
|
|
451
453
|
"aria-autocomplete",
|
|
@@ -499,7 +501,7 @@ const Re = /* @__PURE__ */ new Set([
|
|
|
499
501
|
"aria-valuemin",
|
|
500
502
|
"aria-valuenow",
|
|
501
503
|
"aria-valuetext"
|
|
502
|
-
]),
|
|
504
|
+
]), X = /* @__PURE__ */ new Set([
|
|
503
505
|
"aria-atomic",
|
|
504
506
|
"aria-busy",
|
|
505
507
|
"aria-disabled",
|
|
@@ -510,7 +512,7 @@ const Re = /* @__PURE__ */ new Set([
|
|
|
510
512
|
"aria-multiselectable",
|
|
511
513
|
"aria-readonly",
|
|
512
514
|
"aria-required"
|
|
513
|
-
]),
|
|
515
|
+
]), K = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), Me = /* @__PURE__ */ new Set([
|
|
514
516
|
"aria-colcount",
|
|
515
517
|
"aria-colindex",
|
|
516
518
|
"aria-colspan",
|
|
@@ -520,11 +522,11 @@ const Re = /* @__PURE__ */ new Set([
|
|
|
520
522
|
"aria-rowindex",
|
|
521
523
|
"aria-rowspan",
|
|
522
524
|
"aria-setsize"
|
|
523
|
-
]),
|
|
525
|
+
]), He = /* @__PURE__ */ new Set([
|
|
524
526
|
"aria-valuemax",
|
|
525
527
|
"aria-valuemin",
|
|
526
528
|
"aria-valuenow"
|
|
527
|
-
]),
|
|
529
|
+
]), J = {
|
|
528
530
|
"aria-autocomplete": /* @__PURE__ */ new Set(["inline", "list", "both", "none"]),
|
|
529
531
|
"aria-expanded": /* @__PURE__ */ new Set(["true", "false", "undefined"]),
|
|
530
532
|
"aria-current": /* @__PURE__ */ new Set(["page", "step", "location", "date", "time", "true", "false"]),
|
|
@@ -535,7 +537,7 @@ const Re = /* @__PURE__ */ new Set([
|
|
|
535
537
|
"aria-orientation": /* @__PURE__ */ new Set(["horizontal", "vertical", "undefined"]),
|
|
536
538
|
"aria-relevant": /* @__PURE__ */ new Set(["additions", "all", "removals", "text"]),
|
|
537
539
|
"aria-sort": /* @__PURE__ */ new Set(["ascending", "descending", "none", "other"])
|
|
538
|
-
},
|
|
540
|
+
}, Q = /* @__PURE__ */ new Set([
|
|
539
541
|
"caption",
|
|
540
542
|
"code",
|
|
541
543
|
"deletion",
|
|
@@ -552,7 +554,7 @@ const Re = /* @__PURE__ */ new Set([
|
|
|
552
554
|
"suggestion",
|
|
553
555
|
"term",
|
|
554
556
|
"time"
|
|
555
|
-
]),
|
|
557
|
+
]), De = {
|
|
556
558
|
abbr: !0,
|
|
557
559
|
bdi: !0,
|
|
558
560
|
bdo: !0,
|
|
@@ -580,7 +582,7 @@ const Re = /* @__PURE__ */ new Set([
|
|
|
580
582
|
u: !0,
|
|
581
583
|
var: !0,
|
|
582
584
|
wbr: !0
|
|
583
|
-
},
|
|
585
|
+
}, Fe = {
|
|
584
586
|
alert: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
|
|
585
587
|
article: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
|
|
586
588
|
banner: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
|
|
@@ -614,10 +616,10 @@ const Re = /* @__PURE__ */ new Set([
|
|
|
614
616
|
tooltip: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"])
|
|
615
617
|
};
|
|
616
618
|
let C = null, L = null;
|
|
617
|
-
function
|
|
619
|
+
function We() {
|
|
618
620
|
C = null, L = null;
|
|
619
621
|
}
|
|
620
|
-
function
|
|
622
|
+
function G(t) {
|
|
621
623
|
var n;
|
|
622
624
|
if (L && (C == null ? void 0 : C.deref()) === t) return L;
|
|
623
625
|
const a = [], e = [], i = [];
|
|
@@ -632,7 +634,7 @@ function U(t) {
|
|
|
632
634
|
let s, l;
|
|
633
635
|
const h = () => (s === void 0 && (s = m(r), l = d(r)), { selector: s, html: l });
|
|
634
636
|
for (const c of r.attributes)
|
|
635
|
-
if (c.name.startsWith("aria-") &&
|
|
637
|
+
if (c.name.startsWith("aria-") && !$e.has(c.name)) {
|
|
636
638
|
const u = h();
|
|
637
639
|
a.push({
|
|
638
640
|
ruleId: "aria-valid-attr",
|
|
@@ -646,8 +648,8 @@ function U(t) {
|
|
|
646
648
|
for (const c of r.attributes) {
|
|
647
649
|
if (!c.name.startsWith("aria-")) continue;
|
|
648
650
|
const u = c.value.trim();
|
|
649
|
-
if (!(u === "" && !
|
|
650
|
-
if (
|
|
651
|
+
if (!(u === "" && !X.has(c.name) && !K.has(c.name))) {
|
|
652
|
+
if (X.has(c.name)) {
|
|
651
653
|
if (u !== "true" && u !== "false") {
|
|
652
654
|
const p = h();
|
|
653
655
|
e.push({
|
|
@@ -658,7 +660,7 @@ function U(t) {
|
|
|
658
660
|
message: `${c.name} must be "true" or "false", got "${u}".`
|
|
659
661
|
});
|
|
660
662
|
}
|
|
661
|
-
} else if (
|
|
663
|
+
} else if (K.has(c.name)) {
|
|
662
664
|
if (u !== "true" && u !== "false" && u !== "mixed") {
|
|
663
665
|
const p = h();
|
|
664
666
|
e.push({
|
|
@@ -669,7 +671,7 @@ function U(t) {
|
|
|
669
671
|
message: `${c.name} must be "true", "false", or "mixed", got "${u}".`
|
|
670
672
|
});
|
|
671
673
|
}
|
|
672
|
-
} else if (
|
|
674
|
+
} else if (Me.has(c.name)) {
|
|
673
675
|
if (u === "" || !/^-?\d+$/.test(u)) {
|
|
674
676
|
const p = h();
|
|
675
677
|
e.push({
|
|
@@ -680,7 +682,7 @@ function U(t) {
|
|
|
680
682
|
message: `${c.name} must be an integer, got "${u}".`
|
|
681
683
|
});
|
|
682
684
|
}
|
|
683
|
-
} else if (
|
|
685
|
+
} else if (He.has(c.name)) {
|
|
684
686
|
if (u === "" || isNaN(Number(u))) {
|
|
685
687
|
const p = h();
|
|
686
688
|
e.push({
|
|
@@ -691,10 +693,10 @@ function U(t) {
|
|
|
691
693
|
message: `${c.name} must be a number, got "${u}".`
|
|
692
694
|
});
|
|
693
695
|
}
|
|
694
|
-
} else if (
|
|
696
|
+
} else if (J[c.name]) {
|
|
695
697
|
const p = u.split(/\s+/);
|
|
696
698
|
for (const b of p)
|
|
697
|
-
if (!
|
|
699
|
+
if (!J[c.name].has(b)) {
|
|
698
700
|
const f = h();
|
|
699
701
|
e.push({
|
|
700
702
|
ruleId: "aria-valid-attr-value",
|
|
@@ -710,7 +712,7 @@ function U(t) {
|
|
|
710
712
|
}
|
|
711
713
|
if (!g(r)) {
|
|
712
714
|
const c = (n = r.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase(), u = r.tagName.toLowerCase();
|
|
713
|
-
if (!c &&
|
|
715
|
+
if (!c && De[u]) {
|
|
714
716
|
const p = r.hasAttribute("aria-label"), b = r.hasAttribute("aria-labelledby");
|
|
715
717
|
if (p || b) {
|
|
716
718
|
const f = h();
|
|
@@ -723,7 +725,7 @@ function U(t) {
|
|
|
723
725
|
});
|
|
724
726
|
}
|
|
725
727
|
} else if (c) {
|
|
726
|
-
if (
|
|
728
|
+
if (Q.has(c)) {
|
|
727
729
|
const b = r.hasAttribute("aria-label"), f = r.hasAttribute("aria-labelledby");
|
|
728
730
|
if (b || f) {
|
|
729
731
|
const y = h();
|
|
@@ -736,11 +738,11 @@ function U(t) {
|
|
|
736
738
|
});
|
|
737
739
|
}
|
|
738
740
|
}
|
|
739
|
-
const p =
|
|
741
|
+
const p = Fe[c];
|
|
740
742
|
if (p) {
|
|
741
743
|
for (const b of r.attributes)
|
|
742
744
|
if (b.name.startsWith("aria-") && p.has(b.name)) {
|
|
743
|
-
if ((b.name === "aria-label" || b.name === "aria-labelledby") &&
|
|
745
|
+
if ((b.name === "aria-label" || b.name === "aria-labelledby") && Q.has(c))
|
|
744
746
|
continue;
|
|
745
747
|
const f = h();
|
|
746
748
|
i.push({
|
|
@@ -757,13 +759,13 @@ function U(t) {
|
|
|
757
759
|
}
|
|
758
760
|
return C = new WeakRef(t), L = { validAttr: a, validAttrValue: e, prohibitedAttr: i }, L;
|
|
759
761
|
}
|
|
760
|
-
let
|
|
762
|
+
let j = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap();
|
|
761
763
|
function Oe() {
|
|
762
|
-
|
|
764
|
+
j = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap();
|
|
763
765
|
}
|
|
764
766
|
function w(t) {
|
|
765
|
-
let a =
|
|
766
|
-
return a || (a = getComputedStyle(t),
|
|
767
|
+
let a = j.get(t);
|
|
768
|
+
return a || (a = getComputedStyle(t), j.set(t, a), a);
|
|
767
769
|
}
|
|
768
770
|
function R(t, a, e) {
|
|
769
771
|
const [i, n, r] = [t, a, e].map((o) => {
|
|
@@ -772,11 +774,11 @@ function R(t, a, e) {
|
|
|
772
774
|
});
|
|
773
775
|
return 0.2126 * i + 0.7152 * n + 0.0722 * r;
|
|
774
776
|
}
|
|
775
|
-
function
|
|
777
|
+
function ge(t, a) {
|
|
776
778
|
const e = Math.max(t, a), i = Math.min(t, a);
|
|
777
779
|
return (e + 0.05) / (i + 0.05);
|
|
778
780
|
}
|
|
779
|
-
const
|
|
781
|
+
const Z = {
|
|
780
782
|
black: [0, 0, 0],
|
|
781
783
|
white: [255, 255, 255],
|
|
782
784
|
red: [255, 0, 0],
|
|
@@ -798,7 +800,7 @@ const Q = {
|
|
|
798
800
|
};
|
|
799
801
|
function N(t) {
|
|
800
802
|
const a = t.trim().toLowerCase();
|
|
801
|
-
if (
|
|
803
|
+
if (Z[a]) return Z[a];
|
|
802
804
|
const e = a.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/);
|
|
803
805
|
if (e)
|
|
804
806
|
return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)];
|
|
@@ -816,12 +818,12 @@ function N(t) {
|
|
|
816
818
|
return r ? [parseInt(r[1]), parseInt(r[2]), parseInt(r[3])] : null;
|
|
817
819
|
}
|
|
818
820
|
function Be(t) {
|
|
819
|
-
const a =
|
|
821
|
+
const a = V.get(t);
|
|
820
822
|
if (a !== void 0) return a;
|
|
821
|
-
const e =
|
|
822
|
-
return
|
|
823
|
+
const e = _e(t);
|
|
824
|
+
return V.set(t, e), e;
|
|
823
825
|
}
|
|
824
|
-
function
|
|
826
|
+
function _e(t) {
|
|
825
827
|
let a = t;
|
|
826
828
|
for (; a; ) {
|
|
827
829
|
const e = w(a), i = e.backgroundImage;
|
|
@@ -840,20 +842,20 @@ function Fe(t) {
|
|
|
840
842
|
}
|
|
841
843
|
return [255, 255, 255];
|
|
842
844
|
}
|
|
843
|
-
const
|
|
844
|
-
function
|
|
845
|
-
const a =
|
|
845
|
+
const Pe = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
|
|
846
|
+
function je(t) {
|
|
847
|
+
const a = z.get(t);
|
|
846
848
|
if (a !== void 0) return a;
|
|
847
|
-
const e =
|
|
848
|
-
return
|
|
849
|
+
const e = Ve(t);
|
|
850
|
+
return z.set(t, e), e;
|
|
849
851
|
}
|
|
850
|
-
function
|
|
852
|
+
function Ve(t) {
|
|
851
853
|
let a = t, e = !1;
|
|
852
854
|
for (; a; ) {
|
|
853
855
|
const i = w(a).position;
|
|
854
856
|
if ((i === "absolute" || i === "fixed") && (e = !0), a !== t && i !== "static") {
|
|
855
857
|
for (const n of a.children)
|
|
856
|
-
if (!(n === t || n.contains(t)) &&
|
|
858
|
+
if (!(n === t || n.contains(t)) && Pe.has(n.tagName)) {
|
|
857
859
|
if (e) return !0;
|
|
858
860
|
const r = w(n).position;
|
|
859
861
|
if (r === "absolute" || r === "fixed") return !0;
|
|
@@ -864,12 +866,12 @@ function Pe(t) {
|
|
|
864
866
|
}
|
|
865
867
|
return !1;
|
|
866
868
|
}
|
|
867
|
-
function
|
|
869
|
+
function ze(t) {
|
|
868
870
|
const a = parseFloat(t);
|
|
869
871
|
return t.endsWith("pt") ? a * (4 / 3) : a;
|
|
870
872
|
}
|
|
871
|
-
function
|
|
872
|
-
const a = w(t), e =
|
|
873
|
+
function Ue(t) {
|
|
874
|
+
const a = w(t), e = ze(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
|
|
873
875
|
return e >= 23.5 || e >= 18.5 && i >= 700;
|
|
874
876
|
}
|
|
875
877
|
function D(t) {
|
|
@@ -892,7 +894,7 @@ function D(t) {
|
|
|
892
894
|
return a.length > 0 ? a.join(`
|
|
893
895
|
`) : void 0;
|
|
894
896
|
}
|
|
895
|
-
function
|
|
897
|
+
function ee(t) {
|
|
896
898
|
let a = t;
|
|
897
899
|
for (; a; ) {
|
|
898
900
|
if (a instanceof HTMLElement && a.style.visibility === "hidden") return !0;
|
|
@@ -900,7 +902,7 @@ function Z(t) {
|
|
|
900
902
|
}
|
|
901
903
|
return !1;
|
|
902
904
|
}
|
|
903
|
-
const
|
|
905
|
+
const Ge = {
|
|
904
906
|
id: "img-alt",
|
|
905
907
|
wcag: ["1.1.1"],
|
|
906
908
|
level: "A",
|
|
@@ -910,7 +912,7 @@ const ze = {
|
|
|
910
912
|
run(t) {
|
|
911
913
|
const a = [];
|
|
912
914
|
for (const e of t.querySelectorAll("img")) {
|
|
913
|
-
if (g(e) ||
|
|
915
|
+
if (g(e) || ee(e)) continue;
|
|
914
916
|
const i = e.getAttribute("role");
|
|
915
917
|
if (i === "presentation" || i === "none") {
|
|
916
918
|
const r = e.getAttribute("tabindex");
|
|
@@ -938,7 +940,7 @@ const ze = {
|
|
|
938
940
|
});
|
|
939
941
|
}
|
|
940
942
|
for (const e of t.querySelectorAll('[role="img"]:not(img):not(svg)'))
|
|
941
|
-
g(e) ||
|
|
943
|
+
g(e) || ee(e) || v(e) || a.push({
|
|
942
944
|
ruleId: "img-alt",
|
|
943
945
|
selector: m(e),
|
|
944
946
|
html: d(e),
|
|
@@ -949,7 +951,7 @@ const ze = {
|
|
|
949
951
|
return a;
|
|
950
952
|
}
|
|
951
953
|
};
|
|
952
|
-
function
|
|
954
|
+
function Ye(t) {
|
|
953
955
|
var r, o, s;
|
|
954
956
|
const a = t.getAttribute("aria-labelledby");
|
|
955
957
|
if (a) {
|
|
@@ -966,7 +968,7 @@ function Ue(t) {
|
|
|
966
968
|
const n = (s = t.getAttribute("title")) == null ? void 0 : s.trim();
|
|
967
969
|
return n || "";
|
|
968
970
|
}
|
|
969
|
-
const
|
|
971
|
+
const Xe = {
|
|
970
972
|
id: "svg-img-alt",
|
|
971
973
|
wcag: ["1.1.1"],
|
|
972
974
|
level: "A",
|
|
@@ -977,7 +979,7 @@ const Ge = {
|
|
|
977
979
|
const a = [], e = 'svg[role="img"], [role="graphics-document"], [role="graphics-symbol"]';
|
|
978
980
|
for (const i of t.querySelectorAll(e)) {
|
|
979
981
|
if (g(i)) continue;
|
|
980
|
-
if (!
|
|
982
|
+
if (!Ye(i)) {
|
|
981
983
|
const r = i.getAttribute("role");
|
|
982
984
|
a.push({
|
|
983
985
|
ruleId: "svg-img-alt",
|
|
@@ -990,7 +992,7 @@ const Ge = {
|
|
|
990
992
|
}
|
|
991
993
|
return a;
|
|
992
994
|
}
|
|
993
|
-
},
|
|
995
|
+
}, Ke = {
|
|
994
996
|
id: "input-image-alt",
|
|
995
997
|
wcag: ["1.1.1", "4.1.2"],
|
|
996
998
|
level: "A",
|
|
@@ -1009,7 +1011,7 @@ const Ge = {
|
|
|
1009
1011
|
});
|
|
1010
1012
|
return a;
|
|
1011
1013
|
}
|
|
1012
|
-
},
|
|
1014
|
+
}, Je = {
|
|
1013
1015
|
id: "image-redundant-alt",
|
|
1014
1016
|
wcag: [],
|
|
1015
1017
|
level: "A",
|
|
@@ -1041,7 +1043,7 @@ const Ge = {
|
|
|
1041
1043
|
}
|
|
1042
1044
|
return a;
|
|
1043
1045
|
}
|
|
1044
|
-
},
|
|
1046
|
+
}, Qe = ["image", "picture", "photo", "graphic", "icon", "img"], Ze = {
|
|
1045
1047
|
id: "image-alt-redundant-words",
|
|
1046
1048
|
wcag: [],
|
|
1047
1049
|
level: "A",
|
|
@@ -1054,7 +1056,7 @@ const Ge = {
|
|
|
1054
1056
|
for (const e of t.querySelectorAll("img[alt]")) {
|
|
1055
1057
|
const i = e.getAttribute("alt").toLowerCase();
|
|
1056
1058
|
if (!i) continue;
|
|
1057
|
-
const n =
|
|
1059
|
+
const n = Qe.filter((r) => i.split(/\s+/).includes(r));
|
|
1058
1060
|
n.length > 0 && a.push({
|
|
1059
1061
|
ruleId: "image-alt-redundant-words",
|
|
1060
1062
|
selector: m(e),
|
|
@@ -1066,7 +1068,7 @@ const Ge = {
|
|
|
1066
1068
|
}
|
|
1067
1069
|
return a;
|
|
1068
1070
|
}
|
|
1069
|
-
},
|
|
1071
|
+
}, et = {
|
|
1070
1072
|
id: "area-alt",
|
|
1071
1073
|
wcag: ["1.1.1", "4.1.2"],
|
|
1072
1074
|
level: "A",
|
|
@@ -1088,7 +1090,7 @@ const Ge = {
|
|
|
1088
1090
|
return a;
|
|
1089
1091
|
}
|
|
1090
1092
|
};
|
|
1091
|
-
function
|
|
1093
|
+
function tt(t) {
|
|
1092
1094
|
var n, r;
|
|
1093
1095
|
const a = t.getAttribute("aria-labelledby");
|
|
1094
1096
|
if (a) {
|
|
@@ -1103,7 +1105,7 @@ function Ze(t) {
|
|
|
1103
1105
|
const i = (r = t.getAttribute("title")) == null ? void 0 : r.trim();
|
|
1104
1106
|
return i || "";
|
|
1105
1107
|
}
|
|
1106
|
-
const
|
|
1108
|
+
const at = {
|
|
1107
1109
|
id: "object-alt",
|
|
1108
1110
|
wcag: ["1.1.1"],
|
|
1109
1111
|
level: "A",
|
|
@@ -1123,7 +1125,7 @@ const et = {
|
|
|
1123
1125
|
}
|
|
1124
1126
|
n = n.parentElement;
|
|
1125
1127
|
}
|
|
1126
|
-
if (r || i.getAttribute("role") === "presentation" || i.getAttribute("role") === "none" ||
|
|
1128
|
+
if (r || i.getAttribute("role") === "presentation" || i.getAttribute("role") === "none" || tt(i)) continue;
|
|
1127
1129
|
const o = i.getAttribute("data") || "";
|
|
1128
1130
|
if (!((i.getAttribute("type") || "").startsWith("image/") || /\.(png|jpg|jpeg|gif|svg|webp|bmp|ico)$/i.test(o))) {
|
|
1129
1131
|
const h = i.querySelector("img[alt]");
|
|
@@ -1139,7 +1141,7 @@ const et = {
|
|
|
1139
1141
|
}
|
|
1140
1142
|
return a;
|
|
1141
1143
|
}
|
|
1142
|
-
},
|
|
1144
|
+
}, it = {
|
|
1143
1145
|
id: "role-img-alt",
|
|
1144
1146
|
wcag: ["1.1.1"],
|
|
1145
1147
|
level: "A",
|
|
@@ -1161,7 +1163,7 @@ const et = {
|
|
|
1161
1163
|
return a;
|
|
1162
1164
|
}
|
|
1163
1165
|
};
|
|
1164
|
-
function
|
|
1166
|
+
function Ni(t) {
|
|
1165
1167
|
if (typeof t != "object" || t === null)
|
|
1166
1168
|
return "Rule spec must be an object";
|
|
1167
1169
|
const a = t;
|
|
@@ -1191,10 +1193,10 @@ function Ci(t) {
|
|
|
1191
1193
|
return "Rule must have a wcag array";
|
|
1192
1194
|
if (typeof a.level != "string" || !["A", "AA"].includes(a.level))
|
|
1193
1195
|
return "Rule must have level A or AA";
|
|
1194
|
-
const n =
|
|
1196
|
+
const n = nt(e);
|
|
1195
1197
|
return n || null;
|
|
1196
1198
|
}
|
|
1197
|
-
function
|
|
1199
|
+
function nt(t) {
|
|
1198
1200
|
switch (t.type) {
|
|
1199
1201
|
case "selector-exists":
|
|
1200
1202
|
return null;
|
|
@@ -1212,7 +1214,7 @@ function at(t) {
|
|
|
1212
1214
|
return `Unknown check type: ${String(t.type)}`;
|
|
1213
1215
|
}
|
|
1214
1216
|
}
|
|
1215
|
-
function
|
|
1217
|
+
function k(t, a, e) {
|
|
1216
1218
|
let i = t;
|
|
1217
1219
|
if (i.includes("{{tag}}") && (i = i.replace(/\{\{tag\}\}/g, a.tagName.toLowerCase())), i.includes("{{value}}")) {
|
|
1218
1220
|
let n = "";
|
|
@@ -1220,7 +1222,7 @@ function S(t, a, e) {
|
|
|
1220
1222
|
}
|
|
1221
1223
|
return i;
|
|
1222
1224
|
}
|
|
1223
|
-
function
|
|
1225
|
+
function I(t) {
|
|
1224
1226
|
const a = t.skipAriaHidden !== !1;
|
|
1225
1227
|
return {
|
|
1226
1228
|
id: t.id,
|
|
@@ -1241,7 +1243,7 @@ function k(t) {
|
|
|
1241
1243
|
selector: m(o),
|
|
1242
1244
|
html: d(o),
|
|
1243
1245
|
impact: t.impact,
|
|
1244
|
-
message:
|
|
1246
|
+
message: k(t.message, o, t.check),
|
|
1245
1247
|
element: o
|
|
1246
1248
|
});
|
|
1247
1249
|
break;
|
|
@@ -1251,12 +1253,12 @@ function k(t) {
|
|
|
1251
1253
|
for (const h of e.querySelectorAll(t.selector)) {
|
|
1252
1254
|
if (a && g(h)) continue;
|
|
1253
1255
|
const c = h.getAttribute(o);
|
|
1254
|
-
c !== null &&
|
|
1256
|
+
c !== null && rt(c, s, l) && i.push({
|
|
1255
1257
|
ruleId: t.id,
|
|
1256
1258
|
selector: m(h),
|
|
1257
1259
|
html: d(h),
|
|
1258
1260
|
impact: t.impact,
|
|
1259
|
-
message:
|
|
1261
|
+
message: k(t.message, h, t.check),
|
|
1260
1262
|
element: h
|
|
1261
1263
|
});
|
|
1262
1264
|
}
|
|
@@ -1270,7 +1272,7 @@ function k(t) {
|
|
|
1270
1272
|
selector: m(s),
|
|
1271
1273
|
html: d(s),
|
|
1272
1274
|
impact: t.impact,
|
|
1273
|
-
message:
|
|
1275
|
+
message: k(t.message, s, t.check),
|
|
1274
1276
|
element: s
|
|
1275
1277
|
});
|
|
1276
1278
|
break;
|
|
@@ -1293,14 +1295,14 @@ function k(t) {
|
|
|
1293
1295
|
selector: m(u),
|
|
1294
1296
|
html: d(u),
|
|
1295
1297
|
impact: t.impact,
|
|
1296
|
-
message:
|
|
1298
|
+
message: k(t.message, u, t.check),
|
|
1297
1299
|
element: u
|
|
1298
1300
|
}) : !h && b && i.push({
|
|
1299
1301
|
ruleId: t.id,
|
|
1300
1302
|
selector: m(u),
|
|
1301
1303
|
html: d(u),
|
|
1302
1304
|
impact: t.impact,
|
|
1303
|
-
message:
|
|
1305
|
+
message: k(t.message, u, t.check),
|
|
1304
1306
|
element: u
|
|
1305
1307
|
});
|
|
1306
1308
|
}
|
|
@@ -1314,7 +1316,7 @@ function k(t) {
|
|
|
1314
1316
|
selector: m(s),
|
|
1315
1317
|
html: d(s),
|
|
1316
1318
|
impact: t.impact,
|
|
1317
|
-
message:
|
|
1319
|
+
message: k(t.message, s, t.check),
|
|
1318
1320
|
element: s
|
|
1319
1321
|
});
|
|
1320
1322
|
break;
|
|
@@ -1326,18 +1328,36 @@ function k(t) {
|
|
|
1326
1328
|
for (const l of e.querySelectorAll(t.selector)) {
|
|
1327
1329
|
if (a && g(l)) continue;
|
|
1328
1330
|
const h = (n = l.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase();
|
|
1329
|
-
if (
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1331
|
+
if (h === "presentation" || h === "none") continue;
|
|
1332
|
+
let c = !1;
|
|
1333
|
+
const u = t.check.allowedChildren.filter(
|
|
1334
|
+
(p) => p !== "script" && p !== "template"
|
|
1335
|
+
);
|
|
1336
|
+
for (const p of l.childNodes)
|
|
1337
|
+
if (p.nodeType === 3 && p.textContent && p.textContent.trim()) {
|
|
1338
|
+
const b = u.map((f) => `<${f}>`).join(" or ");
|
|
1339
|
+
i.push({
|
|
1340
|
+
ruleId: t.id,
|
|
1341
|
+
selector: m(l),
|
|
1342
|
+
html: d(l),
|
|
1343
|
+
impact: t.impact,
|
|
1344
|
+
message: `<${l.tagName.toLowerCase()}> contains direct text content. Wrap in ${b}.`,
|
|
1345
|
+
element: l
|
|
1346
|
+
}), c = !0;
|
|
1347
|
+
break;
|
|
1348
|
+
}
|
|
1349
|
+
if (!c)
|
|
1350
|
+
for (const p of l.children) {
|
|
1351
|
+
if (o.has(p.tagName.toLowerCase())) continue;
|
|
1352
|
+
const b = (r = p.getAttribute("role")) == null ? void 0 : r.trim().toLowerCase();
|
|
1353
|
+
if (!(b && (s != null && s.has(b))) && !(b === "presentation" || b === "none")) {
|
|
1334
1354
|
i.push({
|
|
1335
1355
|
ruleId: t.id,
|
|
1336
|
-
selector: m(
|
|
1337
|
-
html: d(
|
|
1356
|
+
selector: m(p),
|
|
1357
|
+
html: d(p),
|
|
1338
1358
|
impact: t.impact,
|
|
1339
|
-
message:
|
|
1340
|
-
element:
|
|
1359
|
+
message: k(t.message, p, t.check),
|
|
1360
|
+
element: p
|
|
1341
1361
|
});
|
|
1342
1362
|
break;
|
|
1343
1363
|
}
|
|
@@ -1350,7 +1370,7 @@ function k(t) {
|
|
|
1350
1370
|
}
|
|
1351
1371
|
};
|
|
1352
1372
|
}
|
|
1353
|
-
function
|
|
1373
|
+
function rt(t, a, e) {
|
|
1354
1374
|
switch (a) {
|
|
1355
1375
|
case ">":
|
|
1356
1376
|
return parseFloat(t) > e;
|
|
@@ -1368,7 +1388,7 @@ function it(t, a, e) {
|
|
|
1368
1388
|
return !1;
|
|
1369
1389
|
}
|
|
1370
1390
|
}
|
|
1371
|
-
const
|
|
1391
|
+
const ot = {
|
|
1372
1392
|
id: "server-side-image-map",
|
|
1373
1393
|
selector: "img[ismap], input[type='image'][ismap]",
|
|
1374
1394
|
check: { type: "selector-exists" },
|
|
@@ -1379,7 +1399,7 @@ const nt = {
|
|
|
1379
1399
|
level: "A",
|
|
1380
1400
|
guidance: "Server-side image maps (using ismap attribute) send click coordinates to the server, which is inaccessible to keyboard users and screen readers who can't precisely click specific regions. Replace with client-side image maps (<map> with <area> elements) that provide keyboard access and accessible names, or use linked images/buttons instead.",
|
|
1381
1401
|
prompt: "Explain that the ismap attribute should be removed and the functionality replaced with a client-side <map> element with <area> children, or separate linked images/buttons."
|
|
1382
|
-
},
|
|
1402
|
+
}, st = I(ot), lt = [
|
|
1383
1403
|
'[role="checkbox"]',
|
|
1384
1404
|
'[role="combobox"]',
|
|
1385
1405
|
'[role="listbox"]',
|
|
@@ -1391,13 +1411,13 @@ const nt = {
|
|
|
1391
1411
|
'[role="spinbutton"]',
|
|
1392
1412
|
'[role="switch"]',
|
|
1393
1413
|
'[role="textbox"]'
|
|
1394
|
-
].join(", "),
|
|
1414
|
+
].join(", "), ct = /* @__PURE__ */ new Set([
|
|
1395
1415
|
"checkbox",
|
|
1396
1416
|
"menuitemcheckbox",
|
|
1397
1417
|
"menuitemradio",
|
|
1398
1418
|
"radio",
|
|
1399
1419
|
"switch"
|
|
1400
|
-
]),
|
|
1420
|
+
]), ut = /* @__PURE__ */ new Set([
|
|
1401
1421
|
"combobox",
|
|
1402
1422
|
"listbox",
|
|
1403
1423
|
"searchbox",
|
|
@@ -1405,10 +1425,10 @@ const nt = {
|
|
|
1405
1425
|
"spinbutton",
|
|
1406
1426
|
"textbox"
|
|
1407
1427
|
]);
|
|
1408
|
-
function
|
|
1428
|
+
function dt(t) {
|
|
1409
1429
|
var o, s, l, h;
|
|
1410
1430
|
const a = (o = t.getAttribute("role")) == null ? void 0 : o.trim().toLowerCase();
|
|
1411
|
-
if (a &&
|
|
1431
|
+
if (a && ct.has(a) || (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && !(a && ut.has(a)))
|
|
1412
1432
|
return v(t);
|
|
1413
1433
|
const i = t.getAttribute("aria-labelledby");
|
|
1414
1434
|
if (i) {
|
|
@@ -1442,7 +1462,7 @@ function ct(t) {
|
|
|
1442
1462
|
}
|
|
1443
1463
|
return "";
|
|
1444
1464
|
}
|
|
1445
|
-
const
|
|
1465
|
+
const mt = {
|
|
1446
1466
|
id: "label",
|
|
1447
1467
|
wcag: ["4.1.2"],
|
|
1448
1468
|
level: "A",
|
|
@@ -1451,12 +1471,12 @@ const ut = {
|
|
|
1451
1471
|
prompt: `This form field has no accessible label. Based on the context (input type, name attribute, placeholder, or surrounding elements), suggest adding a <label for="id"> element with descriptive text, or an aria-label attribute. The label should describe what information the user should enter, not the field type. For example: 'Email address', 'Search', 'Phone number'.`,
|
|
1452
1472
|
run(t) {
|
|
1453
1473
|
var n;
|
|
1454
|
-
const a = [], i = t.querySelectorAll(`input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, ${
|
|
1474
|
+
const a = [], i = t.querySelectorAll(`input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, ${lt}`);
|
|
1455
1475
|
for (const r of i) {
|
|
1456
1476
|
if (g(r) || T(r) || (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement || r instanceof HTMLButtonElement) && r.disabled || r.closest("fieldset[disabled]") || r.getAttribute("aria-disabled") === "true") continue;
|
|
1457
1477
|
const o = (n = r.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase();
|
|
1458
1478
|
if (o === "presentation" || o === "none") continue;
|
|
1459
|
-
if (!
|
|
1479
|
+
if (!dt(r)) {
|
|
1460
1480
|
const l = [], h = r.tagName.toLowerCase(), c = r.getAttribute("type");
|
|
1461
1481
|
c && h === "input" && l.push(`type: ${c}`);
|
|
1462
1482
|
const u = r.getAttribute("name");
|
|
@@ -1476,7 +1496,7 @@ const ut = {
|
|
|
1476
1496
|
}
|
|
1477
1497
|
return a;
|
|
1478
1498
|
}
|
|
1479
|
-
},
|
|
1499
|
+
}, ht = {
|
|
1480
1500
|
id: "form-field-multiple-labels",
|
|
1481
1501
|
wcag: [],
|
|
1482
1502
|
level: "A",
|
|
@@ -1508,7 +1528,7 @@ const ut = {
|
|
|
1508
1528
|
}
|
|
1509
1529
|
return a;
|
|
1510
1530
|
}
|
|
1511
|
-
},
|
|
1531
|
+
}, pt = {
|
|
1512
1532
|
id: "select-name",
|
|
1513
1533
|
wcag: ["4.1.2"],
|
|
1514
1534
|
level: "A",
|
|
@@ -1527,7 +1547,7 @@ const ut = {
|
|
|
1527
1547
|
});
|
|
1528
1548
|
return a;
|
|
1529
1549
|
}
|
|
1530
|
-
},
|
|
1550
|
+
}, gt = {
|
|
1531
1551
|
id: "input-button-name",
|
|
1532
1552
|
wcag: ["4.1.2"],
|
|
1533
1553
|
level: "A",
|
|
@@ -1552,7 +1572,7 @@ const ut = {
|
|
|
1552
1572
|
}
|
|
1553
1573
|
return a;
|
|
1554
1574
|
}
|
|
1555
|
-
},
|
|
1575
|
+
}, bt = /* @__PURE__ */ new Set([
|
|
1556
1576
|
"off",
|
|
1557
1577
|
"on",
|
|
1558
1578
|
"name",
|
|
@@ -1607,7 +1627,7 @@ const ut = {
|
|
|
1607
1627
|
"impp",
|
|
1608
1628
|
"url",
|
|
1609
1629
|
"photo"
|
|
1610
|
-
]),
|
|
1630
|
+
]), ft = /* @__PURE__ */ new Set([
|
|
1611
1631
|
"tel",
|
|
1612
1632
|
"tel-country-code",
|
|
1613
1633
|
"tel-national",
|
|
@@ -1616,18 +1636,18 @@ const ut = {
|
|
|
1616
1636
|
"tel-extension",
|
|
1617
1637
|
"email",
|
|
1618
1638
|
"impp"
|
|
1619
|
-
]),
|
|
1620
|
-
function
|
|
1639
|
+
]), vt = /* @__PURE__ */ new Set(["home", "work", "mobile", "fax", "pager"]), yt = /* @__PURE__ */ new Set(["shipping", "billing"]), wt = /* @__PURE__ */ new Set(["webauthn"]);
|
|
1640
|
+
function At(t) {
|
|
1621
1641
|
const a = t.toLowerCase().split(/\s+/).filter(Boolean);
|
|
1622
1642
|
if (a.length === 0) return !0;
|
|
1623
1643
|
let e = 0;
|
|
1624
|
-
a[e].startsWith("section-") && e++, e < a.length &&
|
|
1644
|
+
a[e].startsWith("section-") && e++, e < a.length && yt.has(a[e]) && e++;
|
|
1625
1645
|
let i = !1;
|
|
1626
|
-
if (e < a.length &&
|
|
1646
|
+
if (e < a.length && vt.has(a[e]) && (i = !0, e++), e >= a.length) return !1;
|
|
1627
1647
|
const n = a[e];
|
|
1628
|
-
return !
|
|
1648
|
+
return !bt.has(n) || i && !ft.has(n) ? !1 : (e++, e < a.length && wt.has(a[e]) && e++, e === a.length);
|
|
1629
1649
|
}
|
|
1630
|
-
const
|
|
1650
|
+
const xt = {
|
|
1631
1651
|
id: "autocomplete-valid",
|
|
1632
1652
|
wcag: ["1.3.5"],
|
|
1633
1653
|
level: "AA",
|
|
@@ -1639,7 +1659,7 @@ const wt = {
|
|
|
1639
1659
|
for (const e of t.querySelectorAll("[autocomplete]")) {
|
|
1640
1660
|
if (g(e) || e instanceof HTMLElement && e.style.display === "none" || e.disabled || e.getAttribute("aria-disabled") === "true") continue;
|
|
1641
1661
|
const i = e.getAttribute("autocomplete").trim();
|
|
1642
|
-
i && (
|
|
1662
|
+
i && (At(i) || a.push({
|
|
1643
1663
|
ruleId: "autocomplete-valid",
|
|
1644
1664
|
selector: m(e),
|
|
1645
1665
|
html: d(e),
|
|
@@ -1650,16 +1670,16 @@ const wt = {
|
|
|
1650
1670
|
return a;
|
|
1651
1671
|
}
|
|
1652
1672
|
};
|
|
1653
|
-
function
|
|
1673
|
+
function te(t) {
|
|
1654
1674
|
return t.toLowerCase().replace(/\s+/g, " ").trim();
|
|
1655
1675
|
}
|
|
1656
|
-
function
|
|
1657
|
-
const e =
|
|
1676
|
+
function ae(t, a) {
|
|
1677
|
+
const e = te(t), i = te(a);
|
|
1658
1678
|
if (!e || !i || e.includes(i) || i.includes(e)) return !0;
|
|
1659
1679
|
const n = i.split(/\s+/).map((r) => r.replace(/[.,;:!?\u2026]+$/g, "")).filter((r) => r.length > 2);
|
|
1660
1680
|
return n.length >= 2 && n.filter((o) => e.includes(o)).length / n.length > 0.5;
|
|
1661
1681
|
}
|
|
1662
|
-
function
|
|
1682
|
+
function U(t) {
|
|
1663
1683
|
let a = "";
|
|
1664
1684
|
for (const e of t.childNodes)
|
|
1665
1685
|
if (e.nodeType === 3)
|
|
@@ -1669,11 +1689,11 @@ function z(t) {
|
|
|
1669
1689
|
if (n === "style" || n === "script" || n === "svg" || i.getAttribute("aria-hidden") === "true" || i instanceof HTMLElement && i.style.display === "none") continue;
|
|
1670
1690
|
const r = i.getAttribute("role");
|
|
1671
1691
|
if (r === "img" || r === "presentation" || r === "none") continue;
|
|
1672
|
-
a +=
|
|
1692
|
+
a += U(i);
|
|
1673
1693
|
}
|
|
1674
1694
|
return a;
|
|
1675
1695
|
}
|
|
1676
|
-
const
|
|
1696
|
+
const St = {
|
|
1677
1697
|
id: "label-content-name-mismatch",
|
|
1678
1698
|
wcag: [],
|
|
1679
1699
|
level: "A",
|
|
@@ -1688,11 +1708,11 @@ const At = {
|
|
|
1688
1708
|
const i = v(e);
|
|
1689
1709
|
if (!i) continue;
|
|
1690
1710
|
let n = "";
|
|
1691
|
-
e instanceof HTMLInputElement ? n = e.value || "" : n =
|
|
1711
|
+
e instanceof HTMLInputElement ? n = e.value || "" : n = U(e);
|
|
1692
1712
|
const r = n.trim();
|
|
1693
1713
|
if (!r || r.length <= 2) continue;
|
|
1694
1714
|
const o = e.hasAttribute("aria-label"), s = e.hasAttribute("aria-labelledby");
|
|
1695
|
-
!o && !s ||
|
|
1715
|
+
!o && !s || ae(i, n) || a.push({
|
|
1696
1716
|
ruleId: "label-content-name-mismatch",
|
|
1697
1717
|
selector: m(e),
|
|
1698
1718
|
html: d(e),
|
|
@@ -1708,9 +1728,9 @@ const At = {
|
|
|
1708
1728
|
let o = "";
|
|
1709
1729
|
if (r) {
|
|
1710
1730
|
const s = t.querySelector(`label[for="${CSS.escape(r)}"]`);
|
|
1711
|
-
s && (o =
|
|
1731
|
+
s && (o = U(s));
|
|
1712
1732
|
}
|
|
1713
|
-
o.trim() && (
|
|
1733
|
+
o.trim() && (ae(i, o) || a.push({
|
|
1714
1734
|
ruleId: "label-content-name-mismatch",
|
|
1715
1735
|
selector: m(e),
|
|
1716
1736
|
html: d(e),
|
|
@@ -1720,7 +1740,7 @@ const At = {
|
|
|
1720
1740
|
}
|
|
1721
1741
|
return a;
|
|
1722
1742
|
}
|
|
1723
|
-
},
|
|
1743
|
+
}, kt = {
|
|
1724
1744
|
id: "label-title-only",
|
|
1725
1745
|
wcag: [],
|
|
1726
1746
|
level: "A",
|
|
@@ -1753,7 +1773,7 @@ const At = {
|
|
|
1753
1773
|
}
|
|
1754
1774
|
return a;
|
|
1755
1775
|
}
|
|
1756
|
-
},
|
|
1776
|
+
}, It = {
|
|
1757
1777
|
id: "tabindex",
|
|
1758
1778
|
selector: "[tabindex]",
|
|
1759
1779
|
check: { type: "attribute-value", attribute: "tabindex", operator: ">", value: 0 },
|
|
@@ -1765,7 +1785,7 @@ const At = {
|
|
|
1765
1785
|
tags: ["best-practice"],
|
|
1766
1786
|
guidance: "Positive tabindex values force elements to the front of the tab order regardless of DOM position, creating unpredictable navigation for keyboard users. Use tabindex='0' to add elements to the natural tab order, or tabindex='-1' to make elements programmatically focusable but not in tab order. Rely on DOM order for tab sequence.",
|
|
1767
1787
|
prompt: "Change the positive tabindex value to tabindex='0' and rely on DOM order for tab sequence instead."
|
|
1768
|
-
},
|
|
1788
|
+
}, Tt = I(It), Et = /* @__PURE__ */ new Set([
|
|
1769
1789
|
"div",
|
|
1770
1790
|
"span",
|
|
1771
1791
|
"p",
|
|
@@ -1792,7 +1812,7 @@ const At = {
|
|
|
1792
1812
|
"tr",
|
|
1793
1813
|
"td",
|
|
1794
1814
|
"th"
|
|
1795
|
-
]),
|
|
1815
|
+
]), Ct = {
|
|
1796
1816
|
id: "focus-order-semantics",
|
|
1797
1817
|
wcag: [],
|
|
1798
1818
|
tags: ["best-practice"],
|
|
@@ -1804,7 +1824,7 @@ const At = {
|
|
|
1804
1824
|
const a = [];
|
|
1805
1825
|
for (const e of t.querySelectorAll('[tabindex="0"]')) {
|
|
1806
1826
|
const i = e.tagName.toLowerCase();
|
|
1807
|
-
if (!
|
|
1827
|
+
if (!Et.has(i)) continue;
|
|
1808
1828
|
e.getAttribute("role") || a.push({
|
|
1809
1829
|
ruleId: "focus-order-semantics",
|
|
1810
1830
|
selector: m(e),
|
|
@@ -1815,7 +1835,7 @@ const At = {
|
|
|
1815
1835
|
}
|
|
1816
1836
|
return a;
|
|
1817
1837
|
}
|
|
1818
|
-
},
|
|
1838
|
+
}, Lt = /* @__PURE__ */ new Set([
|
|
1819
1839
|
"a",
|
|
1820
1840
|
"audio",
|
|
1821
1841
|
"button",
|
|
@@ -1824,7 +1844,7 @@ const At = {
|
|
|
1824
1844
|
"select",
|
|
1825
1845
|
"textarea",
|
|
1826
1846
|
"video"
|
|
1827
|
-
]),
|
|
1847
|
+
]), qt = /* @__PURE__ */ new Set([
|
|
1828
1848
|
"button",
|
|
1829
1849
|
"checkbox",
|
|
1830
1850
|
"combobox",
|
|
@@ -1848,7 +1868,7 @@ const At = {
|
|
|
1848
1868
|
"tabpanel",
|
|
1849
1869
|
"textbox",
|
|
1850
1870
|
"treeitem"
|
|
1851
|
-
]),
|
|
1871
|
+
]), Rt = {
|
|
1852
1872
|
grid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader"]),
|
|
1853
1873
|
listbox: /* @__PURE__ */ new Set(["option"]),
|
|
1854
1874
|
menu: /* @__PURE__ */ new Set(["menuitem", "menuitemcheckbox", "menuitemradio"]),
|
|
@@ -1858,26 +1878,26 @@ const At = {
|
|
|
1858
1878
|
tree: /* @__PURE__ */ new Set(["treeitem"]),
|
|
1859
1879
|
treegrid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader", "treeitem"])
|
|
1860
1880
|
};
|
|
1861
|
-
function
|
|
1881
|
+
function Nt(t, a) {
|
|
1862
1882
|
var n, r, o;
|
|
1863
1883
|
const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase(), i = (r = a.getAttribute("role")) == null ? void 0 : r.toLowerCase();
|
|
1864
|
-
return !e || !i ? !1 : ((o =
|
|
1884
|
+
return !e || !i ? !1 : ((o = Rt[e]) == null ? void 0 : o.has(i)) ?? !1;
|
|
1865
1885
|
}
|
|
1866
|
-
function
|
|
1886
|
+
function $t(t) {
|
|
1867
1887
|
var n;
|
|
1868
1888
|
const a = t.tagName.toLowerCase();
|
|
1869
|
-
if (
|
|
1889
|
+
if (Lt.has(a))
|
|
1870
1890
|
return a === "a" && !t.hasAttribute("href") ? !1 : a === "audio" || a === "video" ? t.hasAttribute("controls") : !(a === "img" && !t.hasAttribute("usemap") || a === "input" && t.type === "hidden" || t.disabled);
|
|
1871
1891
|
const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase();
|
|
1872
|
-
if (e &&
|
|
1892
|
+
if (e && qt.has(e)) return !0;
|
|
1873
1893
|
const i = t.getAttribute("tabindex");
|
|
1874
1894
|
return i !== null && i !== "-1" || t.getAttribute("contenteditable") === "true";
|
|
1875
1895
|
}
|
|
1876
|
-
function
|
|
1896
|
+
function Mt(t) {
|
|
1877
1897
|
const a = t.tagName.toLowerCase();
|
|
1878
1898
|
return !!(a === "a" && t.hasAttribute("href") || a === "button" && !t.disabled);
|
|
1879
1899
|
}
|
|
1880
|
-
const
|
|
1900
|
+
const Ht = {
|
|
1881
1901
|
id: "nested-interactive",
|
|
1882
1902
|
wcag: ["4.1.2"],
|
|
1883
1903
|
level: "A",
|
|
@@ -1892,10 +1912,10 @@ const $t = {
|
|
|
1892
1912
|
for (; o; ) {
|
|
1893
1913
|
for (; r.length > 0 && !r[r.length - 1].contains(o); )
|
|
1894
1914
|
r.pop();
|
|
1895
|
-
if (!g(o) &&
|
|
1915
|
+
if (!g(o) && $t(o)) {
|
|
1896
1916
|
if (r.length > 0) {
|
|
1897
1917
|
const s = r[r.length - 1];
|
|
1898
|
-
|
|
1918
|
+
Nt(s, o) || a.push({
|
|
1899
1919
|
ruleId: "nested-interactive",
|
|
1900
1920
|
selector: m(o),
|
|
1901
1921
|
html: d(o),
|
|
@@ -1903,13 +1923,13 @@ const $t = {
|
|
|
1903
1923
|
message: `Interactive element <${o.tagName.toLowerCase()}> is nested inside <${s.tagName.toLowerCase()}>.`
|
|
1904
1924
|
});
|
|
1905
1925
|
}
|
|
1906
|
-
|
|
1926
|
+
Mt(o) && r.push(o);
|
|
1907
1927
|
}
|
|
1908
1928
|
o = n.nextNode();
|
|
1909
1929
|
}
|
|
1910
1930
|
return a;
|
|
1911
1931
|
}
|
|
1912
|
-
},
|
|
1932
|
+
}, Dt = {
|
|
1913
1933
|
id: "scrollable-region-focusable",
|
|
1914
1934
|
wcag: ["2.1.1"],
|
|
1915
1935
|
level: "A",
|
|
@@ -1929,7 +1949,7 @@ const $t = {
|
|
|
1929
1949
|
if (!(s === "scroll" || s === "auto" || l === "scroll" || l === "auto")) continue;
|
|
1930
1950
|
if (i.scrollHeight > 0 || i.clientHeight > 0) {
|
|
1931
1951
|
const b = i.scrollHeight - i.clientHeight, f = i.scrollWidth - i.clientWidth;
|
|
1932
|
-
if (b <= 0 && f <= 0 || b <
|
|
1952
|
+
if (b <= 0 && f <= 0 || b < 14 && f < 14 || i.clientWidth < 64 && i.clientHeight < 64) continue;
|
|
1933
1953
|
} else {
|
|
1934
1954
|
const b = o.height !== "" || o.maxHeight !== "", f = ((e = i.textContent) == null ? void 0 : e.trim().length) ?? 0;
|
|
1935
1955
|
if (!b || f <= 50) continue;
|
|
@@ -1947,7 +1967,7 @@ const $t = {
|
|
|
1947
1967
|
}
|
|
1948
1968
|
return a;
|
|
1949
1969
|
}
|
|
1950
|
-
},
|
|
1970
|
+
}, Ft = {
|
|
1951
1971
|
id: "accesskeys",
|
|
1952
1972
|
wcag: [],
|
|
1953
1973
|
level: "A",
|
|
@@ -1977,7 +1997,7 @@ const $t = {
|
|
|
1977
1997
|
});
|
|
1978
1998
|
return a;
|
|
1979
1999
|
}
|
|
1980
|
-
},
|
|
2000
|
+
}, Wt = {
|
|
1981
2001
|
id: "heading-order",
|
|
1982
2002
|
wcag: [],
|
|
1983
2003
|
level: "A",
|
|
@@ -2002,7 +2022,7 @@ const $t = {
|
|
|
2002
2022
|
}
|
|
2003
2023
|
return a;
|
|
2004
2024
|
}
|
|
2005
|
-
}, $ = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]',
|
|
2025
|
+
}, $ = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', ie = 'main, [role="main"], header, [role="banner"], footer, [role="contentinfo"], nav, [role="navigation"], aside, [role="complementary"], section[aria-label], section[aria-labelledby], [role="region"][aria-label], [role="region"][aria-labelledby], form[aria-label], form[aria-labelledby], [role="form"][aria-label], [role="form"][aria-labelledby], [role="search"]', Ot = {
|
|
2006
2026
|
id: "landmark-one-main",
|
|
2007
2027
|
wcag: [],
|
|
2008
2028
|
level: "A",
|
|
@@ -2046,7 +2066,7 @@ const $t = {
|
|
|
2046
2066
|
})
|
|
2047
2067
|
), a;
|
|
2048
2068
|
}
|
|
2049
|
-
},
|
|
2069
|
+
}, _t = {
|
|
2050
2070
|
id: "landmark-no-duplicate-contentinfo",
|
|
2051
2071
|
wcag: [],
|
|
2052
2072
|
level: "A",
|
|
@@ -2066,7 +2086,7 @@ const $t = {
|
|
|
2066
2086
|
})
|
|
2067
2087
|
), a;
|
|
2068
2088
|
}
|
|
2069
|
-
},
|
|
2089
|
+
}, Pt = {
|
|
2070
2090
|
id: "landmark-no-duplicate-main",
|
|
2071
2091
|
wcag: [],
|
|
2072
2092
|
level: "A",
|
|
@@ -2086,7 +2106,7 @@ const $t = {
|
|
|
2086
2106
|
})
|
|
2087
2107
|
), a;
|
|
2088
2108
|
}
|
|
2089
|
-
},
|
|
2109
|
+
}, jt = {
|
|
2090
2110
|
id: "landmark-banner-is-top-level",
|
|
2091
2111
|
wcag: [],
|
|
2092
2112
|
level: "A",
|
|
@@ -2106,7 +2126,7 @@ const $t = {
|
|
|
2106
2126
|
});
|
|
2107
2127
|
return a;
|
|
2108
2128
|
}
|
|
2109
|
-
},
|
|
2129
|
+
}, Vt = {
|
|
2110
2130
|
id: "landmark-contentinfo-is-top-level",
|
|
2111
2131
|
wcag: [],
|
|
2112
2132
|
level: "A",
|
|
@@ -2126,7 +2146,7 @@ const $t = {
|
|
|
2126
2146
|
});
|
|
2127
2147
|
return a;
|
|
2128
2148
|
}
|
|
2129
|
-
},
|
|
2149
|
+
}, zt = {
|
|
2130
2150
|
id: "landmark-main-is-top-level",
|
|
2131
2151
|
wcag: [],
|
|
2132
2152
|
level: "A",
|
|
@@ -2148,7 +2168,7 @@ const $t = {
|
|
|
2148
2168
|
}
|
|
2149
2169
|
return a;
|
|
2150
2170
|
}
|
|
2151
|
-
},
|
|
2171
|
+
}, Ut = {
|
|
2152
2172
|
id: "landmark-complementary-is-top-level",
|
|
2153
2173
|
wcag: [],
|
|
2154
2174
|
level: "A",
|
|
@@ -2170,7 +2190,7 @@ const $t = {
|
|
|
2170
2190
|
}
|
|
2171
2191
|
return a;
|
|
2172
2192
|
}
|
|
2173
|
-
},
|
|
2193
|
+
}, Gt = {
|
|
2174
2194
|
id: "landmark-unique",
|
|
2175
2195
|
wcag: [],
|
|
2176
2196
|
level: "A",
|
|
@@ -2206,7 +2226,7 @@ const $t = {
|
|
|
2206
2226
|
}
|
|
2207
2227
|
return a;
|
|
2208
2228
|
}
|
|
2209
|
-
},
|
|
2229
|
+
}, Yt = {
|
|
2210
2230
|
id: "region",
|
|
2211
2231
|
wcag: [],
|
|
2212
2232
|
level: "A",
|
|
@@ -2220,8 +2240,8 @@ const $t = {
|
|
|
2220
2240
|
if (!e) return [];
|
|
2221
2241
|
for (const n of e.children) {
|
|
2222
2242
|
if (g(n) || n instanceof HTMLScriptElement || n instanceof HTMLStyleElement || n.tagName === "NOSCRIPT" || n instanceof HTMLElement && n.hidden || n.matches('a[href^="#"]')) continue;
|
|
2223
|
-
const r = n.matches(
|
|
2224
|
-
!r && o && (n.querySelector(
|
|
2243
|
+
const r = n.matches(ie), o = (i = n.textContent) == null ? void 0 : i.trim();
|
|
2244
|
+
!r && o && (n.querySelector(ie) || a.push({
|
|
2225
2245
|
ruleId: "region",
|
|
2226
2246
|
selector: m(n),
|
|
2227
2247
|
html: d(n),
|
|
@@ -2231,7 +2251,7 @@ const $t = {
|
|
|
2231
2251
|
}
|
|
2232
2252
|
return a;
|
|
2233
2253
|
}
|
|
2234
|
-
},
|
|
2254
|
+
}, Xt = {
|
|
2235
2255
|
id: "list",
|
|
2236
2256
|
selector: "ul, ol",
|
|
2237
2257
|
check: { type: "child-invalid", allowedChildren: ["li", "script", "template"], allowedChildRoles: ["listitem"] },
|
|
@@ -2242,7 +2262,7 @@ const $t = {
|
|
|
2242
2262
|
level: "A",
|
|
2243
2263
|
guidance: "Screen readers announce list structure ('list with 5 items') based on proper markup. Placing non-<li> elements directly inside <ul> or <ol> breaks this structure. Wrap content in <li> elements, or if you need wrapper divs for styling, restructure your CSS to style the <li> elements directly.",
|
|
2244
2264
|
prompt: "Explain how to restructure this element within the list properly."
|
|
2245
|
-
},
|
|
2265
|
+
}, Kt = I(Xt), Jt = {
|
|
2246
2266
|
id: "dlitem",
|
|
2247
2267
|
wcag: ["1.3.1"],
|
|
2248
2268
|
level: "A",
|
|
@@ -2261,7 +2281,7 @@ const $t = {
|
|
|
2261
2281
|
});
|
|
2262
2282
|
return a;
|
|
2263
2283
|
}
|
|
2264
|
-
},
|
|
2284
|
+
}, Qt = {
|
|
2265
2285
|
id: "definition-list",
|
|
2266
2286
|
selector: "dl",
|
|
2267
2287
|
check: { type: "child-invalid", allowedChildren: ["dt", "dd", "div", "script", "template"] },
|
|
@@ -2272,7 +2292,7 @@ const $t = {
|
|
|
2272
2292
|
level: "A",
|
|
2273
2293
|
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.",
|
|
2274
2294
|
prompt: "Explain whether to move this element outside the <dl> or convert it to dt/dd."
|
|
2275
|
-
},
|
|
2295
|
+
}, Zt = I(Qt), ea = {
|
|
2276
2296
|
id: "listitem",
|
|
2277
2297
|
wcag: ["1.3.1"],
|
|
2278
2298
|
level: "A",
|
|
@@ -2297,7 +2317,7 @@ const $t = {
|
|
|
2297
2317
|
}
|
|
2298
2318
|
return a;
|
|
2299
2319
|
}
|
|
2300
|
-
},
|
|
2320
|
+
}, ta = {
|
|
2301
2321
|
id: "document-title",
|
|
2302
2322
|
wcag: ["2.4.2"],
|
|
2303
2323
|
level: "A",
|
|
@@ -2327,7 +2347,7 @@ const $t = {
|
|
|
2327
2347
|
}
|
|
2328
2348
|
return [];
|
|
2329
2349
|
}
|
|
2330
|
-
},
|
|
2350
|
+
}, aa = {
|
|
2331
2351
|
id: "bypass",
|
|
2332
2352
|
wcag: [],
|
|
2333
2353
|
level: "A",
|
|
@@ -2358,7 +2378,7 @@ const $t = {
|
|
|
2358
2378
|
context: `Missing: ${n.join(", ")}`
|
|
2359
2379
|
}];
|
|
2360
2380
|
}
|
|
2361
|
-
},
|
|
2381
|
+
}, ia = {
|
|
2362
2382
|
id: "page-has-heading-one",
|
|
2363
2383
|
wcag: [],
|
|
2364
2384
|
level: "A",
|
|
@@ -2390,13 +2410,13 @@ const $t = {
|
|
|
2390
2410
|
}];
|
|
2391
2411
|
}
|
|
2392
2412
|
};
|
|
2393
|
-
function
|
|
2413
|
+
function be(t) {
|
|
2394
2414
|
if (!(t instanceof HTMLElement)) return !1;
|
|
2395
2415
|
if (t.style.display === "none" || t.style.visibility === "hidden") return !0;
|
|
2396
2416
|
const a = t.getAttribute("width"), e = t.getAttribute("height");
|
|
2397
2417
|
return (a === "0" || a === "1") && (e === "0" || e === "1");
|
|
2398
2418
|
}
|
|
2399
|
-
const
|
|
2419
|
+
const na = {
|
|
2400
2420
|
id: "frame-title",
|
|
2401
2421
|
wcag: ["4.1.2"],
|
|
2402
2422
|
level: "A",
|
|
@@ -2406,7 +2426,7 @@ const aa = {
|
|
|
2406
2426
|
run(t) {
|
|
2407
2427
|
const a = [];
|
|
2408
2428
|
for (const e of t.querySelectorAll("iframe, frame")) {
|
|
2409
|
-
if (g(e) ||
|
|
2429
|
+
if (g(e) || be(e)) continue;
|
|
2410
2430
|
if (!v(e)) {
|
|
2411
2431
|
const n = e.getAttribute("src");
|
|
2412
2432
|
a.push({
|
|
@@ -2421,7 +2441,7 @@ const aa = {
|
|
|
2421
2441
|
}
|
|
2422
2442
|
return a;
|
|
2423
2443
|
}
|
|
2424
|
-
},
|
|
2444
|
+
}, ra = {
|
|
2425
2445
|
id: "frame-title-unique",
|
|
2426
2446
|
wcag: ["4.1.2"],
|
|
2427
2447
|
level: "A",
|
|
@@ -2433,7 +2453,7 @@ const aa = {
|
|
|
2433
2453
|
var n;
|
|
2434
2454
|
const a = [], e = Array.from(t.querySelectorAll("iframe[title], frame[title]")), i = /* @__PURE__ */ new Map();
|
|
2435
2455
|
for (const r of e) {
|
|
2436
|
-
if (g(r) ||
|
|
2456
|
+
if (g(r) || be(r)) continue;
|
|
2437
2457
|
const o = (n = r.getAttribute("title")) == null ? void 0 : n.trim().toLowerCase();
|
|
2438
2458
|
if (o) {
|
|
2439
2459
|
const s = i.get(o) || [];
|
|
@@ -2452,7 +2472,7 @@ const aa = {
|
|
|
2452
2472
|
});
|
|
2453
2473
|
return a;
|
|
2454
2474
|
}
|
|
2455
|
-
},
|
|
2475
|
+
}, oa = {
|
|
2456
2476
|
id: "empty-heading",
|
|
2457
2477
|
wcag: [],
|
|
2458
2478
|
level: "A",
|
|
@@ -2482,7 +2502,7 @@ const aa = {
|
|
|
2482
2502
|
}
|
|
2483
2503
|
return a;
|
|
2484
2504
|
}
|
|
2485
|
-
},
|
|
2505
|
+
}, sa = {
|
|
2486
2506
|
id: "meta-viewport",
|
|
2487
2507
|
wcag: ["1.4.4"],
|
|
2488
2508
|
level: "AA",
|
|
@@ -2492,30 +2512,33 @@ const aa = {
|
|
|
2492
2512
|
run(t) {
|
|
2493
2513
|
const a = [], e = t.querySelector('meta[name="viewport"]');
|
|
2494
2514
|
if (!e) return [];
|
|
2495
|
-
const i = e.getAttribute("content") || "", n = i.toLowerCase();
|
|
2496
|
-
(/user-scalable\s*=\s*no/i.test(n) || /user-scalable\s*=\s*0/i.test(n)) && a.push({
|
|
2497
|
-
ruleId: "meta-viewport",
|
|
2498
|
-
selector: m(e),
|
|
2499
|
-
html: d(e),
|
|
2500
|
-
impact: "critical",
|
|
2501
|
-
message: "Viewport disables user scaling. Remove user-scalable=no.",
|
|
2502
|
-
context: `content: "${i}"`
|
|
2503
|
-
});
|
|
2504
|
-
const r = n.match(/maximum-scale\s*=\s*([\d.]+|yes)/i);
|
|
2515
|
+
const i = e.getAttribute("content") || "", n = i.toLowerCase(), r = n.match(/user-scalable\s*=\s*([^\s,;]+)/i);
|
|
2505
2516
|
if (r) {
|
|
2506
|
-
const
|
|
2507
|
-
s <
|
|
2517
|
+
const s = r[1], l = parseFloat(s);
|
|
2518
|
+
(s === "no" || !isNaN(l) && l > -1 && l < 1) && a.push({
|
|
2519
|
+
ruleId: "meta-viewport",
|
|
2520
|
+
selector: m(e),
|
|
2521
|
+
html: d(e),
|
|
2522
|
+
impact: "critical",
|
|
2523
|
+
message: `Viewport disables user scaling (user-scalable=${s}). Remove this restriction.`,
|
|
2524
|
+
context: `content: "${i}"`
|
|
2525
|
+
});
|
|
2526
|
+
}
|
|
2527
|
+
const o = n.match(/maximum-scale\s*=\s*([\d.]+|yes)/i);
|
|
2528
|
+
if (o) {
|
|
2529
|
+
const s = o[1], l = s.toLowerCase() === "yes" ? 1 : parseFloat(s);
|
|
2530
|
+
l < 2 && a.push({
|
|
2508
2531
|
ruleId: "meta-viewport",
|
|
2509
2532
|
selector: m(e),
|
|
2510
2533
|
html: d(e),
|
|
2511
2534
|
impact: "critical",
|
|
2512
|
-
message: `Viewport maximum-scale=${
|
|
2535
|
+
message: `Viewport maximum-scale=${l} restricts zooming. Set to at least 2 or remove.`,
|
|
2513
2536
|
context: `content: "${i}"`
|
|
2514
2537
|
});
|
|
2515
2538
|
}
|
|
2516
2539
|
return a;
|
|
2517
2540
|
}
|
|
2518
|
-
},
|
|
2541
|
+
}, la = {
|
|
2519
2542
|
id: "meta-refresh",
|
|
2520
2543
|
wcag: ["2.2.1", "2.2.4", "3.2.5"],
|
|
2521
2544
|
level: "A",
|
|
@@ -2546,7 +2569,7 @@ const aa = {
|
|
|
2546
2569
|
}
|
|
2547
2570
|
return [];
|
|
2548
2571
|
}
|
|
2549
|
-
},
|
|
2572
|
+
}, ca = {
|
|
2550
2573
|
id: "blink",
|
|
2551
2574
|
selector: "blink",
|
|
2552
2575
|
check: { type: "selector-exists" },
|
|
@@ -2557,7 +2580,7 @@ const aa = {
|
|
|
2557
2580
|
level: "A",
|
|
2558
2581
|
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.",
|
|
2559
2582
|
prompt: "Suggest static alternatives to the blinking effect."
|
|
2560
|
-
},
|
|
2583
|
+
}, ua = I(ca), da = {
|
|
2561
2584
|
id: "marquee",
|
|
2562
2585
|
selector: "marquee",
|
|
2563
2586
|
check: { type: "selector-exists" },
|
|
@@ -2568,7 +2591,7 @@ const aa = {
|
|
|
2568
2591
|
level: "A",
|
|
2569
2592
|
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.",
|
|
2570
2593
|
prompt: "Suggest static alternatives or accessible carousel patterns."
|
|
2571
|
-
},
|
|
2594
|
+
}, ma = I(da), ha = {
|
|
2572
2595
|
id: "p-as-heading",
|
|
2573
2596
|
wcag: [],
|
|
2574
2597
|
level: "A",
|
|
@@ -2595,7 +2618,7 @@ const aa = {
|
|
|
2595
2618
|
}
|
|
2596
2619
|
return a;
|
|
2597
2620
|
}
|
|
2598
|
-
},
|
|
2621
|
+
}, pa = {
|
|
2599
2622
|
id: "aria-roles",
|
|
2600
2623
|
wcag: ["4.1.2"],
|
|
2601
2624
|
level: "A",
|
|
@@ -2606,7 +2629,7 @@ const aa = {
|
|
|
2606
2629
|
const a = [];
|
|
2607
2630
|
for (const e of t.querySelectorAll("[role]")) {
|
|
2608
2631
|
const r = e.getAttribute("role").replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "").split(/\s+/).filter(Boolean);
|
|
2609
|
-
!r.some((s) =>
|
|
2632
|
+
!r.some((s) => Ee(s)) && r.length > 0 && a.push({
|
|
2610
2633
|
ruleId: "aria-roles",
|
|
2611
2634
|
selector: m(e),
|
|
2612
2635
|
html: d(e),
|
|
@@ -2616,7 +2639,7 @@ const aa = {
|
|
|
2616
2639
|
}
|
|
2617
2640
|
return a;
|
|
2618
2641
|
}
|
|
2619
|
-
},
|
|
2642
|
+
}, ga = {
|
|
2620
2643
|
id: "aria-valid-attr",
|
|
2621
2644
|
wcag: ["4.1.2"],
|
|
2622
2645
|
level: "A",
|
|
@@ -2624,9 +2647,9 @@ const aa = {
|
|
|
2624
2647
|
guidance: "Misspelled ARIA attributes are ignored by assistive technologies. Check the spelling against the WAI-ARIA specification. Common mistakes: aria-labeledby (should be aria-labelledby), aria-role (should be role), aria-description (valid in ARIA 1.3+).",
|
|
2625
2648
|
prompt: "Identify the misspelled attribute and provide the correct spelling.",
|
|
2626
2649
|
run(t) {
|
|
2627
|
-
return
|
|
2650
|
+
return G(t).validAttr;
|
|
2628
2651
|
}
|
|
2629
|
-
},
|
|
2652
|
+
}, ba = {
|
|
2630
2653
|
id: "aria-valid-attr-value",
|
|
2631
2654
|
wcag: ["4.1.2"],
|
|
2632
2655
|
level: "A",
|
|
@@ -2634,9 +2657,9 @@ const aa = {
|
|
|
2634
2657
|
guidance: "Each ARIA attribute accepts specific value types. Boolean attributes (aria-hidden, aria-disabled) accept only 'true' or 'false'. Tristate attributes (aria-checked, aria-pressed) also accept 'mixed'. Token attributes (aria-live, aria-autocomplete) accept predefined values. ID reference attributes (aria-labelledby, aria-describedby) must reference existing element IDs.",
|
|
2635
2658
|
prompt: "Show the invalid value and list the valid values for this specific attribute.",
|
|
2636
2659
|
run(t) {
|
|
2637
|
-
return
|
|
2660
|
+
return G(t).validAttrValue;
|
|
2638
2661
|
}
|
|
2639
|
-
},
|
|
2662
|
+
}, fa = {
|
|
2640
2663
|
checkbox: ["aria-checked"],
|
|
2641
2664
|
combobox: ["aria-expanded"],
|
|
2642
2665
|
heading: ["aria-level"],
|
|
@@ -2650,7 +2673,7 @@ const aa = {
|
|
|
2650
2673
|
slider: ["aria-valuenow"],
|
|
2651
2674
|
spinbutton: ["aria-valuenow"],
|
|
2652
2675
|
switch: ["aria-checked"]
|
|
2653
|
-
},
|
|
2676
|
+
}, va = {
|
|
2654
2677
|
id: "aria-required-attr",
|
|
2655
2678
|
wcag: ["4.1.2"],
|
|
2656
2679
|
level: "A",
|
|
@@ -2661,7 +2684,7 @@ const aa = {
|
|
|
2661
2684
|
const a = [];
|
|
2662
2685
|
for (const e of t.querySelectorAll("[role]")) {
|
|
2663
2686
|
if (g(e) || e instanceof HTMLElement && e.style.display === "none") continue;
|
|
2664
|
-
const i = e.getAttribute("role").trim().toLowerCase(), n =
|
|
2687
|
+
const i = e.getAttribute("role").trim().toLowerCase(), n = fa[i];
|
|
2665
2688
|
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))) {
|
|
2666
2689
|
if (i === "separator") {
|
|
2667
2690
|
const r = e.getAttribute("tabindex");
|
|
@@ -2685,7 +2708,7 @@ const aa = {
|
|
|
2685
2708
|
return a;
|
|
2686
2709
|
}
|
|
2687
2710
|
};
|
|
2688
|
-
function
|
|
2711
|
+
function ya(t) {
|
|
2689
2712
|
var r, o, s;
|
|
2690
2713
|
const a = [], e = t.className;
|
|
2691
2714
|
e && typeof e == "string" && e.trim() && a.push(`Classes: ${e.trim().slice(0, 100)}`);
|
|
@@ -2702,7 +2725,7 @@ function fa(t) {
|
|
|
2702
2725
|
return a.length > 0 ? a.join(`
|
|
2703
2726
|
`) : void 0;
|
|
2704
2727
|
}
|
|
2705
|
-
const
|
|
2728
|
+
const wa = {
|
|
2706
2729
|
id: "button-name",
|
|
2707
2730
|
wcag: ["4.1.2"],
|
|
2708
2731
|
level: "A",
|
|
@@ -2721,12 +2744,12 @@ const va = {
|
|
|
2721
2744
|
html: d(e),
|
|
2722
2745
|
impact: "critical",
|
|
2723
2746
|
message: "Button has no discernible text.",
|
|
2724
|
-
context:
|
|
2747
|
+
context: ya(e)
|
|
2725
2748
|
});
|
|
2726
2749
|
}
|
|
2727
2750
|
return a;
|
|
2728
2751
|
}
|
|
2729
|
-
},
|
|
2752
|
+
}, Aa = {
|
|
2730
2753
|
alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
|
|
2731
2754
|
alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
|
|
2732
2755
|
application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
|
|
@@ -2798,7 +2821,7 @@ const va = {
|
|
|
2798
2821
|
tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
|
|
2799
2822
|
treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
|
|
2800
2823
|
treeitem: /* @__PURE__ */ new Set(["aria-checked", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"])
|
|
2801
|
-
},
|
|
2824
|
+
}, xa = /* @__PURE__ */ new Set([
|
|
2802
2825
|
"aria-atomic",
|
|
2803
2826
|
"aria-busy",
|
|
2804
2827
|
"aria-controls",
|
|
@@ -2822,7 +2845,7 @@ const va = {
|
|
|
2822
2845
|
"aria-roledescription",
|
|
2823
2846
|
"aria-braillelabel",
|
|
2824
2847
|
"aria-brailleroledescription"
|
|
2825
|
-
]),
|
|
2848
|
+
]), Sa = {
|
|
2826
2849
|
id: "aria-allowed-attr",
|
|
2827
2850
|
wcag: ["4.1.2"],
|
|
2828
2851
|
level: "A",
|
|
@@ -2835,10 +2858,10 @@ const va = {
|
|
|
2835
2858
|
if (g(e)) continue;
|
|
2836
2859
|
const i = q(e);
|
|
2837
2860
|
if (!i) continue;
|
|
2838
|
-
const n =
|
|
2861
|
+
const n = Aa[i];
|
|
2839
2862
|
if (n)
|
|
2840
2863
|
for (const r of e.attributes) {
|
|
2841
|
-
if (!r.name.startsWith("aria-") ||
|
|
2864
|
+
if (!r.name.startsWith("aria-") || xa.has(r.name) || n.has(r.name)) continue;
|
|
2842
2865
|
const o = n.size > 0 ? [...n].join(", ") : "none (only global ARIA attributes)";
|
|
2843
2866
|
a.push({
|
|
2844
2867
|
ruleId: "aria-allowed-attr",
|
|
@@ -2852,7 +2875,7 @@ const va = {
|
|
|
2852
2875
|
}
|
|
2853
2876
|
return a;
|
|
2854
2877
|
}
|
|
2855
|
-
},
|
|
2878
|
+
}, ka = /* @__PURE__ */ new Set([
|
|
2856
2879
|
"base",
|
|
2857
2880
|
"col",
|
|
2858
2881
|
"colgroup",
|
|
@@ -2974,10 +2997,10 @@ const va = {
|
|
|
2974
2997
|
video: /* @__PURE__ */ new Set(["application"]),
|
|
2975
2998
|
wbr: /* @__PURE__ */ new Set(["none", "presentation"])
|
|
2976
2999
|
};
|
|
2977
|
-
function
|
|
3000
|
+
function Ia(t) {
|
|
2978
3001
|
var e;
|
|
2979
3002
|
const a = t.tagName.toLowerCase();
|
|
2980
|
-
if (
|
|
3003
|
+
if (ka.has(a))
|
|
2981
3004
|
return "none";
|
|
2982
3005
|
if (a === "a" && t.hasAttribute("href"))
|
|
2983
3006
|
return E["a[href]"];
|
|
@@ -2989,7 +3012,7 @@ function Sa(t) {
|
|
|
2989
3012
|
}
|
|
2990
3013
|
return E[a] || "any";
|
|
2991
3014
|
}
|
|
2992
|
-
const
|
|
3015
|
+
const Ta = {
|
|
2993
3016
|
id: "aria-allowed-role",
|
|
2994
3017
|
wcag: ["4.1.2"],
|
|
2995
3018
|
level: "A",
|
|
@@ -3003,9 +3026,9 @@ const ka = {
|
|
|
3003
3026
|
if (g(i)) continue;
|
|
3004
3027
|
const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
|
|
3005
3028
|
if (!n) continue;
|
|
3006
|
-
const r =
|
|
3029
|
+
const r = he(i);
|
|
3007
3030
|
if (r && n === r) continue;
|
|
3008
|
-
const o =
|
|
3031
|
+
const o = Ia(i);
|
|
3009
3032
|
o === "none" ? a.push({
|
|
3010
3033
|
ruleId: "aria-allowed-role",
|
|
3011
3034
|
selector: m(i),
|
|
@@ -3022,7 +3045,7 @@ const ka = {
|
|
|
3022
3045
|
}
|
|
3023
3046
|
return a;
|
|
3024
3047
|
}
|
|
3025
|
-
},
|
|
3048
|
+
}, ne = {
|
|
3026
3049
|
// Each array is an OR group - at least one of each inner array must be present
|
|
3027
3050
|
combobox: [["listbox", "tree", "grid", "dialog", "textbox"]],
|
|
3028
3051
|
// Must own/contain one of these
|
|
@@ -3030,8 +3053,8 @@ const ka = {
|
|
|
3030
3053
|
grid: [["row", "rowgroup"]],
|
|
3031
3054
|
list: [["listitem", "group"]],
|
|
3032
3055
|
listbox: [["option", "group"]],
|
|
3033
|
-
menu: [["menuitem", "menuitemcheckbox", "menuitemradio", "group"]],
|
|
3034
|
-
menubar: [["menuitem", "menuitemcheckbox", "menuitemradio", "group"]],
|
|
3056
|
+
menu: [["menuitem", "menuitemcheckbox", "menuitemradio", "group", "menu", "separator"]],
|
|
3057
|
+
menubar: [["menuitem", "menuitemcheckbox", "menuitemradio", "group", "menu", "separator"]],
|
|
3035
3058
|
radiogroup: [["radio"]],
|
|
3036
3059
|
row: [["cell", "columnheader", "gridcell", "rowheader"]],
|
|
3037
3060
|
rowgroup: [["row"]],
|
|
@@ -3039,7 +3062,7 @@ const ka = {
|
|
|
3039
3062
|
tablist: [["tab"]],
|
|
3040
3063
|
tree: [["treeitem", "group"]],
|
|
3041
3064
|
treegrid: [["row", "rowgroup"]]
|
|
3042
|
-
},
|
|
3065
|
+
}, Ea = /* @__PURE__ */ new Set([
|
|
3043
3066
|
"doc-bibliography",
|
|
3044
3067
|
"doc-endnotes",
|
|
3045
3068
|
"grid",
|
|
@@ -3051,10 +3074,11 @@ const ka = {
|
|
|
3051
3074
|
"tablist",
|
|
3052
3075
|
"tree",
|
|
3053
3076
|
"treegrid"
|
|
3054
|
-
]),
|
|
3077
|
+
]), re = {
|
|
3055
3078
|
caption: ["figure", "table", "grid", "treegrid"],
|
|
3056
|
-
|
|
3057
|
-
|
|
3079
|
+
cell: ["row"],
|
|
3080
|
+
columnheader: ["row"],
|
|
3081
|
+
gridcell: ["row"],
|
|
3058
3082
|
listitem: ["list", "group"],
|
|
3059
3083
|
menuitem: ["menu", "menubar", "group"],
|
|
3060
3084
|
menuitemcheckbox: ["menu", "menubar", "group"],
|
|
@@ -3062,10 +3086,11 @@ const ka = {
|
|
|
3062
3086
|
option: ["listbox", "group"],
|
|
3063
3087
|
row: ["table", "grid", "treegrid", "rowgroup"],
|
|
3064
3088
|
rowgroup: ["table", "grid", "treegrid"],
|
|
3089
|
+
rowheader: ["row"],
|
|
3065
3090
|
tab: ["tablist"],
|
|
3066
3091
|
treeitem: ["tree", "group"]
|
|
3067
3092
|
};
|
|
3068
|
-
function
|
|
3093
|
+
function Ca(t, a) {
|
|
3069
3094
|
var o;
|
|
3070
3095
|
const e = ((o = t.getAttribute("aria-owns")) == null ? void 0 : o.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
|
|
3071
3096
|
let r = !1;
|
|
@@ -3088,7 +3113,7 @@ function Ta(t, a) {
|
|
|
3088
3113
|
if (!s.some((l) => n.has(l))) return "fail";
|
|
3089
3114
|
return "pass";
|
|
3090
3115
|
}
|
|
3091
|
-
const
|
|
3116
|
+
const La = {
|
|
3092
3117
|
id: "aria-required-children",
|
|
3093
3118
|
wcag: ["1.3.1"],
|
|
3094
3119
|
level: "A",
|
|
@@ -3101,14 +3126,14 @@ const Ea = {
|
|
|
3101
3126
|
for (const i of t.querySelectorAll("[role]")) {
|
|
3102
3127
|
if (g(i)) continue;
|
|
3103
3128
|
const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
|
|
3104
|
-
if (!n || !(n in
|
|
3129
|
+
if (!n || !(n in ne) || i.getAttribute("aria-busy") === "true") continue;
|
|
3105
3130
|
if (n === "combobox") {
|
|
3106
3131
|
if (i.getAttribute("aria-expanded") !== "true") continue;
|
|
3107
3132
|
const l = i.tagName.toLowerCase();
|
|
3108
3133
|
if (l === "input" || l === "textarea") continue;
|
|
3109
3134
|
}
|
|
3110
|
-
const r =
|
|
3111
|
-
if (o === "pass" || o === "empty" &&
|
|
3135
|
+
const r = ne[n], o = Ca(i, r);
|
|
3136
|
+
if (o === "pass" || o === "empty" && Ea.has(n)) continue;
|
|
3112
3137
|
const s = r.map((l) => l.join(" or ")).join(", ");
|
|
3113
3138
|
a.push({
|
|
3114
3139
|
ruleId: "aria-required-children",
|
|
@@ -3120,7 +3145,7 @@ const Ea = {
|
|
|
3120
3145
|
}
|
|
3121
3146
|
return a;
|
|
3122
3147
|
}
|
|
3123
|
-
},
|
|
3148
|
+
}, qa = {
|
|
3124
3149
|
id: "aria-required-parent",
|
|
3125
3150
|
wcag: ["1.3.1"],
|
|
3126
3151
|
level: "A",
|
|
@@ -3133,8 +3158,8 @@ const Ea = {
|
|
|
3133
3158
|
for (const i of t.querySelectorAll("[role]")) {
|
|
3134
3159
|
if (g(i)) continue;
|
|
3135
3160
|
const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
|
|
3136
|
-
if (!n || !(n in
|
|
3137
|
-
const r =
|
|
3161
|
+
if (!n || !(n in re)) continue;
|
|
3162
|
+
const r = re[n];
|
|
3138
3163
|
let o = i.parentElement, s = !1;
|
|
3139
3164
|
for (; o && o !== t.documentElement; ) {
|
|
3140
3165
|
const l = q(o);
|
|
@@ -3154,7 +3179,7 @@ const Ea = {
|
|
|
3154
3179
|
}
|
|
3155
3180
|
return a;
|
|
3156
3181
|
}
|
|
3157
|
-
},
|
|
3182
|
+
}, oe = [
|
|
3158
3183
|
"a[href]",
|
|
3159
3184
|
"button:not([disabled])",
|
|
3160
3185
|
'input:not([disabled]):not([type="hidden"])',
|
|
@@ -3170,7 +3195,7 @@ const Ea = {
|
|
|
3170
3195
|
"embed",
|
|
3171
3196
|
"area[href]"
|
|
3172
3197
|
].join(", ");
|
|
3173
|
-
function
|
|
3198
|
+
function Ra(t) {
|
|
3174
3199
|
let a = t;
|
|
3175
3200
|
const e = t.ownerDocument, i = e.defaultView;
|
|
3176
3201
|
for (; a && a !== e.body; ) {
|
|
@@ -3183,7 +3208,7 @@ function La(t) {
|
|
|
3183
3208
|
}
|
|
3184
3209
|
return !0;
|
|
3185
3210
|
}
|
|
3186
|
-
const
|
|
3211
|
+
const Na = {
|
|
3187
3212
|
id: "aria-hidden-body",
|
|
3188
3213
|
selector: 'body[aria-hidden="true"]',
|
|
3189
3214
|
check: { type: "selector-exists" },
|
|
@@ -3195,7 +3220,7 @@ const qa = {
|
|
|
3195
3220
|
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.",
|
|
3196
3221
|
prompt: "Instruct to remove aria-hidden='true' from the body element.",
|
|
3197
3222
|
skipAriaHidden: !1
|
|
3198
|
-
},
|
|
3223
|
+
}, $a = I(Na), Ma = {
|
|
3199
3224
|
id: "aria-hidden-focus",
|
|
3200
3225
|
wcag: ["4.1.2"],
|
|
3201
3226
|
level: "A",
|
|
@@ -3206,12 +3231,12 @@ const qa = {
|
|
|
3206
3231
|
const a = [];
|
|
3207
3232
|
for (const e of t.querySelectorAll('[aria-hidden="true"]')) {
|
|
3208
3233
|
if (e === t.body) continue;
|
|
3209
|
-
const i = [...e.querySelectorAll(
|
|
3210
|
-
e.matches(
|
|
3234
|
+
const i = [...e.querySelectorAll(oe)];
|
|
3235
|
+
e.matches(oe) && i.push(e);
|
|
3211
3236
|
for (const n of i)
|
|
3212
3237
|
if (n instanceof HTMLElement) {
|
|
3213
3238
|
const r = n.getAttribute("tabindex");
|
|
3214
|
-
if (r === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !
|
|
3239
|
+
if (r === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Ra(n)) continue;
|
|
3215
3240
|
const o = n.tagName.toLowerCase();
|
|
3216
3241
|
let s;
|
|
3217
3242
|
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}>`;
|
|
@@ -3228,7 +3253,7 @@ const qa = {
|
|
|
3228
3253
|
}
|
|
3229
3254
|
return a;
|
|
3230
3255
|
}
|
|
3231
|
-
},
|
|
3256
|
+
}, Ha = {
|
|
3232
3257
|
id: "aria-command-name",
|
|
3233
3258
|
wcag: ["4.1.2"],
|
|
3234
3259
|
level: "A",
|
|
@@ -3254,7 +3279,7 @@ const qa = {
|
|
|
3254
3279
|
}
|
|
3255
3280
|
return a;
|
|
3256
3281
|
}
|
|
3257
|
-
},
|
|
3282
|
+
}, Da = {
|
|
3258
3283
|
id: "aria-input-field-name",
|
|
3259
3284
|
wcag: ["4.1.2"],
|
|
3260
3285
|
level: "A",
|
|
@@ -3275,7 +3300,7 @@ const qa = {
|
|
|
3275
3300
|
}
|
|
3276
3301
|
return a;
|
|
3277
3302
|
}
|
|
3278
|
-
},
|
|
3303
|
+
}, Fa = {
|
|
3279
3304
|
id: "aria-toggle-field-name",
|
|
3280
3305
|
wcag: ["4.1.2"],
|
|
3281
3306
|
level: "A",
|
|
@@ -3296,7 +3321,7 @@ const qa = {
|
|
|
3296
3321
|
}
|
|
3297
3322
|
return a;
|
|
3298
3323
|
}
|
|
3299
|
-
},
|
|
3324
|
+
}, Wa = {
|
|
3300
3325
|
id: "aria-meter-name",
|
|
3301
3326
|
wcag: ["4.1.2"],
|
|
3302
3327
|
level: "A",
|
|
@@ -3359,7 +3384,7 @@ const qa = {
|
|
|
3359
3384
|
}
|
|
3360
3385
|
return a;
|
|
3361
3386
|
}
|
|
3362
|
-
},
|
|
3387
|
+
}, _a = {
|
|
3363
3388
|
id: "aria-tooltip-name",
|
|
3364
3389
|
wcag: ["4.1.2"],
|
|
3365
3390
|
level: "A",
|
|
@@ -3380,7 +3405,7 @@ const qa = {
|
|
|
3380
3405
|
}
|
|
3381
3406
|
return a;
|
|
3382
3407
|
}
|
|
3383
|
-
},
|
|
3408
|
+
}, Pa = {
|
|
3384
3409
|
id: "aria-treeitem-name",
|
|
3385
3410
|
wcag: ["4.1.2"],
|
|
3386
3411
|
level: "A",
|
|
@@ -3401,7 +3426,7 @@ const qa = {
|
|
|
3401
3426
|
}
|
|
3402
3427
|
return a;
|
|
3403
3428
|
}
|
|
3404
|
-
},
|
|
3429
|
+
}, ja = {
|
|
3405
3430
|
id: "aria-prohibited-attr",
|
|
3406
3431
|
wcag: ["4.1.2"],
|
|
3407
3432
|
level: "A",
|
|
@@ -3409,16 +3434,16 @@ const qa = {
|
|
|
3409
3434
|
guidance: "Some ARIA roles prohibit certain attributes. For example, roles like 'none', 'presentation', 'generic', and text-level roles (code, emphasis, strong) prohibit aria-label and aria-labelledby because naming is not supported for these roles. Remove the prohibited attributes or change the role.",
|
|
3410
3435
|
prompt: "Identify the prohibited attribute and recommend removing it from this element.",
|
|
3411
3436
|
run(t) {
|
|
3412
|
-
return
|
|
3437
|
+
return G(t).prohibitedAttr;
|
|
3413
3438
|
}
|
|
3414
|
-
},
|
|
3439
|
+
}, Va = [
|
|
3415
3440
|
"a[href]",
|
|
3416
3441
|
"button:not([disabled])",
|
|
3417
3442
|
'input:not([disabled]):not([type="hidden"])',
|
|
3418
3443
|
"select:not([disabled])",
|
|
3419
3444
|
"textarea:not([disabled])",
|
|
3420
3445
|
'[tabindex]:not([tabindex="-1"])'
|
|
3421
|
-
].join(", "),
|
|
3446
|
+
].join(", "), za = [
|
|
3422
3447
|
"aria-atomic",
|
|
3423
3448
|
"aria-busy",
|
|
3424
3449
|
"aria-controls",
|
|
@@ -3433,17 +3458,17 @@ const qa = {
|
|
|
3433
3458
|
"aria-owns",
|
|
3434
3459
|
"aria-relevant"
|
|
3435
3460
|
];
|
|
3436
|
-
function
|
|
3461
|
+
function se(t) {
|
|
3437
3462
|
const a = [];
|
|
3438
|
-
t.matches(
|
|
3439
|
-
for (const e of
|
|
3463
|
+
t.matches(Va) && a.push("element is focusable");
|
|
3464
|
+
for (const e of za)
|
|
3440
3465
|
if (t.hasAttribute(e)) {
|
|
3441
3466
|
a.push(`has ${e}`);
|
|
3442
3467
|
break;
|
|
3443
3468
|
}
|
|
3444
3469
|
return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
|
|
3445
3470
|
}
|
|
3446
|
-
const
|
|
3471
|
+
const Ua = {
|
|
3447
3472
|
id: "presentation-role-conflict",
|
|
3448
3473
|
wcag: ["4.1.2"],
|
|
3449
3474
|
level: "A",
|
|
@@ -3454,7 +3479,7 @@ const Va = {
|
|
|
3454
3479
|
const a = [];
|
|
3455
3480
|
for (const e of t.querySelectorAll('[role="presentation"], [role="none"]')) {
|
|
3456
3481
|
if (g(e)) continue;
|
|
3457
|
-
const i =
|
|
3482
|
+
const i = se(e);
|
|
3458
3483
|
i.length > 0 && a.push({
|
|
3459
3484
|
ruleId: "presentation-role-conflict",
|
|
3460
3485
|
selector: m(e),
|
|
@@ -3465,7 +3490,7 @@ const Va = {
|
|
|
3465
3490
|
}
|
|
3466
3491
|
for (const e of t.querySelectorAll('img[alt=""]')) {
|
|
3467
3492
|
if (g(e) || e.hasAttribute("role")) continue;
|
|
3468
|
-
const i =
|
|
3493
|
+
const i = se(e);
|
|
3469
3494
|
i.length > 0 && a.push({
|
|
3470
3495
|
ruleId: "presentation-role-conflict",
|
|
3471
3496
|
selector: m(e),
|
|
@@ -3476,7 +3501,7 @@ const Va = {
|
|
|
3476
3501
|
}
|
|
3477
3502
|
return a;
|
|
3478
3503
|
}
|
|
3479
|
-
},
|
|
3504
|
+
}, Ga = {
|
|
3480
3505
|
id: "summary-name",
|
|
3481
3506
|
wcag: ["4.1.2"],
|
|
3482
3507
|
level: "A",
|
|
@@ -3498,7 +3523,7 @@ const Va = {
|
|
|
3498
3523
|
return a;
|
|
3499
3524
|
}
|
|
3500
3525
|
};
|
|
3501
|
-
function
|
|
3526
|
+
function Ya(t) {
|
|
3502
3527
|
var n, r;
|
|
3503
3528
|
const a = [], e = t.getAttribute("href");
|
|
3504
3529
|
e && a.push(`href: ${e}`);
|
|
@@ -3515,7 +3540,7 @@ function Ua(t) {
|
|
|
3515
3540
|
return a.length > 0 ? a.join(`
|
|
3516
3541
|
`) : void 0;
|
|
3517
3542
|
}
|
|
3518
|
-
const
|
|
3543
|
+
const Xa = {
|
|
3519
3544
|
id: "link-name",
|
|
3520
3545
|
wcag: ["2.4.4", "4.1.2"],
|
|
3521
3546
|
level: "A",
|
|
@@ -3532,12 +3557,12 @@ const Ga = {
|
|
|
3532
3557
|
html: d(e),
|
|
3533
3558
|
impact: "serious",
|
|
3534
3559
|
message: "Link has no discernible text.",
|
|
3535
|
-
context:
|
|
3560
|
+
context: Ya(e)
|
|
3536
3561
|
});
|
|
3537
3562
|
}
|
|
3538
3563
|
return a;
|
|
3539
3564
|
}
|
|
3540
|
-
},
|
|
3565
|
+
}, Ka = {
|
|
3541
3566
|
id: "skip-link",
|
|
3542
3567
|
wcag: ["2.4.1"],
|
|
3543
3568
|
level: "A",
|
|
@@ -3563,7 +3588,7 @@ const Ga = {
|
|
|
3563
3588
|
}
|
|
3564
3589
|
return a;
|
|
3565
3590
|
}
|
|
3566
|
-
},
|
|
3591
|
+
}, Ja = /* @__PURE__ */ new Set([
|
|
3567
3592
|
"block",
|
|
3568
3593
|
"flex",
|
|
3569
3594
|
"grid",
|
|
@@ -3571,23 +3596,23 @@ const Ga = {
|
|
|
3571
3596
|
"table-cell",
|
|
3572
3597
|
"list-item",
|
|
3573
3598
|
"flow-root"
|
|
3574
|
-
]),
|
|
3599
|
+
]), Qa = /* @__PURE__ */ new Set([
|
|
3575
3600
|
"inline",
|
|
3576
3601
|
"inline-block",
|
|
3577
3602
|
"inline-flex",
|
|
3578
3603
|
"inline-grid"
|
|
3579
3604
|
]);
|
|
3580
|
-
function
|
|
3605
|
+
function Za(t) {
|
|
3581
3606
|
let a = t.parentElement;
|
|
3582
3607
|
for (; a; ) {
|
|
3583
3608
|
const e = w(a).display;
|
|
3584
|
-
if (
|
|
3585
|
-
return
|
|
3609
|
+
if (Ja.has(e))
|
|
3610
|
+
return ei(a) ? a : null;
|
|
3586
3611
|
a = a.parentElement;
|
|
3587
3612
|
}
|
|
3588
3613
|
return null;
|
|
3589
3614
|
}
|
|
3590
|
-
function
|
|
3615
|
+
function ei(t) {
|
|
3591
3616
|
const a = t.ownerDocument.createTreeWalker(
|
|
3592
3617
|
t,
|
|
3593
3618
|
NodeFilter.SHOW_TEXT
|
|
@@ -3595,19 +3620,20 @@ function Qa(t) {
|
|
|
3595
3620
|
let e = "", i;
|
|
3596
3621
|
for (; i = a.nextNode(); ) {
|
|
3597
3622
|
if (!i.data.trim()) continue;
|
|
3598
|
-
let
|
|
3599
|
-
for (;
|
|
3600
|
-
if (
|
|
3601
|
-
|
|
3623
|
+
let r = i.parentElement, o = !1;
|
|
3624
|
+
for (; r && r !== t; ) {
|
|
3625
|
+
if (r.tagName === "A") {
|
|
3626
|
+
o = !0;
|
|
3602
3627
|
break;
|
|
3603
3628
|
}
|
|
3604
|
-
|
|
3629
|
+
r = r.parentElement;
|
|
3605
3630
|
}
|
|
3606
|
-
|
|
3631
|
+
o || (e += i.data);
|
|
3607
3632
|
}
|
|
3608
|
-
|
|
3633
|
+
const n = e.match(new RegExp("\\p{L}{2,}", "gu"));
|
|
3634
|
+
return n !== null && n.length >= 2;
|
|
3609
3635
|
}
|
|
3610
|
-
function
|
|
3636
|
+
function ti(t, a) {
|
|
3611
3637
|
const e = t.ownerDocument.createTreeWalker(
|
|
3612
3638
|
t,
|
|
3613
3639
|
NodeFilter.SHOW_TEXT
|
|
@@ -3628,32 +3654,39 @@ function Za(t, a) {
|
|
|
3628
3654
|
}
|
|
3629
3655
|
return null;
|
|
3630
3656
|
}
|
|
3631
|
-
function
|
|
3632
|
-
const
|
|
3633
|
-
if ((
|
|
3657
|
+
function ai(t, a, e) {
|
|
3658
|
+
const i = e.textDecorationLine || e.textDecoration || "", n = a.textDecorationLine || a.textDecoration || "";
|
|
3659
|
+
if ((n.includes("underline") || n.includes("line-through")) && n !== i)
|
|
3660
|
+
return !0;
|
|
3661
|
+
const r = parseFloat(a.borderBottomWidth) || 0, o = a.borderBottomStyle || "";
|
|
3662
|
+
if (r > 0 && o !== "none" && o !== "hidden")
|
|
3634
3663
|
return !0;
|
|
3635
|
-
const
|
|
3636
|
-
if (
|
|
3664
|
+
const s = parseFloat(a.outlineWidth) || 0, l = a.outlineStyle || "";
|
|
3665
|
+
if (s > 0 && l !== "none")
|
|
3637
3666
|
return !0;
|
|
3638
|
-
const
|
|
3639
|
-
if (
|
|
3667
|
+
const h = a.backgroundImage || "";
|
|
3668
|
+
if (h && h !== "none" && h !== "initial")
|
|
3640
3669
|
return !0;
|
|
3641
|
-
const
|
|
3642
|
-
if (
|
|
3670
|
+
const c = F(e.fontWeight), u = F(a.fontWeight);
|
|
3671
|
+
if (Math.abs(u - c) >= 300 || a.fontStyle !== e.fontStyle)
|
|
3643
3672
|
return !0;
|
|
3644
|
-
const
|
|
3645
|
-
if (
|
|
3673
|
+
const p = parseFloat(a.fontSize) || 16, b = parseFloat(e.fontSize) || 16;
|
|
3674
|
+
if (b > 0 && p / b >= 1.2)
|
|
3646
3675
|
return !0;
|
|
3647
|
-
const
|
|
3648
|
-
|
|
3676
|
+
for (const f of t.querySelectorAll("*")) {
|
|
3677
|
+
const y = w(f), x = y.textDecorationLine || y.textDecoration || "";
|
|
3678
|
+
if ((x.includes("underline") || x.includes("line-through")) && x !== i || Math.abs(F(y.fontWeight) - c) >= 300)
|
|
3679
|
+
return !0;
|
|
3680
|
+
}
|
|
3681
|
+
return !1;
|
|
3649
3682
|
}
|
|
3650
|
-
function
|
|
3683
|
+
function F(t) {
|
|
3651
3684
|
return t === "bold" ? 700 : t === "normal" ? 400 : parseInt(t) || 400;
|
|
3652
3685
|
}
|
|
3653
3686
|
function le(t, a, e) {
|
|
3654
3687
|
return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
|
|
3655
3688
|
}
|
|
3656
|
-
const
|
|
3689
|
+
const ii = {
|
|
3657
3690
|
id: "link-in-text-block",
|
|
3658
3691
|
wcag: ["1.4.1"],
|
|
3659
3692
|
level: "A",
|
|
@@ -3663,30 +3696,30 @@ const ti = {
|
|
|
3663
3696
|
run(t) {
|
|
3664
3697
|
const a = [];
|
|
3665
3698
|
for (const e of t.querySelectorAll("a[href]")) {
|
|
3666
|
-
if (g(e) || !A(e).trim()
|
|
3699
|
+
if (g(e) || !A(e).trim()) continue;
|
|
3667
3700
|
const i = w(e), n = i.display || "inline";
|
|
3668
|
-
if (!
|
|
3669
|
-
const r =
|
|
3701
|
+
if (!Qa.has(n)) continue;
|
|
3702
|
+
const r = Za(e);
|
|
3670
3703
|
if (!r) continue;
|
|
3671
3704
|
const o = w(r);
|
|
3672
|
-
if (
|
|
3673
|
-
const s = N(i.color), l =
|
|
3705
|
+
if (ai(e, i, o)) continue;
|
|
3706
|
+
const s = N(i.color), l = ti(r);
|
|
3674
3707
|
if (!s || !l) continue;
|
|
3675
|
-
const h = R(...s), c = R(...l), u =
|
|
3676
|
-
if (u >= 3) continue;
|
|
3708
|
+
const h = R(...s), c = R(...l), u = ge(h, c);
|
|
3709
|
+
if (u < 1.1 || u >= 3) continue;
|
|
3677
3710
|
const p = le(...s), b = le(...l), f = `link color: ${p} rgb(${s.join(", ")}), surrounding text: ${b} rgb(${l.join(", ")}), ratio: ${u.toFixed(2)}:1`;
|
|
3678
3711
|
a.push({
|
|
3679
3712
|
ruleId: "link-in-text-block",
|
|
3680
3713
|
selector: m(e),
|
|
3681
3714
|
html: d(e),
|
|
3682
3715
|
impact: "serious",
|
|
3683
|
-
message: "Link in text block is not visually distinguishable from surrounding text. Add
|
|
3716
|
+
message: "Link in text block is not visually distinguishable from surrounding text. Add a non-color visual indicator such as an underline or border.",
|
|
3684
3717
|
context: f
|
|
3685
3718
|
});
|
|
3686
3719
|
}
|
|
3687
3720
|
return a;
|
|
3688
3721
|
}
|
|
3689
|
-
},
|
|
3722
|
+
}, ni = {
|
|
3690
3723
|
id: "html-has-lang",
|
|
3691
3724
|
wcag: ["3.1.1"],
|
|
3692
3725
|
level: "A",
|
|
@@ -3720,17 +3753,17 @@ const ti = {
|
|
|
3720
3753
|
}
|
|
3721
3754
|
return [];
|
|
3722
3755
|
}
|
|
3723
|
-
},
|
|
3756
|
+
}, ri = new Set(
|
|
3724
3757
|
"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(" ")
|
|
3725
|
-
),
|
|
3758
|
+
), oi = new Set(
|
|
3726
3759
|
"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(" ")
|
|
3727
|
-
),
|
|
3728
|
-
function
|
|
3729
|
-
if (!
|
|
3760
|
+
), si = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
|
|
3761
|
+
function fe(t) {
|
|
3762
|
+
if (!si.test(t)) return !1;
|
|
3730
3763
|
const a = t.split("-")[0].toLowerCase();
|
|
3731
|
-
return a.length === 2 ?
|
|
3764
|
+
return a.length === 2 ? ri.has(a) : a.length === 3 ? !oi.has(a) : !1;
|
|
3732
3765
|
}
|
|
3733
|
-
const
|
|
3766
|
+
const li = {
|
|
3734
3767
|
id: "html-lang-valid",
|
|
3735
3768
|
wcag: ["3.1.1"],
|
|
3736
3769
|
level: "A",
|
|
@@ -3740,7 +3773,7 @@ const oi = {
|
|
|
3740
3773
|
run(t) {
|
|
3741
3774
|
var e;
|
|
3742
3775
|
const a = (e = t.documentElement.getAttribute("lang")) == null ? void 0 : e.trim();
|
|
3743
|
-
return a && !
|
|
3776
|
+
return a && !fe(a) ? [{
|
|
3744
3777
|
ruleId: "html-lang-valid",
|
|
3745
3778
|
selector: "html",
|
|
3746
3779
|
html: d(t.documentElement),
|
|
@@ -3781,7 +3814,7 @@ function ce(t) {
|
|
|
3781
3814
|
}
|
|
3782
3815
|
return !1;
|
|
3783
3816
|
}
|
|
3784
|
-
const
|
|
3817
|
+
const ci = {
|
|
3785
3818
|
id: "valid-lang",
|
|
3786
3819
|
wcag: ["3.1.2"],
|
|
3787
3820
|
level: "AA",
|
|
@@ -3803,7 +3836,7 @@ const si = {
|
|
|
3803
3836
|
});
|
|
3804
3837
|
continue;
|
|
3805
3838
|
}
|
|
3806
|
-
n && ce(e) && (
|
|
3839
|
+
n && ce(e) && (fe(n) || a.push({
|
|
3807
3840
|
ruleId: "valid-lang",
|
|
3808
3841
|
selector: m(e),
|
|
3809
3842
|
html: d(e),
|
|
@@ -3813,7 +3846,7 @@ const si = {
|
|
|
3813
3846
|
}
|
|
3814
3847
|
return a;
|
|
3815
3848
|
}
|
|
3816
|
-
},
|
|
3849
|
+
}, ui = {
|
|
3817
3850
|
id: "html-xml-lang-mismatch",
|
|
3818
3851
|
wcag: ["3.1.1"],
|
|
3819
3852
|
level: "A",
|
|
@@ -3836,7 +3869,7 @@ const si = {
|
|
|
3836
3869
|
}
|
|
3837
3870
|
return [];
|
|
3838
3871
|
}
|
|
3839
|
-
},
|
|
3872
|
+
}, di = {
|
|
3840
3873
|
id: "td-headers-attr",
|
|
3841
3874
|
wcag: ["1.3.1"],
|
|
3842
3875
|
level: "A",
|
|
@@ -3875,7 +3908,7 @@ const si = {
|
|
|
3875
3908
|
}
|
|
3876
3909
|
return a;
|
|
3877
3910
|
}
|
|
3878
|
-
},
|
|
3911
|
+
}, mi = {
|
|
3879
3912
|
id: "th-has-data-cells",
|
|
3880
3913
|
wcag: ["1.3.1"],
|
|
3881
3914
|
level: "A",
|
|
@@ -3897,7 +3930,7 @@ const si = {
|
|
|
3897
3930
|
}
|
|
3898
3931
|
return a;
|
|
3899
3932
|
}
|
|
3900
|
-
},
|
|
3933
|
+
}, hi = {
|
|
3901
3934
|
id: "td-has-header",
|
|
3902
3935
|
wcag: ["1.3.1"],
|
|
3903
3936
|
level: "A",
|
|
@@ -3927,14 +3960,14 @@ const si = {
|
|
|
3927
3960
|
if (!p) continue;
|
|
3928
3961
|
const b = p.querySelector("th") !== null, f = Array.from(p.children).indexOf(u);
|
|
3929
3962
|
let y = !1;
|
|
3930
|
-
const
|
|
3931
|
-
if (
|
|
3932
|
-
const
|
|
3933
|
-
|
|
3963
|
+
const x = n.querySelector("thead");
|
|
3964
|
+
if (x) {
|
|
3965
|
+
const S = x.querySelector("tr");
|
|
3966
|
+
S && ((e = S.querySelectorAll("th, td")[f]) == null ? void 0 : e.tagName.toLowerCase()) === "th" && (y = !0);
|
|
3934
3967
|
}
|
|
3935
3968
|
if (!y) {
|
|
3936
|
-
const
|
|
3937
|
-
|
|
3969
|
+
const S = n.querySelector("tbody > tr, tr");
|
|
3970
|
+
S && ((i = S.querySelectorAll("th, td")[f]) == null ? void 0 : i.tagName.toLowerCase()) === "th" && (y = !0);
|
|
3938
3971
|
}
|
|
3939
3972
|
if (!b && !y && !h && !c) {
|
|
3940
3973
|
a.push({
|
|
@@ -3950,7 +3983,7 @@ const si = {
|
|
|
3950
3983
|
}
|
|
3951
3984
|
return a;
|
|
3952
3985
|
}
|
|
3953
|
-
},
|
|
3986
|
+
}, pi = {
|
|
3954
3987
|
id: "scope-attr-valid",
|
|
3955
3988
|
wcag: ["1.3.1"],
|
|
3956
3989
|
level: "A",
|
|
@@ -3973,7 +4006,7 @@ const si = {
|
|
|
3973
4006
|
}
|
|
3974
4007
|
return a;
|
|
3975
4008
|
}
|
|
3976
|
-
},
|
|
4009
|
+
}, gi = {
|
|
3977
4010
|
id: "empty-table-header",
|
|
3978
4011
|
wcag: [],
|
|
3979
4012
|
level: "A",
|
|
@@ -3996,7 +4029,7 @@ const si = {
|
|
|
3996
4029
|
}
|
|
3997
4030
|
return a;
|
|
3998
4031
|
}
|
|
3999
|
-
},
|
|
4032
|
+
}, W = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], bi = {
|
|
4000
4033
|
id: "duplicate-id-aria",
|
|
4001
4034
|
wcag: ["4.1.2"],
|
|
4002
4035
|
level: "A",
|
|
@@ -4006,7 +4039,7 @@ const si = {
|
|
|
4006
4039
|
run(t) {
|
|
4007
4040
|
const a = [], e = /* @__PURE__ */ new Set();
|
|
4008
4041
|
for (const n of t.querySelectorAll("[aria-labelledby], [aria-describedby], [aria-controls], [aria-owns], [aria-flowto]"))
|
|
4009
|
-
for (const r of
|
|
4042
|
+
for (const r of W) {
|
|
4010
4043
|
const o = n.getAttribute(r);
|
|
4011
4044
|
o && o.split(/\s+/).forEach((s) => e.add(s));
|
|
4012
4045
|
}
|
|
@@ -4020,11 +4053,11 @@ const si = {
|
|
|
4020
4053
|
for (const [n, r] of i) {
|
|
4021
4054
|
if (r <= 1) continue;
|
|
4022
4055
|
const o = t.querySelectorAll(`#${CSS.escape(n)}`), s = t.querySelector(
|
|
4023
|
-
|
|
4056
|
+
W.map((c) => `[${c}~="${CSS.escape(n)}"]`).join(", ")
|
|
4024
4057
|
), l = t.querySelector(`label[for="${CSS.escape(n)}"]`);
|
|
4025
4058
|
let h;
|
|
4026
4059
|
if (s) {
|
|
4027
|
-
const c =
|
|
4060
|
+
const c = W.find(
|
|
4028
4061
|
(u) => {
|
|
4029
4062
|
var p;
|
|
4030
4063
|
return (p = s.getAttribute(u)) == null ? void 0 : p.split(/\s+/).includes(n);
|
|
@@ -4044,7 +4077,7 @@ Referenced by: ${h}` : ""}`
|
|
|
4044
4077
|
}
|
|
4045
4078
|
return a;
|
|
4046
4079
|
}
|
|
4047
|
-
},
|
|
4080
|
+
}, fi = {
|
|
4048
4081
|
id: "video-caption",
|
|
4049
4082
|
wcag: ["1.2.2"],
|
|
4050
4083
|
level: "A",
|
|
@@ -4065,7 +4098,7 @@ Referenced by: ${h}` : ""}`
|
|
|
4065
4098
|
}
|
|
4066
4099
|
return a;
|
|
4067
4100
|
}
|
|
4068
|
-
},
|
|
4101
|
+
}, vi = {
|
|
4069
4102
|
id: "audio-caption",
|
|
4070
4103
|
wcag: ["1.2.1"],
|
|
4071
4104
|
level: "A",
|
|
@@ -4087,7 +4120,7 @@ Referenced by: ${h}` : ""}`
|
|
|
4087
4120
|
}
|
|
4088
4121
|
return a;
|
|
4089
4122
|
}
|
|
4090
|
-
},
|
|
4123
|
+
}, yi = /* @__PURE__ */ new Set([
|
|
4091
4124
|
"SCRIPT",
|
|
4092
4125
|
"STYLE",
|
|
4093
4126
|
"NOSCRIPT",
|
|
@@ -4106,10 +4139,10 @@ Referenced by: ${h}` : ""}`
|
|
|
4106
4139
|
function ue([t, a, e]) {
|
|
4107
4140
|
return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
|
|
4108
4141
|
}
|
|
4109
|
-
function
|
|
4142
|
+
function wi(t) {
|
|
4110
4143
|
return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!(t.closest("fieldset[disabled]") || t.getAttribute("aria-disabled") === "true");
|
|
4111
4144
|
}
|
|
4112
|
-
function
|
|
4145
|
+
function Ai(t, a) {
|
|
4113
4146
|
if (t.tagName !== "LABEL") return !1;
|
|
4114
4147
|
const e = t, i = e.htmlFor;
|
|
4115
4148
|
if (i) {
|
|
@@ -4121,7 +4154,7 @@ function yi(t, a) {
|
|
|
4121
4154
|
const r = e.id;
|
|
4122
4155
|
return !!(r && a.querySelector(`[aria-labelledby~="${r}"][aria-disabled="true"]`));
|
|
4123
4156
|
}
|
|
4124
|
-
function
|
|
4157
|
+
function xi(t) {
|
|
4125
4158
|
const a = t.clip;
|
|
4126
4159
|
if (a && a.startsWith("rect(")) {
|
|
4127
4160
|
const i = a.match(/[\d.]+/g);
|
|
@@ -4135,17 +4168,17 @@ function wi(t) {
|
|
|
4135
4168
|
}
|
|
4136
4169
|
return !1;
|
|
4137
4170
|
}
|
|
4138
|
-
function
|
|
4171
|
+
function Si(t) {
|
|
4139
4172
|
if (g(t)) return !0;
|
|
4140
4173
|
let a = t;
|
|
4141
4174
|
for (; a; ) {
|
|
4142
4175
|
const e = w(a);
|
|
4143
|
-
if (e.display === "none" || e.visibility === "hidden" ||
|
|
4176
|
+
if (e.display === "none" || e.visibility === "hidden" || xi(e)) return !0;
|
|
4144
4177
|
a = a.parentElement;
|
|
4145
4178
|
}
|
|
4146
4179
|
return !1;
|
|
4147
4180
|
}
|
|
4148
|
-
function
|
|
4181
|
+
function ki(t) {
|
|
4149
4182
|
let a = 1, e = t;
|
|
4150
4183
|
for (; e; ) {
|
|
4151
4184
|
const i = w(e), n = parseFloat(i.opacity);
|
|
@@ -4153,23 +4186,48 @@ function xi(t) {
|
|
|
4153
4186
|
}
|
|
4154
4187
|
return a;
|
|
4155
4188
|
}
|
|
4156
|
-
|
|
4189
|
+
const Ii = {
|
|
4190
|
+
grayscale: 0,
|
|
4191
|
+
blur: 0,
|
|
4192
|
+
"hue-rotate": 0,
|
|
4193
|
+
invert: 0,
|
|
4194
|
+
sepia: 0,
|
|
4195
|
+
brightness: 1,
|
|
4196
|
+
contrast: 1,
|
|
4197
|
+
saturate: 1,
|
|
4198
|
+
opacity: 1
|
|
4199
|
+
};
|
|
4200
|
+
function Ti(t) {
|
|
4201
|
+
const a = parseFloat(t);
|
|
4202
|
+
return isNaN(a) ? NaN : t.trim().endsWith("%") ? a / 100 : a;
|
|
4203
|
+
}
|
|
4204
|
+
const de = /([a-z-]+)\(([^)]*)\)/g;
|
|
4205
|
+
function me(t) {
|
|
4206
|
+
let a, e = !1;
|
|
4207
|
+
for (de.lastIndex = 0; a = de.exec(t); ) {
|
|
4208
|
+
e = !0;
|
|
4209
|
+
const i = Ii[a[1]];
|
|
4210
|
+
if (i === void 0 || Ti(a[2]) !== i) return !1;
|
|
4211
|
+
}
|
|
4212
|
+
return e;
|
|
4213
|
+
}
|
|
4214
|
+
function Ei(t) {
|
|
4157
4215
|
let a = t;
|
|
4158
4216
|
for (; a; ) {
|
|
4159
4217
|
const e = w(a), i = e.filter;
|
|
4160
|
-
if (i && i !== "none" && i !== "initial") return !0;
|
|
4218
|
+
if (i && i !== "none" && i !== "initial" && !me(i)) return !0;
|
|
4161
4219
|
const n = e.mixBlendMode;
|
|
4162
4220
|
if (n && n !== "normal" && n !== "initial") return !0;
|
|
4163
4221
|
const r = e.backdropFilter;
|
|
4164
|
-
if (r && r !== "none" && r !== "initial") return !0;
|
|
4222
|
+
if (r && r !== "none" && r !== "initial" && !me(r)) return !0;
|
|
4165
4223
|
a = a.parentElement;
|
|
4166
4224
|
}
|
|
4167
4225
|
return !1;
|
|
4168
4226
|
}
|
|
4169
|
-
function
|
|
4227
|
+
function Ci(t) {
|
|
4170
4228
|
return t.closest("select") !== null;
|
|
4171
4229
|
}
|
|
4172
|
-
const
|
|
4230
|
+
const Li = {
|
|
4173
4231
|
id: "color-contrast",
|
|
4174
4232
|
wcag: ["1.4.3"],
|
|
4175
4233
|
level: "AA",
|
|
@@ -4184,143 +4242,143 @@ const Ii = {
|
|
|
4184
4242
|
for (; r = i.nextNode(); ) {
|
|
4185
4243
|
if (!r.textContent || !r.textContent.trim()) continue;
|
|
4186
4244
|
const o = r.parentElement;
|
|
4187
|
-
if (!o || n.has(o) || (n.add(o),
|
|
4245
|
+
if (!o || n.has(o) || (n.add(o), yi.has(o.tagName))) continue;
|
|
4188
4246
|
const s = o.tagName;
|
|
4189
|
-
if (s === "BODY" || s === "HTML" ||
|
|
4247
|
+
if (s === "BODY" || s === "HTML" || Ci(o) || wi(o) || Ai(o, t) || Si(o)) continue;
|
|
4190
4248
|
const l = w(o);
|
|
4191
|
-
if (parseFloat(l.opacity) === 0 ||
|
|
4249
|
+
if (parseFloat(l.opacity) === 0 || ki(o) < 0.1) continue;
|
|
4192
4250
|
const h = l.textShadow;
|
|
4193
|
-
if (h && h !== "none" && h !== "initial" ||
|
|
4251
|
+
if (h && h !== "none" && h !== "initial" || Ei(o)) continue;
|
|
4194
4252
|
const c = N(l.color);
|
|
4195
4253
|
if (!c) continue;
|
|
4196
4254
|
const u = l.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/) || l.color.match(/rgba?\(.+?\/\s*([\d.]+%?)\s*\)/);
|
|
4197
|
-
if (u && (u[1].endsWith("%") ? parseFloat(u[1]) / 100 : parseFloat(u[1])) === 0 ||
|
|
4255
|
+
if (u && (u[1].endsWith("%") ? parseFloat(u[1]) / 100 : parseFloat(u[1])) === 0 || je(o)) continue;
|
|
4198
4256
|
const p = Be(o);
|
|
4199
4257
|
if (!p) continue;
|
|
4200
|
-
const b = R(c[0], c[1], c[2]), f = R(p[0], p[1], p[2]), y =
|
|
4201
|
-
if (y <
|
|
4202
|
-
const
|
|
4258
|
+
const b = R(c[0], c[1], c[2]), f = R(p[0], p[1], p[2]), y = ge(b, f), x = Ue(o) ? 3 : 4.5;
|
|
4259
|
+
if (y < x) {
|
|
4260
|
+
const S = Math.round(y * 100) / 100, M = ue(c), xe = ue(p);
|
|
4203
4261
|
a.push({
|
|
4204
4262
|
ruleId: "color-contrast",
|
|
4205
4263
|
selector: m(o),
|
|
4206
4264
|
html: d(o),
|
|
4207
4265
|
impact: "serious",
|
|
4208
|
-
message: `Insufficient color contrast ratio of ${
|
|
4209
|
-
context: `foreground: ${M} rgb(${c.join(", ")}), background: ${
|
|
4266
|
+
message: `Insufficient color contrast ratio of ${S}:1 (required ${x}:1).`,
|
|
4267
|
+
context: `foreground: ${M} rgb(${c.join(", ")}), background: ${xe} rgb(${p.join(", ")}), ratio: ${S}:1, required: ${x}:1`
|
|
4210
4268
|
});
|
|
4211
4269
|
}
|
|
4212
4270
|
}
|
|
4213
4271
|
return a;
|
|
4214
4272
|
}
|
|
4215
|
-
},
|
|
4273
|
+
}, ve = [
|
|
4216
4274
|
// Document Structure
|
|
4217
|
-
Zt,
|
|
4218
|
-
ea,
|
|
4219
4275
|
ta,
|
|
4220
4276
|
aa,
|
|
4221
4277
|
ia,
|
|
4278
|
+
na,
|
|
4222
4279
|
ra,
|
|
4223
|
-
|
|
4280
|
+
sa,
|
|
4224
4281
|
la,
|
|
4225
4282
|
ua,
|
|
4283
|
+
ma,
|
|
4226
4284
|
// Images
|
|
4227
|
-
ze,
|
|
4228
4285
|
Ge,
|
|
4229
|
-
Ye,
|
|
4230
4286
|
Xe,
|
|
4287
|
+
Ke,
|
|
4231
4288
|
Je,
|
|
4232
|
-
|
|
4289
|
+
Ze,
|
|
4233
4290
|
et,
|
|
4234
|
-
|
|
4235
|
-
|
|
4291
|
+
at,
|
|
4292
|
+
it,
|
|
4293
|
+
st,
|
|
4236
4294
|
// Forms
|
|
4237
|
-
ut,
|
|
4238
|
-
dt,
|
|
4239
4295
|
mt,
|
|
4240
4296
|
ht,
|
|
4241
|
-
|
|
4242
|
-
|
|
4297
|
+
pt,
|
|
4298
|
+
gt,
|
|
4243
4299
|
xt,
|
|
4244
|
-
|
|
4300
|
+
St,
|
|
4245
4301
|
kt,
|
|
4302
|
+
// Keyboard
|
|
4246
4303
|
Tt,
|
|
4247
|
-
|
|
4248
|
-
Mt,
|
|
4304
|
+
Ct,
|
|
4249
4305
|
Ht,
|
|
4250
|
-
// Structure
|
|
4251
4306
|
Dt,
|
|
4252
|
-
na,
|
|
4253
|
-
da,
|
|
4254
|
-
Ot,
|
|
4255
|
-
Bt,
|
|
4256
4307
|
Ft,
|
|
4308
|
+
// Structure
|
|
4257
4309
|
Wt,
|
|
4310
|
+
oa,
|
|
4311
|
+
ha,
|
|
4312
|
+
Ot,
|
|
4313
|
+
Bt,
|
|
4258
4314
|
_t,
|
|
4259
4315
|
Pt,
|
|
4260
4316
|
jt,
|
|
4261
4317
|
Vt,
|
|
4262
4318
|
zt,
|
|
4263
4319
|
Ut,
|
|
4320
|
+
Gt,
|
|
4264
4321
|
Yt,
|
|
4265
|
-
|
|
4266
|
-
|
|
4322
|
+
Kt,
|
|
4323
|
+
ea,
|
|
4267
4324
|
Jt,
|
|
4325
|
+
Zt,
|
|
4268
4326
|
// ARIA
|
|
4269
|
-
ma,
|
|
4270
|
-
ha,
|
|
4271
4327
|
pa,
|
|
4328
|
+
ga,
|
|
4272
4329
|
ba,
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
Na,
|
|
4330
|
+
va,
|
|
4331
|
+
Sa,
|
|
4332
|
+
Ta,
|
|
4333
|
+
La,
|
|
4334
|
+
qa,
|
|
4279
4335
|
$a,
|
|
4280
4336
|
Ma,
|
|
4281
4337
|
Ha,
|
|
4282
4338
|
Da,
|
|
4283
|
-
Oa,
|
|
4284
|
-
Ba,
|
|
4285
4339
|
Fa,
|
|
4286
4340
|
Wa,
|
|
4341
|
+
Oa,
|
|
4342
|
+
Ba,
|
|
4287
4343
|
_a,
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4344
|
+
Pa,
|
|
4345
|
+
ja,
|
|
4346
|
+
Ua,
|
|
4347
|
+
wa,
|
|
4292
4348
|
Ga,
|
|
4293
|
-
|
|
4294
|
-
|
|
4349
|
+
// Links
|
|
4350
|
+
Xa,
|
|
4351
|
+
Ka,
|
|
4352
|
+
ii,
|
|
4295
4353
|
// Language
|
|
4296
|
-
|
|
4297
|
-
oi,
|
|
4298
|
-
si,
|
|
4354
|
+
ni,
|
|
4299
4355
|
li,
|
|
4300
|
-
// Tables
|
|
4301
4356
|
ci,
|
|
4302
4357
|
ui,
|
|
4358
|
+
// Tables
|
|
4303
4359
|
di,
|
|
4304
4360
|
mi,
|
|
4305
4361
|
hi,
|
|
4306
|
-
// Parsing
|
|
4307
4362
|
pi,
|
|
4308
|
-
// Media
|
|
4309
4363
|
gi,
|
|
4364
|
+
// Parsing
|
|
4310
4365
|
bi,
|
|
4366
|
+
// Media
|
|
4367
|
+
fi,
|
|
4368
|
+
vi,
|
|
4311
4369
|
// Color
|
|
4312
|
-
|
|
4370
|
+
Li
|
|
4313
4371
|
];
|
|
4314
|
-
let
|
|
4315
|
-
function
|
|
4316
|
-
t.additionalRules && (
|
|
4372
|
+
let Y = [], ye = /* @__PURE__ */ new Set();
|
|
4373
|
+
function $i(t) {
|
|
4374
|
+
t.additionalRules && (Y = t.additionalRules), t.disabledRules && (ye = new Set(t.disabledRules));
|
|
4317
4375
|
}
|
|
4318
|
-
function
|
|
4319
|
-
return
|
|
4376
|
+
function we() {
|
|
4377
|
+
return ve.filter((a) => !ye.has(a.id)).concat(Y);
|
|
4320
4378
|
}
|
|
4321
|
-
function
|
|
4322
|
-
|
|
4323
|
-
const a =
|
|
4379
|
+
function Mi(t) {
|
|
4380
|
+
Ae();
|
|
4381
|
+
const a = we(), e = [];
|
|
4324
4382
|
let i = 0;
|
|
4325
4383
|
return {
|
|
4326
4384
|
processChunk(n) {
|
|
@@ -4339,13 +4397,13 @@ function qi(t) {
|
|
|
4339
4397
|
}
|
|
4340
4398
|
};
|
|
4341
4399
|
}
|
|
4342
|
-
function
|
|
4343
|
-
|
|
4400
|
+
function Ae() {
|
|
4401
|
+
Ce(), Se(), ke(), Oe(), We(), Le();
|
|
4344
4402
|
}
|
|
4345
|
-
function
|
|
4403
|
+
function Hi(t) {
|
|
4346
4404
|
var i;
|
|
4347
|
-
|
|
4348
|
-
const a =
|
|
4405
|
+
Ae();
|
|
4406
|
+
const a = we(), e = [];
|
|
4349
4407
|
for (const n of a)
|
|
4350
4408
|
try {
|
|
4351
4409
|
e.push(...n.run(t));
|
|
@@ -4358,32 +4416,32 @@ function Ri(t) {
|
|
|
4358
4416
|
ruleCount: a.length
|
|
4359
4417
|
};
|
|
4360
4418
|
}
|
|
4361
|
-
const
|
|
4362
|
-
function
|
|
4363
|
-
const a =
|
|
4364
|
-
return a ||
|
|
4419
|
+
const qi = new Map(ve.map((t) => [t.id, t]));
|
|
4420
|
+
function Di(t) {
|
|
4421
|
+
const a = qi.get(t);
|
|
4422
|
+
return a || Y.find((e) => e.id === t);
|
|
4365
4423
|
}
|
|
4366
4424
|
export {
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4425
|
+
Ae as clearAllCaches,
|
|
4426
|
+
We as clearAriaAttrAuditCache,
|
|
4427
|
+
Ce as clearAriaHiddenCache,
|
|
4370
4428
|
Oe as clearColorCaches,
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4429
|
+
Se as clearComputedRoleCache,
|
|
4430
|
+
I as compileDeclarativeRule,
|
|
4431
|
+
$i as configureRules,
|
|
4432
|
+
Mi as createChunkedAudit,
|
|
4375
4433
|
v as getAccessibleName,
|
|
4376
4434
|
A as getAccessibleTextContent,
|
|
4377
|
-
|
|
4435
|
+
we as getActiveRules,
|
|
4378
4436
|
q as getComputedRole,
|
|
4379
4437
|
d as getHtmlSnippet,
|
|
4380
|
-
|
|
4381
|
-
|
|
4438
|
+
he as getImplicitRole,
|
|
4439
|
+
Di as getRuleById,
|
|
4382
4440
|
m as getSelector,
|
|
4383
4441
|
g as isAriaHidden,
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4442
|
+
Ee as isValidRole,
|
|
4443
|
+
Ri as querySelectorShadowAware,
|
|
4444
|
+
ve as rules,
|
|
4445
|
+
Hi as runAudit,
|
|
4446
|
+
Ni as validateDeclarativeRule
|
|
4389
4447
|
};
|