@accesslint/core 0.8.2 → 0.8.4
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/README.md +3 -2
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.iife.js +2 -2
- package/dist/index.js +685 -622
- package/dist/rules/aria/aria-allowed-attr.d.ts.map +1 -1
- package/dist/rules/aria/aria-allowed-role.d.ts.map +1 -1
- package/dist/rules/aria/presentational-children-focusable.d.ts.map +1 -1
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/input-assistance/accessible-authentication.d.ts +3 -0
- package/dist/rules/input-assistance/accessible-authentication.d.ts.map +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const j = [
|
|
|
15
15
|
"area[href]"
|
|
16
16
|
].join(", ");
|
|
17
17
|
let K = /* @__PURE__ */ new WeakMap();
|
|
18
|
-
function
|
|
18
|
+
function rt() {
|
|
19
19
|
K = /* @__PURE__ */ new WeakMap();
|
|
20
20
|
}
|
|
21
21
|
function $e(e) {
|
|
@@ -133,7 +133,7 @@ function $e(e) {
|
|
|
133
133
|
return null;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function W(e) {
|
|
137
137
|
var n;
|
|
138
138
|
const a = K.get(e);
|
|
139
139
|
if (a !== void 0) return a;
|
|
@@ -144,14 +144,14 @@ let Q = /* @__PURE__ */ new WeakMap();
|
|
|
144
144
|
function st() {
|
|
145
145
|
Q = /* @__PURE__ */ new WeakMap();
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function x(e) {
|
|
148
148
|
const a = Q.get(e);
|
|
149
149
|
if (a !== void 0) return a;
|
|
150
150
|
const t = lt(e);
|
|
151
151
|
return Q.set(e, t), t;
|
|
152
152
|
}
|
|
153
153
|
function lt(e) {
|
|
154
|
-
var
|
|
154
|
+
var o, r, s, l, d;
|
|
155
155
|
const a = e.getAttribute("aria-labelledby");
|
|
156
156
|
if (a) {
|
|
157
157
|
const c = a.split(/\s+/).map((u) => {
|
|
@@ -160,7 +160,7 @@ function lt(e) {
|
|
|
160
160
|
}).filter(Boolean);
|
|
161
161
|
if (c.length) return c.join(" ");
|
|
162
162
|
}
|
|
163
|
-
const t = (
|
|
163
|
+
const t = (o = e.getAttribute("aria-label")) == null ? void 0 : o.trim();
|
|
164
164
|
if (t) return t;
|
|
165
165
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) {
|
|
166
166
|
if (e.id) {
|
|
@@ -170,7 +170,7 @@ function lt(e) {
|
|
|
170
170
|
const c = e.closest("label"), u = c ? k(c).trim() : "";
|
|
171
171
|
if (u) return u;
|
|
172
172
|
}
|
|
173
|
-
const i = (
|
|
173
|
+
const i = (r = e.getAttribute("title")) == null ? void 0 : r.trim();
|
|
174
174
|
if (i) return i;
|
|
175
175
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
|
|
176
176
|
const c = (s = e.getAttribute("placeholder")) == null ? void 0 : s.trim();
|
|
@@ -310,7 +310,7 @@ const ut = /* @__PURE__ */ new Set([
|
|
|
310
310
|
"aria-relevant",
|
|
311
311
|
"aria-roledescription"
|
|
312
312
|
]);
|
|
313
|
-
function
|
|
313
|
+
function I(e) {
|
|
314
314
|
let a = e;
|
|
315
315
|
for (; a; ) {
|
|
316
316
|
if (He(a)) return !0;
|
|
@@ -338,7 +338,7 @@ function He(e) {
|
|
|
338
338
|
return !1;
|
|
339
339
|
}
|
|
340
340
|
function k(e) {
|
|
341
|
-
var t, i, n,
|
|
341
|
+
var t, i, n, o, r;
|
|
342
342
|
let a = "";
|
|
343
343
|
for (const s of e.childNodes)
|
|
344
344
|
if (s.nodeType === 3)
|
|
@@ -361,14 +361,14 @@ function k(e) {
|
|
|
361
361
|
}
|
|
362
362
|
a += ((i = l.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? l.getAttribute("alt") ?? ((n = l.getAttribute("title")) == null ? void 0 : n.trim()) ?? "";
|
|
363
363
|
} else if (d === "svg") {
|
|
364
|
-
const c = (
|
|
364
|
+
const c = (o = l.getAttribute("aria-label")) == null ? void 0 : o.trim();
|
|
365
365
|
if (c)
|
|
366
366
|
a += c;
|
|
367
367
|
else {
|
|
368
368
|
const u = l.querySelector("title");
|
|
369
369
|
u && (a += u.textContent ?? "");
|
|
370
370
|
}
|
|
371
|
-
} else (
|
|
371
|
+
} else (r = l.getAttribute("aria-label")) != null && r.trim() ? a += l.getAttribute("aria-label").trim() : a += k(l);
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
return a;
|
|
@@ -381,13 +381,13 @@ function ee(e) {
|
|
|
381
381
|
else if (t.nodeType === 1) {
|
|
382
382
|
const i = t, n = i.tagName.toLowerCase();
|
|
383
383
|
if (n === "style" || n === "script" || n === "svg" || i.getAttribute("aria-hidden") === "true" || i instanceof HTMLElement && i.style.display === "none") continue;
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
384
|
+
const o = i.getAttribute("role");
|
|
385
|
+
if (o === "img" || o === "presentation" || o === "none") continue;
|
|
386
386
|
a += ee(i);
|
|
387
387
|
}
|
|
388
388
|
return a;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Pe(e) {
|
|
391
391
|
let a = e;
|
|
392
392
|
for (; a; ) {
|
|
393
393
|
if (a instanceof HTMLElement && a.style.visibility === "hidden") return !0;
|
|
@@ -395,19 +395,19 @@ function De(e) {
|
|
|
395
395
|
}
|
|
396
396
|
return !1;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
var n,
|
|
398
|
+
function De(e) {
|
|
399
|
+
var n, o;
|
|
400
400
|
const a = e.getAttribute("aria-labelledby");
|
|
401
401
|
if (a) {
|
|
402
|
-
const
|
|
402
|
+
const r = a.split(/\s+/).map((s) => {
|
|
403
403
|
var l, d;
|
|
404
404
|
return ((d = (l = e.ownerDocument.getElementById(s)) == null ? void 0 : l.textContent) == null ? void 0 : d.trim()) ?? "";
|
|
405
405
|
}).filter(Boolean);
|
|
406
|
-
if (
|
|
406
|
+
if (r.length) return r.join(" ");
|
|
407
407
|
}
|
|
408
408
|
const t = (n = e.getAttribute("aria-label")) == null ? void 0 : n.trim();
|
|
409
409
|
if (t) return t;
|
|
410
|
-
const i = (
|
|
410
|
+
const i = (o = e.getAttribute("title")) == null ? void 0 : o.trim();
|
|
411
411
|
return i || "";
|
|
412
412
|
}
|
|
413
413
|
function se(e) {
|
|
@@ -440,8 +440,8 @@ function gt(e) {
|
|
|
440
440
|
const t = e.parentElement;
|
|
441
441
|
if (t) {
|
|
442
442
|
let i = 0, n = 0;
|
|
443
|
-
for (let
|
|
444
|
-
t.children[
|
|
443
|
+
for (let o = 0; o < t.children.length; o++)
|
|
444
|
+
t.children[o].tagName === e.tagName && (i++, t.children[o] === e && (n = i));
|
|
445
445
|
if (i > 1)
|
|
446
446
|
return `${a}:nth-of-type(${n})`;
|
|
447
447
|
}
|
|
@@ -459,10 +459,10 @@ function Y(e) {
|
|
|
459
459
|
break;
|
|
460
460
|
}
|
|
461
461
|
if (i.unshift(gt(n)), i.length >= 2) {
|
|
462
|
-
const
|
|
462
|
+
const o = i.join(" > ");
|
|
463
463
|
try {
|
|
464
|
-
const
|
|
465
|
-
if (
|
|
464
|
+
const r = a.querySelectorAll(o);
|
|
465
|
+
if (r.length === 1 && r[0] === e) return o;
|
|
466
466
|
} catch {
|
|
467
467
|
}
|
|
468
468
|
}
|
|
@@ -471,17 +471,17 @@ function Y(e) {
|
|
|
471
471
|
return i.join(" > ");
|
|
472
472
|
}
|
|
473
473
|
function p(e) {
|
|
474
|
-
var
|
|
474
|
+
var o;
|
|
475
475
|
const a = te.get(e);
|
|
476
476
|
if (a !== void 0) return a;
|
|
477
477
|
const t = [];
|
|
478
478
|
let i = e;
|
|
479
479
|
for (; i; ) {
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
t.unshift({ selector: Y(i), delimiter: " >>> " }), i =
|
|
480
|
+
const r = i.getRootNode();
|
|
481
|
+
if (r instanceof ShadowRoot)
|
|
482
|
+
t.unshift({ selector: Y(i), delimiter: " >>> " }), i = r.host;
|
|
483
483
|
else {
|
|
484
|
-
const s = (
|
|
484
|
+
const s = (o = r.defaultView) == null ? void 0 : o.frameElement;
|
|
485
485
|
if (s)
|
|
486
486
|
t.unshift({ selector: Y(i), delimiter: " >>>iframe> " }), i = s;
|
|
487
487
|
else {
|
|
@@ -490,39 +490,39 @@ function p(e) {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
const n = t.map((
|
|
493
|
+
const n = t.map((r, s) => (s === 0 ? "" : r.delimiter) + r.selector).join("");
|
|
494
494
|
return te.set(e, n), n;
|
|
495
495
|
}
|
|
496
496
|
function Un(e) {
|
|
497
497
|
const a = [], t = [];
|
|
498
498
|
let i = e;
|
|
499
499
|
for (; i; ) {
|
|
500
|
-
const
|
|
501
|
-
if (
|
|
502
|
-
a.push(i.slice(0,
|
|
503
|
-
else if (
|
|
504
|
-
a.push(i.slice(0,
|
|
500
|
+
const o = i.indexOf(" >>>iframe> "), r = i.indexOf(" >>> ");
|
|
501
|
+
if (o !== -1 && (r === -1 || o <= r))
|
|
502
|
+
a.push(i.slice(0, o).trim()), t.push("iframe"), i = i.slice(o + 12);
|
|
503
|
+
else if (r !== -1)
|
|
504
|
+
a.push(i.slice(0, r).trim()), t.push("shadow"), i = i.slice(r + 5);
|
|
505
505
|
else {
|
|
506
506
|
a.push(i.trim());
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
let n = document;
|
|
511
|
-
for (let
|
|
512
|
-
const
|
|
513
|
-
if (!
|
|
514
|
-
if (
|
|
515
|
-
if (t[
|
|
516
|
-
const s =
|
|
511
|
+
for (let o = 0; o < a.length; o++) {
|
|
512
|
+
const r = n.querySelector(a[o]);
|
|
513
|
+
if (!r) return null;
|
|
514
|
+
if (o < a.length - 1)
|
|
515
|
+
if (t[o] === "iframe") {
|
|
516
|
+
const s = r.contentDocument;
|
|
517
517
|
if (!s) return null;
|
|
518
518
|
n = s;
|
|
519
519
|
} else {
|
|
520
|
-
const s =
|
|
520
|
+
const s = r.shadowRoot;
|
|
521
521
|
if (!s) return null;
|
|
522
522
|
n = s;
|
|
523
523
|
}
|
|
524
524
|
else
|
|
525
|
-
return
|
|
525
|
+
return r;
|
|
526
526
|
}
|
|
527
527
|
return null;
|
|
528
528
|
}
|
|
@@ -637,7 +637,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
637
637
|
"suggestion",
|
|
638
638
|
"term",
|
|
639
639
|
"time"
|
|
640
|
-
]),
|
|
640
|
+
]), wt = {
|
|
641
641
|
abbr: !0,
|
|
642
642
|
bdi: !0,
|
|
643
643
|
bdo: !0,
|
|
@@ -665,7 +665,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
665
665
|
u: !0,
|
|
666
666
|
var: !0,
|
|
667
667
|
wbr: !0
|
|
668
|
-
},
|
|
668
|
+
}, xt = {
|
|
669
669
|
alert: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
|
|
670
670
|
article: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
|
|
671
671
|
banner: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
|
|
@@ -698,25 +698,25 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
698
698
|
time: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
|
|
699
699
|
tooltip: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"])
|
|
700
700
|
};
|
|
701
|
-
let
|
|
701
|
+
let D = null, F = null;
|
|
702
702
|
function At() {
|
|
703
|
-
|
|
703
|
+
D = null, F = null;
|
|
704
704
|
}
|
|
705
705
|
function le(e) {
|
|
706
706
|
var n;
|
|
707
|
-
if (F && (
|
|
707
|
+
if (F && (D == null ? void 0 : D.deref()) === e) return F;
|
|
708
708
|
const a = [], t = [], i = [];
|
|
709
|
-
for (const
|
|
710
|
-
let
|
|
711
|
-
for (const c of
|
|
709
|
+
for (const o of e.querySelectorAll("*")) {
|
|
710
|
+
let r = !1;
|
|
711
|
+
for (const c of o.attributes)
|
|
712
712
|
if (c.name.startsWith("aria-")) {
|
|
713
|
-
|
|
713
|
+
r = !0;
|
|
714
714
|
break;
|
|
715
715
|
}
|
|
716
|
-
if (!
|
|
716
|
+
if (!r) continue;
|
|
717
717
|
let s, l;
|
|
718
|
-
const d = () => (s === void 0 && (s = p(
|
|
719
|
-
for (const c of
|
|
718
|
+
const d = () => (s === void 0 && (s = p(o), l = m(o)), { selector: s, html: l });
|
|
719
|
+
for (const c of o.attributes)
|
|
720
720
|
if (c.name.startsWith("aria-") && !ft.has(c.name)) {
|
|
721
721
|
const u = d();
|
|
722
722
|
a.push({
|
|
@@ -729,7 +729,7 @@ function le(e) {
|
|
|
729
729
|
});
|
|
730
730
|
break;
|
|
731
731
|
}
|
|
732
|
-
for (const c of
|
|
732
|
+
for (const c of o.attributes) {
|
|
733
733
|
if (!c.name.startsWith("aria-")) continue;
|
|
734
734
|
const u = c.value.trim();
|
|
735
735
|
if (!(u === "" && !he.has(c.name) && !ge.has(c.name))) {
|
|
@@ -799,10 +799,10 @@ function le(e) {
|
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
|
-
if (!h(
|
|
803
|
-
const c = (n =
|
|
804
|
-
if (!c &&
|
|
805
|
-
const b =
|
|
802
|
+
if (!h(o)) {
|
|
803
|
+
const c = (n = o.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase(), u = o.tagName.toLowerCase();
|
|
804
|
+
if (!c && wt[u]) {
|
|
805
|
+
const b = o.hasAttribute("aria-label"), g = o.hasAttribute("aria-labelledby");
|
|
806
806
|
if (b || g) {
|
|
807
807
|
const f = d(), v = b ? "aria-label" : "aria-labelledby";
|
|
808
808
|
i.push({
|
|
@@ -816,7 +816,7 @@ function le(e) {
|
|
|
816
816
|
}
|
|
817
817
|
} else if (c) {
|
|
818
818
|
if (fe.has(c)) {
|
|
819
|
-
const g =
|
|
819
|
+
const g = o.hasAttribute("aria-label"), f = o.hasAttribute("aria-labelledby");
|
|
820
820
|
if (g || f) {
|
|
821
821
|
const v = d(), y = g ? "aria-label" : "aria-labelledby";
|
|
822
822
|
i.push({
|
|
@@ -829,9 +829,9 @@ function le(e) {
|
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
const b =
|
|
832
|
+
const b = xt[c];
|
|
833
833
|
if (b) {
|
|
834
|
-
for (const g of
|
|
834
|
+
for (const g of o.attributes)
|
|
835
835
|
if (g.name.startsWith("aria-") && b.has(g.name)) {
|
|
836
836
|
if ((g.name === "aria-label" || g.name === "aria-labelledby") && fe.has(c))
|
|
837
837
|
continue;
|
|
@@ -849,22 +849,22 @@ function le(e) {
|
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
|
-
return
|
|
852
|
+
return D = new WeakRef(e), F = { validAttr: a, validAttrValue: t, prohibitedAttr: i }, F;
|
|
853
853
|
}
|
|
854
854
|
let ae = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap();
|
|
855
855
|
function kt() {
|
|
856
856
|
ae = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap();
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function w(e) {
|
|
859
859
|
let a = ae.get(e);
|
|
860
860
|
return a || (a = getComputedStyle(e), ae.set(e, a), a);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
863
|
-
const [i, n,
|
|
864
|
-
const s =
|
|
862
|
+
function q(e, a, t) {
|
|
863
|
+
const [i, n, o] = [e, a, t].map((r) => {
|
|
864
|
+
const s = r / 255;
|
|
865
865
|
return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
866
866
|
});
|
|
867
|
-
return 0.2126 * i + 0.7152 * n + 0.0722 *
|
|
867
|
+
return 0.2126 * i + 0.7152 * n + 0.0722 * o;
|
|
868
868
|
}
|
|
869
869
|
function $(e, a) {
|
|
870
870
|
const t = Math.max(e, a), i = Math.min(e, a);
|
|
@@ -904,12 +904,12 @@ function C(e) {
|
|
|
904
904
|
);
|
|
905
905
|
if (n)
|
|
906
906
|
return [parseInt(n[1]), parseInt(n[2]), parseInt(n[3])];
|
|
907
|
-
const
|
|
907
|
+
const o = e.match(
|
|
908
908
|
/rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:\/\s*[\d.]+%?)?\s*\)/
|
|
909
909
|
);
|
|
910
|
-
return
|
|
910
|
+
return o ? [parseInt(o[1]), parseInt(o[2]), parseInt(o[3])] : null;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function U(e) {
|
|
913
913
|
const a = e.match(/rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*([\d.]+)\s*\)/);
|
|
914
914
|
if (a) return parseFloat(a[1]);
|
|
915
915
|
const t = e.match(/rgba?\([^)]+\/\s*([\d.]+%?)\s*\)/);
|
|
@@ -942,8 +942,8 @@ function St(e) {
|
|
|
942
942
|
const a = [];
|
|
943
943
|
let t = e;
|
|
944
944
|
for (; t; ) {
|
|
945
|
-
const n =
|
|
946
|
-
if (
|
|
945
|
+
const n = w(t), o = n.backgroundImage;
|
|
946
|
+
if (o && o !== "none" && o !== "initial") {
|
|
947
947
|
const d = n.backgroundColor;
|
|
948
948
|
if (d && d !== "transparent" && d !== "rgba(0, 0, 0, 0)" && d !== "rgba(0 0 0 / 0)") {
|
|
949
949
|
const c = C(d);
|
|
@@ -952,17 +952,17 @@ function St(e) {
|
|
|
952
952
|
}
|
|
953
953
|
return null;
|
|
954
954
|
}
|
|
955
|
-
const
|
|
956
|
-
if (
|
|
955
|
+
const r = n.backgroundColor;
|
|
956
|
+
if (r === "transparent" || r === "rgba(0, 0, 0, 0)" || r === "rgba(0 0 0 / 0)") {
|
|
957
957
|
t = t.parentElement;
|
|
958
958
|
continue;
|
|
959
959
|
}
|
|
960
|
-
const s =
|
|
960
|
+
const s = U(r);
|
|
961
961
|
if (s < 0.01) {
|
|
962
962
|
t = t.parentElement;
|
|
963
963
|
continue;
|
|
964
964
|
}
|
|
965
|
-
const l = C(
|
|
965
|
+
const l = C(r);
|
|
966
966
|
if (!l) {
|
|
967
967
|
t = t.parentElement;
|
|
968
968
|
continue;
|
|
@@ -986,10 +986,10 @@ function It(e, a = [255, 255, 255]) {
|
|
|
986
986
|
if (i === -1) return t;
|
|
987
987
|
const n = e.indexOf("(", i);
|
|
988
988
|
if (n === -1) return t;
|
|
989
|
-
let
|
|
990
|
-
for (;
|
|
991
|
-
e[
|
|
992
|
-
const s = e.slice(n + 1,
|
|
989
|
+
let o = 1, r = n + 1;
|
|
990
|
+
for (; r < e.length && o > 0; r++)
|
|
991
|
+
e[r] === "(" ? o++ : e[r] === ")" && o--;
|
|
992
|
+
const s = e.slice(n + 1, r - 1), l = Fe(s);
|
|
993
993
|
for (const d of l) {
|
|
994
994
|
const c = d.trim();
|
|
995
995
|
if (/^(to\s|[\d.]+deg|[\d.]+turn|[\d.]+rad)/i.test(c)) continue;
|
|
@@ -1015,19 +1015,19 @@ function Lt(e) {
|
|
|
1015
1015
|
function Rt(e) {
|
|
1016
1016
|
let a = e, t = !1;
|
|
1017
1017
|
for (; a; ) {
|
|
1018
|
-
const i =
|
|
1018
|
+
const i = w(a).position;
|
|
1019
1019
|
if ((i === "absolute" || i === "fixed") && (t = !0), a !== e && i !== "static") {
|
|
1020
1020
|
for (const n of a.children) {
|
|
1021
1021
|
if (n === e || n.contains(e)) continue;
|
|
1022
1022
|
if (Lt(n)) {
|
|
1023
1023
|
if (t) return !0;
|
|
1024
|
-
const
|
|
1025
|
-
if (
|
|
1024
|
+
const r = w(n).position;
|
|
1025
|
+
if (r === "absolute" || r === "fixed") return !0;
|
|
1026
1026
|
}
|
|
1027
|
-
const
|
|
1028
|
-
if (
|
|
1029
|
-
const
|
|
1030
|
-
if (
|
|
1027
|
+
const o = w(n);
|
|
1028
|
+
if (o.position === "absolute" || o.position === "fixed") {
|
|
1029
|
+
const r = o.backgroundImage;
|
|
1030
|
+
if (r && r !== "none" && r !== "initial") return !0;
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
1033
|
if (t) break;
|
|
@@ -1040,8 +1040,8 @@ function Ct(e) {
|
|
|
1040
1040
|
const a = parseFloat(e);
|
|
1041
1041
|
return e.endsWith("pt") ? a * (4 / 3) : a;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
const a =
|
|
1043
|
+
function we(e) {
|
|
1044
|
+
const a = w(e), t = Ct(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
|
|
1045
1045
|
return t >= 23.5 || t >= 18.5 && i >= 700;
|
|
1046
1046
|
}
|
|
1047
1047
|
function Tt(e) {
|
|
@@ -1049,32 +1049,32 @@ function Tt(e) {
|
|
|
1049
1049
|
for (const i of a) {
|
|
1050
1050
|
const n = i.trim();
|
|
1051
1051
|
if (!n) continue;
|
|
1052
|
-
const
|
|
1053
|
-
if (!
|
|
1052
|
+
const o = n.match(/rgba?\([^)]+\)/), r = o ? C(o[0]) : null;
|
|
1053
|
+
if (!r) return null;
|
|
1054
1054
|
const s = n.replace(/rgba?\([^)]+\)/, "").match(/[\d.]+px/g), l = s && s.length >= 3 ? parseFloat(s[2]) : 0;
|
|
1055
|
-
t.push({ color:
|
|
1055
|
+
t.push({ color: r, blur: l });
|
|
1056
1056
|
}
|
|
1057
1057
|
return t.length > 0 ? t : null;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function xe(e) {
|
|
1060
1060
|
return e === "transparent" || e === "rgba(0, 0, 0, 0)" || e === "rgba(0 0 0 / 0)";
|
|
1061
1061
|
}
|
|
1062
1062
|
function _([e, a, t]) {
|
|
1063
1063
|
return "#" + [e, a, t].map((i) => i.toString(16).padStart(2, "0")).join("");
|
|
1064
1064
|
}
|
|
1065
1065
|
function Nt(e, a, t) {
|
|
1066
|
-
const i =
|
|
1067
|
-
let
|
|
1068
|
-
for (const
|
|
1069
|
-
const s =
|
|
1070
|
-
|
|
1066
|
+
const i = q(e[0], e[1], e[2]), n = q(a[0], a[1], a[2]);
|
|
1067
|
+
let o = $(i, n);
|
|
1068
|
+
for (const r of t) {
|
|
1069
|
+
const s = q(r.color[0], r.color[1], r.color[2]);
|
|
1070
|
+
o = Math.max(o, $(i, s), $(s, n));
|
|
1071
1071
|
}
|
|
1072
|
-
return
|
|
1072
|
+
return o;
|
|
1073
1073
|
}
|
|
1074
1074
|
function Mt(e) {
|
|
1075
1075
|
let a = 1, t = e;
|
|
1076
1076
|
for (; t; ) {
|
|
1077
|
-
const i =
|
|
1077
|
+
const i = w(t), n = parseFloat(i.opacity);
|
|
1078
1078
|
isNaN(n) || (a *= n), t = t.parentElement;
|
|
1079
1079
|
}
|
|
1080
1080
|
return a;
|
|
@@ -1084,28 +1084,28 @@ function $t(e) {
|
|
|
1084
1084
|
for (; a; ) {
|
|
1085
1085
|
for (const n of ["::before", "::after"])
|
|
1086
1086
|
try {
|
|
1087
|
-
const
|
|
1088
|
-
if (!
|
|
1089
|
-
const s =
|
|
1090
|
-
if (s && !
|
|
1091
|
-
const l =
|
|
1087
|
+
const o = getComputedStyle(a, n), r = o.content;
|
|
1088
|
+
if (!r || r === "none" || r === "normal" || r === '""') continue;
|
|
1089
|
+
const s = o.backgroundColor;
|
|
1090
|
+
if (s && !xe(s) && U(s) >= 0.1) return !0;
|
|
1091
|
+
const l = o.backgroundImage;
|
|
1092
1092
|
if (l && l !== "none" && l !== "initial") return !0;
|
|
1093
|
-
const d =
|
|
1093
|
+
const d = o.position;
|
|
1094
1094
|
if (d === "absolute" || d === "fixed") {
|
|
1095
|
-
const c = parseFloat(
|
|
1095
|
+
const c = parseFloat(o.width), u = parseFloat(o.height);
|
|
1096
1096
|
if (c > 1 && u > 1) return !0;
|
|
1097
1097
|
}
|
|
1098
1098
|
} catch {
|
|
1099
1099
|
}
|
|
1100
|
-
const i =
|
|
1101
|
-
if (i && !
|
|
1100
|
+
const i = w(a).backgroundColor;
|
|
1101
|
+
if (i && !xe(i) && U(i) >= 1) break;
|
|
1102
1102
|
a = a.parentElement;
|
|
1103
1103
|
}
|
|
1104
1104
|
return !1;
|
|
1105
1105
|
}
|
|
1106
1106
|
const G = /* @__PURE__ */ new Map();
|
|
1107
|
-
function
|
|
1108
|
-
G.set(e, a),
|
|
1107
|
+
function On(e, a) {
|
|
1108
|
+
G.set(e, a), oe.delete(e);
|
|
1109
1109
|
}
|
|
1110
1110
|
function Ht(e, a) {
|
|
1111
1111
|
const t = G.get(a);
|
|
@@ -1118,42 +1118,42 @@ function Ht(e, a) {
|
|
|
1118
1118
|
} : i;
|
|
1119
1119
|
}) : e;
|
|
1120
1120
|
}
|
|
1121
|
-
const
|
|
1122
|
-
function
|
|
1121
|
+
const oe = /* @__PURE__ */ new Map();
|
|
1122
|
+
function Pt(e) {
|
|
1123
1123
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function Dt(e) {
|
|
1126
1126
|
const a = e.split(/\{(\d+)\}/);
|
|
1127
1127
|
let t = "^";
|
|
1128
1128
|
for (let i = 0; i < a.length; i++)
|
|
1129
|
-
i % 2 === 0 ? t +=
|
|
1129
|
+
i % 2 === 0 ? t += Pt(a[i]) : t += "(.+?)";
|
|
1130
1130
|
return t += "$", new RegExp(t);
|
|
1131
1131
|
}
|
|
1132
1132
|
function Ft(e, a) {
|
|
1133
|
-
let t =
|
|
1134
|
-
if (t || (t = /* @__PURE__ */ new Map(),
|
|
1133
|
+
let t = oe.get(e);
|
|
1134
|
+
if (t || (t = /* @__PURE__ */ new Map(), oe.set(e, t)), t.has(a)) return t.get(a);
|
|
1135
1135
|
const i = G.get(e);
|
|
1136
1136
|
if (!i) return;
|
|
1137
1137
|
const n = i[a];
|
|
1138
1138
|
if (!(n != null && n.messages))
|
|
1139
1139
|
return t.set(a, []), [];
|
|
1140
|
-
const
|
|
1141
|
-
for (const [
|
|
1142
|
-
|
|
1143
|
-
regex:
|
|
1140
|
+
const o = [];
|
|
1141
|
+
for (const [r, s] of Object.entries(n.messages))
|
|
1142
|
+
o.push({
|
|
1143
|
+
regex: Dt(r),
|
|
1144
1144
|
translated: s
|
|
1145
1145
|
});
|
|
1146
|
-
return t.set(a,
|
|
1146
|
+
return t.set(a, o), o;
|
|
1147
1147
|
}
|
|
1148
1148
|
function zt(e, a, t) {
|
|
1149
1149
|
const i = Ft(t, e);
|
|
1150
1150
|
if (!i) return a;
|
|
1151
|
-
for (const { regex: n, translated:
|
|
1152
|
-
const
|
|
1153
|
-
if (
|
|
1154
|
-
return
|
|
1151
|
+
for (const { regex: n, translated: o } of i) {
|
|
1152
|
+
const r = a.match(n);
|
|
1153
|
+
if (r)
|
|
1154
|
+
return o.replace(/\{(\d+)\}/g, (s, l) => {
|
|
1155
1155
|
const d = parseInt(l, 10);
|
|
1156
|
-
return d + 1 <
|
|
1156
|
+
return d + 1 < r.length ? r[d + 1] : `{${l}}`;
|
|
1157
1157
|
});
|
|
1158
1158
|
}
|
|
1159
1159
|
return a;
|
|
@@ -1165,7 +1165,7 @@ function ze(e, a) {
|
|
|
1165
1165
|
}) : e;
|
|
1166
1166
|
}
|
|
1167
1167
|
function Ae(e) {
|
|
1168
|
-
var
|
|
1168
|
+
var o, r;
|
|
1169
1169
|
const a = [], t = e.closest("a");
|
|
1170
1170
|
if (t) {
|
|
1171
1171
|
const s = t.getAttribute("href");
|
|
@@ -1174,11 +1174,11 @@ function Ae(e) {
|
|
|
1174
1174
|
const i = e.closest("figure");
|
|
1175
1175
|
if (i) {
|
|
1176
1176
|
const s = i.querySelector("figcaption");
|
|
1177
|
-
(
|
|
1177
|
+
(o = s == null ? void 0 : s.textContent) != null && o.trim() && a.push(`Figcaption: ${s.textContent.trim().slice(0, 100)}`);
|
|
1178
1178
|
}
|
|
1179
1179
|
const n = e.parentElement;
|
|
1180
1180
|
if (n && n !== t) {
|
|
1181
|
-
const s = e instanceof HTMLImageElement && e.alt || "", l = (
|
|
1181
|
+
const s = e instanceof HTMLImageElement && e.alt || "", l = (r = n.textContent) == null ? void 0 : r.replace(s, "").trim().slice(0, 100);
|
|
1182
1182
|
l && a.push(`Adjacent text: ${l}`);
|
|
1183
1183
|
}
|
|
1184
1184
|
return a.length > 0 ? a.join(`
|
|
@@ -1193,15 +1193,15 @@ const jt = {
|
|
|
1193
1193
|
fixability: "contextual",
|
|
1194
1194
|
browserHint: "Screenshot the image to describe its visual content for alt text.",
|
|
1195
1195
|
description: `Images must have alternate text. Add an alt attribute to <img> elements. Decorative images may use an empty alt attribute (alt=""), role='none', or role='presentation'.`,
|
|
1196
|
-
guidance: "Every image needs an alt attribute. For informative images, describe the content or function concisely. For decorative images (backgrounds, spacers, purely visual flourishes), use alt='' to hide them from screen readers. Never omit alt entirely—screen readers may read the filename instead.",
|
|
1196
|
+
guidance: "Every image needs an alt attribute. For informative images, describe the content or function concisely. For decorative images (backgrounds, spacers, purely visual flourishes), use alt='' to hide them from screen readers. Never omit alt entirely—screen readers may read the filename instead. When an image is inside a link or button that already has text, use alt='' if the image is decorative in that context, or write alt text that complements (not duplicates) the existing text.",
|
|
1197
1197
|
run(e) {
|
|
1198
1198
|
const a = [];
|
|
1199
1199
|
for (const t of e.querySelectorAll("img")) {
|
|
1200
|
-
if (h(t) ||
|
|
1200
|
+
if (h(t) || Pe(t)) continue;
|
|
1201
1201
|
const i = t.getAttribute("role");
|
|
1202
1202
|
if (i === "presentation" || i === "none") {
|
|
1203
|
-
const
|
|
1204
|
-
if (!
|
|
1203
|
+
const o = t.getAttribute("tabindex");
|
|
1204
|
+
if (!o || o === "-1") continue;
|
|
1205
1205
|
}
|
|
1206
1206
|
const n = t.getAttribute("alt");
|
|
1207
1207
|
if (n !== null && n.trim() === "" && n !== "") {
|
|
@@ -1216,7 +1216,7 @@ const jt = {
|
|
|
1216
1216
|
});
|
|
1217
1217
|
continue;
|
|
1218
1218
|
}
|
|
1219
|
-
!t.hasAttribute("alt") && !
|
|
1219
|
+
!t.hasAttribute("alt") && !x(t) && a.push({
|
|
1220
1220
|
ruleId: "text-alternatives/img-alt",
|
|
1221
1221
|
selector: p(t),
|
|
1222
1222
|
html: m(t),
|
|
@@ -1229,14 +1229,14 @@ const jt = {
|
|
|
1229
1229
|
return a;
|
|
1230
1230
|
}
|
|
1231
1231
|
};
|
|
1232
|
-
function
|
|
1232
|
+
function Wt(e) {
|
|
1233
1233
|
var i;
|
|
1234
|
-
const a =
|
|
1234
|
+
const a = De(e);
|
|
1235
1235
|
if (a) return a;
|
|
1236
1236
|
const t = e.querySelector("title");
|
|
1237
1237
|
return (i = t == null ? void 0 : t.textContent) != null && i.trim() ? t.textContent.trim() : "";
|
|
1238
1238
|
}
|
|
1239
|
-
const
|
|
1239
|
+
const Ut = {
|
|
1240
1240
|
id: "text-alternatives/svg-img-alt",
|
|
1241
1241
|
category: "text-alternatives",
|
|
1242
1242
|
actRuleIds: ["7d6734"],
|
|
@@ -1250,14 +1250,14 @@ const Wt = {
|
|
|
1250
1250
|
const a = [], t = 'svg[role="img"], [role="graphics-document"], [role="graphics-symbol"]';
|
|
1251
1251
|
for (const i of e.querySelectorAll(t)) {
|
|
1252
1252
|
if (h(i)) continue;
|
|
1253
|
-
if (!
|
|
1254
|
-
const
|
|
1253
|
+
if (!Wt(i)) {
|
|
1254
|
+
const o = i.getAttribute("role");
|
|
1255
1255
|
a.push({
|
|
1256
1256
|
ruleId: "text-alternatives/svg-img-alt",
|
|
1257
1257
|
selector: p(i),
|
|
1258
1258
|
html: m(i),
|
|
1259
1259
|
impact: "serious",
|
|
1260
|
-
message: `${i.tagName.toLowerCase()} with role='${
|
|
1260
|
+
message: `${i.tagName.toLowerCase()} with role='${o}' has no accessible name.`,
|
|
1261
1261
|
fix: { type: "add-attribute", attribute: "aria-label", value: "" }
|
|
1262
1262
|
});
|
|
1263
1263
|
}
|
|
@@ -1277,7 +1277,7 @@ const Wt = {
|
|
|
1277
1277
|
run(e) {
|
|
1278
1278
|
const a = [];
|
|
1279
1279
|
for (const t of e.querySelectorAll('input[type="image"]'))
|
|
1280
|
-
h(t) ||
|
|
1280
|
+
h(t) || x(t) || a.push({
|
|
1281
1281
|
ruleId: "text-alternatives/input-image-alt",
|
|
1282
1282
|
selector: p(t),
|
|
1283
1283
|
html: m(t),
|
|
@@ -1302,11 +1302,11 @@ const Wt = {
|
|
|
1302
1302
|
for (const i of e.querySelectorAll("img[alt]")) {
|
|
1303
1303
|
const n = i.getAttribute("alt").trim().toLowerCase();
|
|
1304
1304
|
if (!n) continue;
|
|
1305
|
-
const
|
|
1306
|
-
if (
|
|
1307
|
-
const
|
|
1308
|
-
if (
|
|
1309
|
-
const s =
|
|
1305
|
+
const o = i.closest("a, button");
|
|
1306
|
+
if (o) {
|
|
1307
|
+
const r = ((t = o.textContent) == null ? void 0 : t.trim().toLowerCase()) || "";
|
|
1308
|
+
if (r && r === n) {
|
|
1309
|
+
const s = o.tagName.toLowerCase(), l = o.getAttribute("href");
|
|
1310
1310
|
a.push({
|
|
1311
1311
|
ruleId: "text-alternatives/image-redundant-alt",
|
|
1312
1312
|
selector: p(i),
|
|
@@ -1336,7 +1336,7 @@ const Wt = {
|
|
|
1336
1336
|
for (const t of e.querySelectorAll("img[alt]")) {
|
|
1337
1337
|
const i = t.getAttribute("alt").toLowerCase();
|
|
1338
1338
|
if (!i) continue;
|
|
1339
|
-
const n = Bt.filter((
|
|
1339
|
+
const n = Bt.filter((o) => i.split(/\s+/).includes(o));
|
|
1340
1340
|
n.length > 0 && a.push({
|
|
1341
1341
|
ruleId: "text-alternatives/image-alt-words",
|
|
1342
1342
|
selector: p(t),
|
|
@@ -1361,7 +1361,7 @@ const Wt = {
|
|
|
1361
1361
|
const a = [];
|
|
1362
1362
|
for (const t of e.querySelectorAll("area[href]")) {
|
|
1363
1363
|
if (h(t)) continue;
|
|
1364
|
-
|
|
1364
|
+
x(t) || a.push({
|
|
1365
1365
|
ruleId: "text-alternatives/area-alt",
|
|
1366
1366
|
selector: p(t),
|
|
1367
1367
|
html: m(t),
|
|
@@ -1386,7 +1386,7 @@ const Wt = {
|
|
|
1386
1386
|
var t;
|
|
1387
1387
|
const a = [];
|
|
1388
1388
|
for (const i of e.querySelectorAll("object")) {
|
|
1389
|
-
if (h(i) ||
|
|
1389
|
+
if (h(i) || Pe(i) || i.getAttribute("role") === "presentation" || i.getAttribute("role") === "none" || De(i)) continue;
|
|
1390
1390
|
const n = i.getAttribute("data") || "";
|
|
1391
1391
|
if (!((i.getAttribute("type") || "").startsWith("image/") || /\.(png|jpg|jpeg|gif|svg|webp|bmp|ico)$/i.test(n))) {
|
|
1392
1392
|
const s = i.querySelector("img[alt]");
|
|
@@ -1417,7 +1417,7 @@ const Wt = {
|
|
|
1417
1417
|
const a = [];
|
|
1418
1418
|
for (const t of e.querySelectorAll('[role="img"]')) {
|
|
1419
1419
|
if (h(t) || t.tagName.toLowerCase() === "svg" || t.tagName.toLowerCase() === "img") continue;
|
|
1420
|
-
|
|
1420
|
+
x(t) || a.push({
|
|
1421
1421
|
ruleId: "text-alternatives/role-img-alt",
|
|
1422
1422
|
selector: p(t),
|
|
1423
1423
|
html: m(t),
|
|
@@ -1441,7 +1441,7 @@ const Wt = {
|
|
|
1441
1441
|
run(e) {
|
|
1442
1442
|
const a = [];
|
|
1443
1443
|
for (const t of e.querySelectorAll("video")) {
|
|
1444
|
-
if (h(t) ||
|
|
1444
|
+
if (h(t) || I(t) || t.hasAttribute("muted") || t.hasAttribute("autoplay")) continue;
|
|
1445
1445
|
t.querySelector('track[kind="captions"], track[kind="subtitles"]') || a.push({
|
|
1446
1446
|
ruleId: "time-based-media/video-captions",
|
|
1447
1447
|
selector: p(t),
|
|
@@ -1465,7 +1465,7 @@ const Wt = {
|
|
|
1465
1465
|
run(e) {
|
|
1466
1466
|
const a = [];
|
|
1467
1467
|
for (const t of e.querySelectorAll("audio")) {
|
|
1468
|
-
if (h(t) ||
|
|
1468
|
+
if (h(t) || I(t) || t.querySelector('track[kind="captions"], track[kind="descriptions"]') || t.hasAttribute("aria-describedby")) continue;
|
|
1469
1469
|
const n = t.parentElement;
|
|
1470
1470
|
n && n.querySelector('a[href*="transcript"], a[href*="text"]') || a.push({
|
|
1471
1471
|
ruleId: "time-based-media/audio-transcript",
|
|
@@ -1564,7 +1564,7 @@ const na = {
|
|
|
1564
1564
|
run(e) {
|
|
1565
1565
|
const a = [];
|
|
1566
1566
|
for (const t of e.querySelectorAll("[autocomplete]")) {
|
|
1567
|
-
if (h(t) ||
|
|
1567
|
+
if (h(t) || I(t) || t.disabled || t.getAttribute("aria-disabled") === "true") continue;
|
|
1568
1568
|
const i = t.getAttribute("autocomplete").trim();
|
|
1569
1569
|
i && (ia(i) || a.push({
|
|
1570
1570
|
ruleId: "adaptable/autocomplete-valid",
|
|
@@ -1577,7 +1577,7 @@ const na = {
|
|
|
1577
1577
|
return a;
|
|
1578
1578
|
}
|
|
1579
1579
|
};
|
|
1580
|
-
function
|
|
1580
|
+
function Vn(e) {
|
|
1581
1581
|
if (typeof e != "object" || e === null)
|
|
1582
1582
|
return "Rule spec must be an object";
|
|
1583
1583
|
const a = e;
|
|
@@ -1607,10 +1607,10 @@ function On(e) {
|
|
|
1607
1607
|
return "Rule must have a wcag array";
|
|
1608
1608
|
if (typeof a.level != "string" || !["A", "AA"].includes(a.level))
|
|
1609
1609
|
return "Rule must have level A or AA";
|
|
1610
|
-
const n =
|
|
1610
|
+
const n = oa(t);
|
|
1611
1611
|
return n || null;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function oa(e) {
|
|
1614
1614
|
switch (e.type) {
|
|
1615
1615
|
case "selector-exists":
|
|
1616
1616
|
return null;
|
|
@@ -1650,28 +1650,28 @@ function N(e) {
|
|
|
1650
1650
|
description: e.description,
|
|
1651
1651
|
guidance: e.guidance,
|
|
1652
1652
|
run(t) {
|
|
1653
|
-
var n,
|
|
1653
|
+
var n, o;
|
|
1654
1654
|
const i = [];
|
|
1655
1655
|
switch (e.check.type) {
|
|
1656
1656
|
case "selector-exists": {
|
|
1657
|
-
for (const
|
|
1658
|
-
a && h(
|
|
1657
|
+
for (const r of t.querySelectorAll(e.selector))
|
|
1658
|
+
a && h(r) || i.push({
|
|
1659
1659
|
ruleId: e.id,
|
|
1660
|
-
selector: p(
|
|
1661
|
-
html: m(
|
|
1660
|
+
selector: p(r),
|
|
1661
|
+
html: m(r),
|
|
1662
1662
|
impact: e.impact,
|
|
1663
|
-
message: L(e.message,
|
|
1663
|
+
message: L(e.message, r, e.check),
|
|
1664
1664
|
...e.fix ? { fix: e.fix } : {},
|
|
1665
|
-
element:
|
|
1665
|
+
element: r
|
|
1666
1666
|
});
|
|
1667
1667
|
break;
|
|
1668
1668
|
}
|
|
1669
1669
|
case "attribute-value": {
|
|
1670
|
-
const { attribute:
|
|
1670
|
+
const { attribute: r, operator: s, value: l } = e.check;
|
|
1671
1671
|
for (const d of t.querySelectorAll(e.selector)) {
|
|
1672
1672
|
if (a && h(d)) continue;
|
|
1673
|
-
const c = d.getAttribute(
|
|
1674
|
-
c !== null &&
|
|
1673
|
+
const c = d.getAttribute(r);
|
|
1674
|
+
c !== null && ra(c, s, l) && i.push({
|
|
1675
1675
|
ruleId: e.id,
|
|
1676
1676
|
selector: p(d),
|
|
1677
1677
|
html: m(d),
|
|
@@ -1684,9 +1684,9 @@ function N(e) {
|
|
|
1684
1684
|
break;
|
|
1685
1685
|
}
|
|
1686
1686
|
case "attribute-missing": {
|
|
1687
|
-
const { attribute:
|
|
1687
|
+
const { attribute: r } = e.check;
|
|
1688
1688
|
for (const s of t.querySelectorAll(e.selector))
|
|
1689
|
-
a && h(s) || s.hasAttribute(
|
|
1689
|
+
a && h(s) || s.hasAttribute(r) || i.push({
|
|
1690
1690
|
ruleId: e.id,
|
|
1691
1691
|
selector: p(s),
|
|
1692
1692
|
html: m(s),
|
|
@@ -1698,7 +1698,7 @@ function N(e) {
|
|
|
1698
1698
|
break;
|
|
1699
1699
|
}
|
|
1700
1700
|
case "attribute-regex": {
|
|
1701
|
-
const { attribute:
|
|
1701
|
+
const { attribute: r, pattern: s, flags: l, shouldMatch: d } = e.check;
|
|
1702
1702
|
let c;
|
|
1703
1703
|
try {
|
|
1704
1704
|
c = new RegExp(s, l);
|
|
@@ -1707,7 +1707,7 @@ function N(e) {
|
|
|
1707
1707
|
}
|
|
1708
1708
|
for (const u of t.querySelectorAll(e.selector)) {
|
|
1709
1709
|
if (a && h(u)) continue;
|
|
1710
|
-
const b = u.getAttribute(
|
|
1710
|
+
const b = u.getAttribute(r);
|
|
1711
1711
|
if (b === null) continue;
|
|
1712
1712
|
const g = c.test(b);
|
|
1713
1713
|
d && !g ? i.push({
|
|
@@ -1731,9 +1731,9 @@ function N(e) {
|
|
|
1731
1731
|
break;
|
|
1732
1732
|
}
|
|
1733
1733
|
case "child-required": {
|
|
1734
|
-
const { childSelector:
|
|
1734
|
+
const { childSelector: r } = e.check;
|
|
1735
1735
|
for (const s of t.querySelectorAll(e.selector))
|
|
1736
|
-
a && h(s) || s.querySelector(
|
|
1736
|
+
a && h(s) || s.querySelector(r) || i.push({
|
|
1737
1737
|
ruleId: e.id,
|
|
1738
1738
|
selector: p(s),
|
|
1739
1739
|
html: m(s),
|
|
@@ -1745,7 +1745,7 @@ function N(e) {
|
|
|
1745
1745
|
break;
|
|
1746
1746
|
}
|
|
1747
1747
|
case "child-invalid": {
|
|
1748
|
-
const
|
|
1748
|
+
const r = new Set(
|
|
1749
1749
|
e.check.allowedChildren.map((l) => l.toLowerCase())
|
|
1750
1750
|
), s = e.check.allowedChildRoles ? new Set(e.check.allowedChildRoles.map((l) => l.toLowerCase())) : null;
|
|
1751
1751
|
for (const l of t.querySelectorAll(e.selector)) {
|
|
@@ -1772,8 +1772,8 @@ function N(e) {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
if (!c)
|
|
1774
1774
|
for (const b of l.children) {
|
|
1775
|
-
if (
|
|
1776
|
-
const g = (
|
|
1775
|
+
if (r.has(b.tagName.toLowerCase())) continue;
|
|
1776
|
+
const g = (o = b.getAttribute("role")) == null ? void 0 : o.trim().toLowerCase();
|
|
1777
1777
|
if (!(g && (s != null && s.has(g))) && !(g === "presentation" || g === "none")) {
|
|
1778
1778
|
i.push({
|
|
1779
1779
|
ruleId: e.id,
|
|
@@ -1795,7 +1795,7 @@ function N(e) {
|
|
|
1795
1795
|
}
|
|
1796
1796
|
};
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function ra(e, a, t) {
|
|
1799
1799
|
switch (a) {
|
|
1800
1800
|
case ">":
|
|
1801
1801
|
return parseFloat(e) > t;
|
|
@@ -1839,8 +1839,8 @@ const sa = {
|
|
|
1839
1839
|
if (h(i)) continue;
|
|
1840
1840
|
const n = i.parentElement;
|
|
1841
1841
|
if (!n) continue;
|
|
1842
|
-
const
|
|
1843
|
-
|
|
1842
|
+
const o = n.tagName.toLowerCase();
|
|
1843
|
+
o === "ul" || o === "ol" || o === "menu" || ((t = n.getAttribute("role")) == null ? void 0 : t.trim().toLowerCase()) === "list" || a.push({
|
|
1844
1844
|
ruleId: "adaptable/listitem-parent",
|
|
1845
1845
|
selector: p(i),
|
|
1846
1846
|
html: m(i),
|
|
@@ -1862,8 +1862,8 @@ const sa = {
|
|
|
1862
1862
|
var t;
|
|
1863
1863
|
const a = [];
|
|
1864
1864
|
for (const i of e.querySelectorAll("dt, dd")) {
|
|
1865
|
-
const n = i.parentElement,
|
|
1866
|
-
(!n ||
|
|
1865
|
+
const n = i.parentElement, o = n == null ? void 0 : n.tagName.toLowerCase();
|
|
1866
|
+
(!n || o !== "dl" && !(o === "div" && ((t = n.parentElement) == null ? void 0 : t.tagName.toLowerCase()) === "dl")) && a.push({
|
|
1867
1867
|
ruleId: "adaptable/dl-children",
|
|
1868
1868
|
selector: p(i),
|
|
1869
1869
|
html: m(i),
|
|
@@ -1914,15 +1914,15 @@ function pa(e) {
|
|
|
1914
1914
|
/matrix\(\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)/i
|
|
1915
1915
|
);
|
|
1916
1916
|
if (t) {
|
|
1917
|
-
const n = parseFloat(t[1]),
|
|
1918
|
-
if (B(
|
|
1917
|
+
const n = parseFloat(t[1]), o = parseFloat(t[2]), r = Math.atan2(o, n) * (180 / Math.PI);
|
|
1918
|
+
if (B(r)) return !0;
|
|
1919
1919
|
}
|
|
1920
1920
|
const i = e.match(
|
|
1921
1921
|
/matrix3d\(\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)/i
|
|
1922
1922
|
);
|
|
1923
1923
|
if (i) {
|
|
1924
|
-
const n = parseFloat(i[1]),
|
|
1925
|
-
if (B(
|
|
1924
|
+
const n = parseFloat(i[1]), o = parseFloat(i[2]), r = Math.atan2(o, n) * (180 / Math.PI);
|
|
1925
|
+
if (B(r)) return !0;
|
|
1926
1926
|
}
|
|
1927
1927
|
return !1;
|
|
1928
1928
|
}
|
|
@@ -1946,15 +1946,15 @@ const ha = {
|
|
|
1946
1946
|
const a = [];
|
|
1947
1947
|
for (const t of e.querySelectorAll("style")) {
|
|
1948
1948
|
const i = t.textContent || "", n = /@media[^{]*\b(orientation)\s*:\s*(portrait|landscape)\b[^{]*\{([^}]*\{[^}]*\}[^}]*)\}/gi;
|
|
1949
|
-
let
|
|
1950
|
-
for (;
|
|
1951
|
-
const
|
|
1949
|
+
let o;
|
|
1950
|
+
for (; o = n.exec(i); ) {
|
|
1951
|
+
const r = o[3];
|
|
1952
1952
|
let s = !1;
|
|
1953
|
-
const l =
|
|
1953
|
+
const l = r.match(
|
|
1954
1954
|
/transform\s*:\s*([^;]+)/i
|
|
1955
1955
|
);
|
|
1956
1956
|
if (l && pa(l[1]) && (s = !0), !s) {
|
|
1957
|
-
const d =
|
|
1957
|
+
const d = r.match(
|
|
1958
1958
|
/(?:^|[{;\s])rotate\s*:\s*([^;]+)/i
|
|
1959
1959
|
);
|
|
1960
1960
|
d && ba(d[1]) && (s = !0);
|
|
@@ -1964,7 +1964,7 @@ const ha = {
|
|
|
1964
1964
|
selector: p(t),
|
|
1965
1965
|
html: m(t),
|
|
1966
1966
|
impact: "serious",
|
|
1967
|
-
message: `CSS locks page orientation via @media (orientation: ${
|
|
1967
|
+
message: `CSS locks page orientation via @media (orientation: ${o[2]}) with a 90° transform.`
|
|
1968
1968
|
});
|
|
1969
1969
|
}
|
|
1970
1970
|
}
|
|
@@ -2001,24 +2001,24 @@ const ha = {
|
|
|
2001
2001
|
"treegrid"
|
|
2002
2002
|
]);
|
|
2003
2003
|
function fa(e, a) {
|
|
2004
|
-
var
|
|
2005
|
-
const t = ((
|
|
2006
|
-
let
|
|
2004
|
+
var r;
|
|
2005
|
+
const t = ((r = e.getAttribute("aria-owns")) == null ? void 0 : r.split(/\s+/)) || [], i = e.ownerDocument, n = /* @__PURE__ */ new Set();
|
|
2006
|
+
let o = !1;
|
|
2007
2007
|
for (const s of e.querySelectorAll("*")) {
|
|
2008
2008
|
if (h(s)) continue;
|
|
2009
|
-
|
|
2010
|
-
const l =
|
|
2009
|
+
o = !0;
|
|
2010
|
+
const l = W(s);
|
|
2011
2011
|
l && n.add(l);
|
|
2012
2012
|
}
|
|
2013
2013
|
for (const s of t) {
|
|
2014
2014
|
const l = i.getElementById(s);
|
|
2015
2015
|
if (l && !h(l)) {
|
|
2016
|
-
|
|
2017
|
-
const d =
|
|
2016
|
+
o = !0;
|
|
2017
|
+
const d = W(l);
|
|
2018
2018
|
d && n.add(d);
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
2021
|
-
if (!
|
|
2021
|
+
if (!o) return "empty";
|
|
2022
2022
|
for (const s of a)
|
|
2023
2023
|
if (!s.some((l) => n.has(l))) return "fail";
|
|
2024
2024
|
return "pass";
|
|
@@ -2044,9 +2044,9 @@ const va = {
|
|
|
2044
2044
|
const l = i.tagName.toLowerCase();
|
|
2045
2045
|
if (l === "input" || l === "textarea") continue;
|
|
2046
2046
|
}
|
|
2047
|
-
const
|
|
2048
|
-
if (
|
|
2049
|
-
const s =
|
|
2047
|
+
const o = ke[n], r = fa(i, o);
|
|
2048
|
+
if (r === "pass" || r === "empty" && ga.has(n)) continue;
|
|
2049
|
+
const s = o.map((l) => l.join(" or ")).join(", ");
|
|
2050
2050
|
a.push({
|
|
2051
2051
|
ruleId: "adaptable/aria-required-children",
|
|
2052
2052
|
selector: p(i),
|
|
@@ -2088,27 +2088,27 @@ const va = {
|
|
|
2088
2088
|
if (h(i)) continue;
|
|
2089
2089
|
const n = (t = i.getAttribute("role")) == null ? void 0 : t.trim().toLowerCase();
|
|
2090
2090
|
if (!n || !(n in Se)) continue;
|
|
2091
|
-
const
|
|
2092
|
-
let
|
|
2093
|
-
for (;
|
|
2094
|
-
const l =
|
|
2095
|
-
if (l &&
|
|
2091
|
+
const o = Se[n];
|
|
2092
|
+
let r = i.parentElement, s = !1;
|
|
2093
|
+
for (; r && r !== e.documentElement; ) {
|
|
2094
|
+
const l = W(r);
|
|
2095
|
+
if (l && o.includes(l)) {
|
|
2096
2096
|
s = !0;
|
|
2097
2097
|
break;
|
|
2098
2098
|
}
|
|
2099
|
-
|
|
2099
|
+
r = r.parentElement;
|
|
2100
2100
|
}
|
|
2101
2101
|
s || a.push({
|
|
2102
2102
|
ruleId: "adaptable/aria-required-parent",
|
|
2103
2103
|
selector: p(i),
|
|
2104
2104
|
html: m(i),
|
|
2105
2105
|
impact: "critical",
|
|
2106
|
-
message: `Role "${n}" must be contained within: ${
|
|
2106
|
+
message: `Role "${n}" must be contained within: ${o.join(", ")}.`
|
|
2107
2107
|
});
|
|
2108
2108
|
}
|
|
2109
2109
|
return a;
|
|
2110
2110
|
}
|
|
2111
|
-
},
|
|
2111
|
+
}, wa = {
|
|
2112
2112
|
id: "adaptable/td-headers-attr",
|
|
2113
2113
|
category: "adaptable",
|
|
2114
2114
|
actRuleIds: ["a25f45"],
|
|
@@ -2123,25 +2123,25 @@ const va = {
|
|
|
2123
2123
|
if (h(t)) continue;
|
|
2124
2124
|
const i = t.closest("table");
|
|
2125
2125
|
if (!i) continue;
|
|
2126
|
-
const n = t.getAttribute("id"),
|
|
2127
|
-
for (const
|
|
2128
|
-
if (
|
|
2126
|
+
const n = t.getAttribute("id"), o = t.getAttribute("headers").split(/\s+/);
|
|
2127
|
+
for (const r of o) {
|
|
2128
|
+
if (r === n) {
|
|
2129
2129
|
a.push({
|
|
2130
2130
|
ruleId: "adaptable/td-headers-attr",
|
|
2131
2131
|
selector: p(t),
|
|
2132
2132
|
html: m(t),
|
|
2133
2133
|
impact: "serious",
|
|
2134
|
-
message: `Headers attribute references the cell itself ("${
|
|
2134
|
+
message: `Headers attribute references the cell itself ("${r}").`
|
|
2135
2135
|
});
|
|
2136
2136
|
break;
|
|
2137
2137
|
}
|
|
2138
|
-
if (!i.querySelector(`th#${CSS.escape(
|
|
2138
|
+
if (!i.querySelector(`th#${CSS.escape(r)}, td#${CSS.escape(r)}`)) {
|
|
2139
2139
|
a.push({
|
|
2140
2140
|
ruleId: "adaptable/td-headers-attr",
|
|
2141
2141
|
selector: p(t),
|
|
2142
2142
|
html: m(t),
|
|
2143
2143
|
impact: "serious",
|
|
2144
|
-
message: `Headers attribute references non-existent ID "${
|
|
2144
|
+
message: `Headers attribute references non-existent ID "${r}".`
|
|
2145
2145
|
});
|
|
2146
2146
|
break;
|
|
2147
2147
|
}
|
|
@@ -2149,7 +2149,7 @@ const va = {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
return a;
|
|
2151
2151
|
}
|
|
2152
|
-
},
|
|
2152
|
+
}, xa = {
|
|
2153
2153
|
id: "adaptable/th-has-data-cells",
|
|
2154
2154
|
category: "adaptable",
|
|
2155
2155
|
actRuleIds: ["d0f69e"],
|
|
@@ -2205,16 +2205,16 @@ const ka = {
|
|
|
2205
2205
|
const a = [];
|
|
2206
2206
|
for (const i of e.querySelectorAll("table")) {
|
|
2207
2207
|
if (h(i) || !Aa(i)) continue;
|
|
2208
|
-
const n = i.querySelectorAll("tr"),
|
|
2209
|
-
let
|
|
2208
|
+
const n = i.querySelectorAll("tr"), o = n.length;
|
|
2209
|
+
let r = 0;
|
|
2210
2210
|
for (const d of n) {
|
|
2211
2211
|
const c = d.querySelectorAll("td, th");
|
|
2212
2212
|
let u = 0;
|
|
2213
2213
|
for (const b of c)
|
|
2214
2214
|
u += parseInt(b.getAttribute("colspan") || "1", 10);
|
|
2215
|
-
|
|
2215
|
+
r = Math.max(r, u);
|
|
2216
2216
|
}
|
|
2217
|
-
if (
|
|
2217
|
+
if (o <= 3 && r <= 3) continue;
|
|
2218
2218
|
const s = i.querySelector("th[scope]") !== null, l = i.querySelector("td[headers]") !== null;
|
|
2219
2219
|
for (const d of i.querySelectorAll("td")) {
|
|
2220
2220
|
if (h(d) || !((t = d.textContent) != null && t.trim()) && !d.querySelector("img, svg, input, select, textarea") || d.hasAttribute("aria-label") || d.hasAttribute("aria-labelledby") || d.hasAttribute("headers")) continue;
|
|
@@ -2258,13 +2258,13 @@ const ka = {
|
|
|
2258
2258
|
const a = [], t = /* @__PURE__ */ new Set(["row", "col", "rowgroup", "colgroup"]);
|
|
2259
2259
|
for (const n of e.querySelectorAll("th[scope]")) {
|
|
2260
2260
|
if (h(n)) continue;
|
|
2261
|
-
const
|
|
2262
|
-
|
|
2261
|
+
const o = (i = n.getAttribute("scope")) == null ? void 0 : i.toLowerCase();
|
|
2262
|
+
o && !t.has(o) && a.push({
|
|
2263
2263
|
ruleId: "adaptable/scope-attr-valid",
|
|
2264
2264
|
selector: p(n),
|
|
2265
2265
|
html: m(n),
|
|
2266
2266
|
impact: "moderate",
|
|
2267
|
-
message: `Invalid scope value "${
|
|
2267
|
+
message: `Invalid scope value "${o}". Use row, col, rowgroup, or colgroup.`
|
|
2268
2268
|
});
|
|
2269
2269
|
}
|
|
2270
2270
|
return a;
|
|
@@ -2284,7 +2284,7 @@ const ka = {
|
|
|
2284
2284
|
for (const t of e.querySelectorAll("th")) {
|
|
2285
2285
|
if (h(t)) continue;
|
|
2286
2286
|
const i = t.closest("table");
|
|
2287
|
-
(i == null ? void 0 : i.getAttribute("role")) === "presentation" || (i == null ? void 0 : i.getAttribute("role")) === "none" ||
|
|
2287
|
+
(i == null ? void 0 : i.getAttribute("role")) === "presentation" || (i == null ? void 0 : i.getAttribute("role")) === "none" || x(t) || a.push({
|
|
2288
2288
|
ruleId: "adaptable/empty-table-header",
|
|
2289
2289
|
selector: p(t),
|
|
2290
2290
|
html: m(t),
|
|
@@ -2308,9 +2308,9 @@ const ka = {
|
|
|
2308
2308
|
run(e) {
|
|
2309
2309
|
const a = [], t = e.querySelector('meta[name="viewport"]');
|
|
2310
2310
|
if (!t) return [];
|
|
2311
|
-
const i = t.getAttribute("content") || "", n = i.toLowerCase(),
|
|
2312
|
-
if (
|
|
2313
|
-
const s =
|
|
2311
|
+
const i = t.getAttribute("content") || "", n = i.toLowerCase(), o = n.match(/user-scalable\s*=\s*([^\s,;]+)/i);
|
|
2312
|
+
if (o) {
|
|
2313
|
+
const s = o[1], l = parseFloat(s);
|
|
2314
2314
|
(s === "no" || !isNaN(l) && l > -1 && l < 1) && a.push({
|
|
2315
2315
|
ruleId: "distinguishable/meta-viewport",
|
|
2316
2316
|
selector: p(t),
|
|
@@ -2321,9 +2321,9 @@ const ka = {
|
|
|
2321
2321
|
fix: { type: "suggest", suggestion: "Remove user-scalable=no from the viewport meta content attribute" }
|
|
2322
2322
|
});
|
|
2323
2323
|
}
|
|
2324
|
-
const
|
|
2325
|
-
if (
|
|
2326
|
-
const s =
|
|
2324
|
+
const r = n.match(/maximum-scale\s*=\s*([\d.]+|yes)/i);
|
|
2325
|
+
if (r) {
|
|
2326
|
+
const s = r[1], l = s.toLowerCase() === "yes" ? 1 : parseFloat(s);
|
|
2327
2327
|
l < 2 && a.push({
|
|
2328
2328
|
ruleId: "distinguishable/meta-viewport",
|
|
2329
2329
|
selector: p(t),
|
|
@@ -2340,27 +2340,27 @@ const ka = {
|
|
|
2340
2340
|
function ce(e) {
|
|
2341
2341
|
return e.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function We(e, a) {
|
|
2344
2344
|
const t = e.getAttribute("style");
|
|
2345
2345
|
if (!t) return null;
|
|
2346
2346
|
const i = new RegExp(
|
|
2347
2347
|
`${ce(a)}\\s*:\\s*([^;!]+)\\s*!\\s*important`,
|
|
2348
2348
|
"gi"
|
|
2349
2349
|
);
|
|
2350
|
-
let n = null,
|
|
2351
|
-
for (;
|
|
2352
|
-
n =
|
|
2350
|
+
let n = null, o;
|
|
2351
|
+
for (; o = i.exec(t); )
|
|
2352
|
+
n = o;
|
|
2353
2353
|
if (!n) return null;
|
|
2354
|
-
const
|
|
2355
|
-
if (/^(inherit|unset|revert)$/i.test(
|
|
2356
|
-
if (/^(normal|initial)$/i.test(
|
|
2357
|
-
const s =
|
|
2354
|
+
const r = n[1].trim();
|
|
2355
|
+
if (/^(inherit|unset|revert)$/i.test(r)) return null;
|
|
2356
|
+
if (/^(normal|initial)$/i.test(r)) return { em: 0, px: null };
|
|
2357
|
+
const s = r.match(/^(-?[\d.]+)\s*em$/i);
|
|
2358
2358
|
if (s) return { em: parseFloat(s[1]), px: null };
|
|
2359
|
-
const l =
|
|
2359
|
+
const l = r.match(/^(-?[\d.]+)$/);
|
|
2360
2360
|
if (l) return { em: parseFloat(l[1]), px: null };
|
|
2361
|
-
const d =
|
|
2361
|
+
const d = r.match(/^(-?[\d.]+)\s*%$/);
|
|
2362
2362
|
if (d) return { em: parseFloat(d[1]) / 100, px: null };
|
|
2363
|
-
const c =
|
|
2363
|
+
const c = r.match(/^(-?[\d.]+)\s*(px|pt|cm|mm|in)$/i);
|
|
2364
2364
|
if (c) {
|
|
2365
2365
|
const u = parseFloat(c[1]), b = c[2].toLowerCase();
|
|
2366
2366
|
let g;
|
|
@@ -2387,23 +2387,23 @@ function Ue(e, a) {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
return null;
|
|
2389
2389
|
}
|
|
2390
|
-
function
|
|
2391
|
-
function n(
|
|
2392
|
-
var
|
|
2393
|
-
if (
|
|
2394
|
-
const s =
|
|
2390
|
+
function Ue(e, a, t, i) {
|
|
2391
|
+
function n(o) {
|
|
2392
|
+
var r;
|
|
2393
|
+
if (o !== e) {
|
|
2394
|
+
const s = o.getAttribute("style") || "";
|
|
2395
2395
|
if (new RegExp(
|
|
2396
2396
|
`${ce(a)}\\s*:\\s*[^;!]+\\s*!\\s*important`,
|
|
2397
2397
|
"i"
|
|
2398
2398
|
).test(s)) return !1;
|
|
2399
2399
|
}
|
|
2400
|
-
for (const s of
|
|
2401
|
-
if (s.nodeType === 3 && ((
|
|
2402
|
-
const l = parseFloat(
|
|
2400
|
+
for (const s of o.childNodes)
|
|
2401
|
+
if (s.nodeType === 3 && ((r = s.textContent) != null && r.trim())) {
|
|
2402
|
+
const l = parseFloat(w(o).fontSize);
|
|
2403
2403
|
if (l > 0 && t / l < i) return !0;
|
|
2404
2404
|
break;
|
|
2405
2405
|
}
|
|
2406
|
-
for (const s of
|
|
2406
|
+
for (const s of o.children)
|
|
2407
2407
|
if (n(s)) return !0;
|
|
2408
2408
|
return !1;
|
|
2409
2409
|
}
|
|
@@ -2444,17 +2444,17 @@ function de(e, a) {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
function Be(e, a, t, i) {
|
|
2446
2446
|
const n = [];
|
|
2447
|
-
for (const
|
|
2448
|
-
if (h(
|
|
2449
|
-
const
|
|
2450
|
-
if (!
|
|
2447
|
+
for (const o of e.querySelectorAll("[style]")) {
|
|
2448
|
+
if (h(o) || !Oe(o) || Ve(o) || !de(o, t)) continue;
|
|
2449
|
+
const r = We(o, t);
|
|
2450
|
+
if (!r) continue;
|
|
2451
2451
|
let s = !1;
|
|
2452
|
-
if (
|
|
2453
|
-
const l =
|
|
2452
|
+
if (r.em !== null ? s = r.em < i : r.px !== null && (s = Ue(o, t, r.px, i)), s) {
|
|
2453
|
+
const l = r.em !== null ? `${r.em}${t === "line-height" ? "" : "em"}` : `${r.px}px`;
|
|
2454
2454
|
n.push({
|
|
2455
2455
|
ruleId: a,
|
|
2456
|
-
selector: p(
|
|
2457
|
-
html: m(
|
|
2456
|
+
selector: p(o),
|
|
2457
|
+
html: m(o),
|
|
2458
2458
|
impact: "serious",
|
|
2459
2459
|
message: `${t} ${l} with !important is below the ${i}${t === "line-height" ? "" : "em"} minimum.`
|
|
2460
2460
|
});
|
|
@@ -2465,10 +2465,10 @@ function Be(e, a, t, i) {
|
|
|
2465
2465
|
function La(e) {
|
|
2466
2466
|
let a = e, t = !1;
|
|
2467
2467
|
for (; a; ) {
|
|
2468
|
-
const i =
|
|
2468
|
+
const i = w(a);
|
|
2469
2469
|
parseFloat(i.width) > 500 && (t = !0), (i.whiteSpace === "nowrap" || i.whiteSpace === "pre") && (t = !0);
|
|
2470
|
-
const
|
|
2471
|
-
if ((
|
|
2470
|
+
const o = i.overflowX, r = i.overflowY;
|
|
2471
|
+
if ((o === "scroll" || o === "auto") && r !== "scroll" && r !== "auto")
|
|
2472
2472
|
return t;
|
|
2473
2473
|
a = a.parentElement;
|
|
2474
2474
|
}
|
|
@@ -2500,20 +2500,20 @@ const Ra = {
|
|
|
2500
2500
|
for (const t of e.querySelectorAll("[style]")) {
|
|
2501
2501
|
if (h(t) || !Oe(t) || Ve(t) || !de(t, "line-height") || La(t)) continue;
|
|
2502
2502
|
if (t instanceof HTMLElement && t.scrollHeight > 0) {
|
|
2503
|
-
const
|
|
2504
|
-
if (
|
|
2503
|
+
const o = parseFloat(w(t).lineHeight);
|
|
2504
|
+
if (o > 0 && t.scrollHeight <= o * 1.5) continue;
|
|
2505
2505
|
}
|
|
2506
|
-
const i =
|
|
2506
|
+
const i = We(t, "line-height");
|
|
2507
2507
|
if (!i) continue;
|
|
2508
2508
|
let n = !1;
|
|
2509
|
-
if (i.em !== null ? n = i.em < 1.5 : i.px !== null && (n =
|
|
2510
|
-
const
|
|
2509
|
+
if (i.em !== null ? n = i.em < 1.5 : i.px !== null && (n = Ue(t, "line-height", i.px, 1.5)), n) {
|
|
2510
|
+
const o = i.em !== null ? `${i.em}` : `${i.px}px`;
|
|
2511
2511
|
a.push({
|
|
2512
2512
|
ruleId: "distinguishable/line-height",
|
|
2513
2513
|
selector: p(t),
|
|
2514
2514
|
html: m(t),
|
|
2515
2515
|
impact: "serious",
|
|
2516
|
-
message: `Line height ${
|
|
2516
|
+
message: `Line height ${o} with !important is below the 1.5 minimum.`
|
|
2517
2517
|
});
|
|
2518
2518
|
}
|
|
2519
2519
|
}
|
|
@@ -2547,14 +2547,14 @@ const Ra = {
|
|
|
2547
2547
|
]);
|
|
2548
2548
|
function $a(e) {
|
|
2549
2549
|
let a = e.parentElement;
|
|
2550
|
-
for (; a && !Na.has(
|
|
2550
|
+
for (; a && !Na.has(w(a).display); )
|
|
2551
2551
|
a = a.parentElement;
|
|
2552
2552
|
if (!a) return null;
|
|
2553
2553
|
const t = a.ownerDocument.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
2554
|
-
let i = "", n = null,
|
|
2555
|
-
for (;
|
|
2556
|
-
if (!
|
|
2557
|
-
let s =
|
|
2554
|
+
let i = "", n = null, o;
|
|
2555
|
+
for (; o = t.nextNode(); ) {
|
|
2556
|
+
if (!o.data.trim()) continue;
|
|
2557
|
+
let s = o.parentElement, l = !1;
|
|
2558
2558
|
for (; s && s !== a; ) {
|
|
2559
2559
|
if (s.tagName === "A") {
|
|
2560
2560
|
l = !0;
|
|
@@ -2562,10 +2562,10 @@ function $a(e) {
|
|
|
2562
2562
|
}
|
|
2563
2563
|
s = s.parentElement;
|
|
2564
2564
|
}
|
|
2565
|
-
l || (i +=
|
|
2565
|
+
l || (i += o.data, !n && o.parentElement && (n = C(w(o.parentElement).color)));
|
|
2566
2566
|
}
|
|
2567
|
-
const
|
|
2568
|
-
return !n || !
|
|
2567
|
+
const r = i.match(new RegExp("\\p{L}{3,}", "gu"));
|
|
2568
|
+
return !n || !r || r.length < 2 ? null : { block: a, textColor: n };
|
|
2569
2569
|
}
|
|
2570
2570
|
function qe(e, a) {
|
|
2571
2571
|
const t = e.textDecorationLine || e.textDecoration || "";
|
|
@@ -2581,7 +2581,7 @@ function Ha(e) {
|
|
|
2581
2581
|
if (t.data.trim()) return !1;
|
|
2582
2582
|
return !0;
|
|
2583
2583
|
}
|
|
2584
|
-
const
|
|
2584
|
+
const Pa = {
|
|
2585
2585
|
id: "distinguishable/link-in-text-block",
|
|
2586
2586
|
category: "distinguishable",
|
|
2587
2587
|
wcag: ["1.4.1"],
|
|
@@ -2594,18 +2594,18 @@ const Da = {
|
|
|
2594
2594
|
const a = [];
|
|
2595
2595
|
for (const t of e.querySelectorAll("a[href]")) {
|
|
2596
2596
|
if (h(t) || !k(t).trim() || Ha(t) || t.closest('nav, header, footer, aside, [role="navigation"], [role="banner"], [role="contentinfo"], [role="complementary"]')) continue;
|
|
2597
|
-
const i =
|
|
2597
|
+
const i = w(t);
|
|
2598
2598
|
if (!Ma.has(i.display || "inline")) continue;
|
|
2599
2599
|
const n = $a(t);
|
|
2600
2600
|
if (!n) continue;
|
|
2601
|
-
const
|
|
2602
|
-
if (qe(i,
|
|
2603
|
-
const l = parseFloat(i.fontSize) || 16, d = parseFloat(
|
|
2601
|
+
const o = w(n.block), r = o.textDecorationLine || o.textDecoration || "";
|
|
2602
|
+
if (qe(i, r) || (parseFloat(i.borderBottomWidth) || 0) > 0 && i.borderBottomStyle !== "none" && i.borderBottomStyle !== "hidden" || Math.abs(V(i.fontWeight) - V(o.fontWeight)) >= 300 || i.fontStyle !== o.fontStyle) continue;
|
|
2603
|
+
const l = parseFloat(i.fontSize) || 16, d = parseFloat(o.fontSize) || 16;
|
|
2604
2604
|
if (d > 0 && l / d >= 1.2) continue;
|
|
2605
2605
|
let c = !1;
|
|
2606
2606
|
for (const y of t.querySelectorAll("*")) {
|
|
2607
|
-
const A =
|
|
2608
|
-
if (qe(A,
|
|
2607
|
+
const A = w(y);
|
|
2608
|
+
if (qe(A, r) || Math.abs(V(A.fontWeight) - V(o.fontWeight)) >= 300) {
|
|
2609
2609
|
c = !0;
|
|
2610
2610
|
break;
|
|
2611
2611
|
}
|
|
@@ -2613,7 +2613,7 @@ const Da = {
|
|
|
2613
2613
|
if (c) continue;
|
|
2614
2614
|
const u = C(i.color);
|
|
2615
2615
|
if (!u) continue;
|
|
2616
|
-
const b =
|
|
2616
|
+
const b = q(...u), g = q(...n.textColor), f = $(b, g);
|
|
2617
2617
|
if (f < 1.1 || f >= 3) continue;
|
|
2618
2618
|
const v = (y) => "#" + y.map((A) => A.toString(16).padStart(2, "0")).join("");
|
|
2619
2619
|
a.push({
|
|
@@ -2628,7 +2628,7 @@ const Da = {
|
|
|
2628
2628
|
}
|
|
2629
2629
|
return a;
|
|
2630
2630
|
}
|
|
2631
|
-
},
|
|
2631
|
+
}, Da = /* @__PURE__ */ new Set([
|
|
2632
2632
|
"SCRIPT",
|
|
2633
2633
|
"STYLE",
|
|
2634
2634
|
"NOSCRIPT",
|
|
@@ -2662,7 +2662,7 @@ function za(e) {
|
|
|
2662
2662
|
if (h(e)) return !0;
|
|
2663
2663
|
let a = e;
|
|
2664
2664
|
for (; a; ) {
|
|
2665
|
-
const t =
|
|
2665
|
+
const t = w(a);
|
|
2666
2666
|
if (t.display === "none" || t.visibility === "hidden" || Fa(t)) return !0;
|
|
2667
2667
|
a = a.parentElement;
|
|
2668
2668
|
}
|
|
@@ -2671,19 +2671,19 @@ function za(e) {
|
|
|
2671
2671
|
function ja(e) {
|
|
2672
2672
|
return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement || e instanceof HTMLButtonElement ? e.disabled : !!(e.closest("fieldset[disabled]") || e.getAttribute("aria-disabled") === "true");
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2674
|
+
function Wa(e, a) {
|
|
2675
2675
|
if (e.tagName !== "LABEL") return !1;
|
|
2676
2676
|
const t = e, i = t.htmlFor;
|
|
2677
2677
|
if (i) {
|
|
2678
|
-
const
|
|
2679
|
-
if (
|
|
2678
|
+
const r = a.getElementById(i);
|
|
2679
|
+
if (r && (r.disabled || r.getAttribute("aria-disabled") === "true")) return !0;
|
|
2680
2680
|
}
|
|
2681
2681
|
const n = t.querySelector("input, select, textarea, button");
|
|
2682
2682
|
if (n && (n.disabled || n.getAttribute("aria-disabled") === "true")) return !0;
|
|
2683
|
-
const
|
|
2684
|
-
return !!(
|
|
2683
|
+
const o = t.id;
|
|
2684
|
+
return !!(o && a.querySelector(`[aria-labelledby~="${o}"][aria-disabled="true"]`));
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function Ua(e) {
|
|
2687
2687
|
return e.closest("select") !== null;
|
|
2688
2688
|
}
|
|
2689
2689
|
function Oa(e) {
|
|
@@ -2721,12 +2721,12 @@ function Le(e) {
|
|
|
2721
2721
|
function Ga(e) {
|
|
2722
2722
|
let a = e;
|
|
2723
2723
|
for (; a; ) {
|
|
2724
|
-
const t =
|
|
2724
|
+
const t = w(a), i = t.filter;
|
|
2725
2725
|
if (i && i !== "none" && i !== "initial" && !Le(i)) return !0;
|
|
2726
2726
|
const n = t.mixBlendMode;
|
|
2727
2727
|
if (n && n !== "normal" && n !== "initial") return !0;
|
|
2728
|
-
const
|
|
2729
|
-
if (
|
|
2728
|
+
const o = t.backdropFilter;
|
|
2729
|
+
if (o && o !== "none" && o !== "initial" && !Le(o)) return !0;
|
|
2730
2730
|
a = a.parentElement;
|
|
2731
2731
|
}
|
|
2732
2732
|
return !1;
|
|
@@ -2734,7 +2734,7 @@ function Ga(e) {
|
|
|
2734
2734
|
function Ya(e) {
|
|
2735
2735
|
let a = e;
|
|
2736
2736
|
for (; a; ) {
|
|
2737
|
-
const t =
|
|
2737
|
+
const t = w(a), i = t.backgroundImage;
|
|
2738
2738
|
if (i && i !== "none" && i !== "initial")
|
|
2739
2739
|
return i.includes("gradient(") ? { bgImage: i, gradientEl: a } : null;
|
|
2740
2740
|
const n = t.backgroundColor;
|
|
@@ -2742,7 +2742,7 @@ function Ya(e) {
|
|
|
2742
2742
|
a = a.parentElement;
|
|
2743
2743
|
continue;
|
|
2744
2744
|
}
|
|
2745
|
-
if (
|
|
2745
|
+
if (U(n) < 0.01) {
|
|
2746
2746
|
a = a.parentElement;
|
|
2747
2747
|
continue;
|
|
2748
2748
|
}
|
|
@@ -2750,7 +2750,7 @@ function Ya(e) {
|
|
|
2750
2750
|
}
|
|
2751
2751
|
return null;
|
|
2752
2752
|
}
|
|
2753
|
-
function Xa(e, a, t, i, n,
|
|
2753
|
+
function Xa(e, a, t, i, n, o, r, s, l) {
|
|
2754
2754
|
const d = It(s, l);
|
|
2755
2755
|
if (d.length === 0) return null;
|
|
2756
2756
|
let c = 0, u = d[0];
|
|
@@ -2758,8 +2758,8 @@ function Xa(e, a, t, i, n, r, o, s, l) {
|
|
|
2758
2758
|
let v = a;
|
|
2759
2759
|
t < 1 && (v = R(a, f, t)), i < 1 && (v = R(v, f, i));
|
|
2760
2760
|
const y = $(
|
|
2761
|
-
|
|
2762
|
-
|
|
2761
|
+
q(v[0], v[1], v[2]),
|
|
2762
|
+
q(f[0], f[1], f[2])
|
|
2763
2763
|
);
|
|
2764
2764
|
y > c && (c = y, u = f);
|
|
2765
2765
|
}
|
|
@@ -2768,11 +2768,11 @@ function Xa(e, a, t, i, n, r, o, s, l) {
|
|
|
2768
2768
|
t < 1 && (b = R(a, u, t)), i < 1 && (b = R(b, u, i));
|
|
2769
2769
|
const g = Math.round(c * 100) / 100;
|
|
2770
2770
|
return {
|
|
2771
|
-
ruleId:
|
|
2771
|
+
ruleId: o,
|
|
2772
2772
|
selector: p(e),
|
|
2773
2773
|
html: m(e),
|
|
2774
2774
|
impact: "serious",
|
|
2775
|
-
message: `Insufficient${
|
|
2775
|
+
message: `Insufficient${r === "AAA" ? " enhanced" : ""} color contrast ratio of ${g}:1 (required ${n}:1).`,
|
|
2776
2776
|
context: `foreground: ${_(b)} rgb(${b.join(", ")}), background: gradient, ratio: ${g}:1, required: ${n}:1`,
|
|
2777
2777
|
fix: { type: "suggest", suggestion: `Change the text color or gradient background so the contrast ratio meets ${n}:1. The current foreground is ${_(b)}.` }
|
|
2778
2778
|
};
|
|
@@ -2780,15 +2780,15 @@ function Xa(e, a, t, i, n, r, o, s, l) {
|
|
|
2780
2780
|
function _e(e, a, t) {
|
|
2781
2781
|
const i = [], n = e.body;
|
|
2782
2782
|
if (!n) return [];
|
|
2783
|
-
const
|
|
2783
|
+
const o = e.createTreeWalker(n, NodeFilter.SHOW_TEXT), r = /* @__PURE__ */ new Set();
|
|
2784
2784
|
let s;
|
|
2785
|
-
for (; s =
|
|
2785
|
+
for (; s = o.nextNode(); ) {
|
|
2786
2786
|
if (!s.textContent || !s.textContent.trim() || Oa(s.textContent)) continue;
|
|
2787
2787
|
const l = s.parentElement;
|
|
2788
|
-
if (!l ||
|
|
2788
|
+
if (!l || r.has(l) || (r.add(l), Da.has(l.tagName))) continue;
|
|
2789
2789
|
const d = l.tagName;
|
|
2790
|
-
if (d === "BODY" || d === "HTML" ||
|
|
2791
|
-
const c =
|
|
2790
|
+
if (d === "BODY" || d === "HTML" || Ua(l) || ja(l) || Wa(l, e) || Va(l) || za(l)) continue;
|
|
2791
|
+
const c = w(l);
|
|
2792
2792
|
if (parseFloat(c.opacity) === 0) continue;
|
|
2793
2793
|
const u = Mt(l);
|
|
2794
2794
|
if (u < 0.1) continue;
|
|
@@ -2797,9 +2797,9 @@ function _e(e, a, t) {
|
|
|
2797
2797
|
if (b && b !== "none" && b !== "initial" && (g = Tt(b), !g) || Ga(l) || $t(l)) continue;
|
|
2798
2798
|
const f = C(c.color);
|
|
2799
2799
|
if (!f) continue;
|
|
2800
|
-
const v =
|
|
2800
|
+
const v = U(c.color);
|
|
2801
2801
|
if (v === 0 || Et(l)) continue;
|
|
2802
|
-
const y = t === "AAA" ?
|
|
2802
|
+
const y = t === "AAA" ? we(l) ? 4.5 : 7 : we(l) ? 3 : 4.5;
|
|
2803
2803
|
let A = ye(l);
|
|
2804
2804
|
if (!A) {
|
|
2805
2805
|
if (g) continue;
|
|
@@ -2822,7 +2822,7 @@ function _e(e, a, t) {
|
|
|
2822
2822
|
}
|
|
2823
2823
|
let S = f;
|
|
2824
2824
|
v < 1 && (S = R(f, A, v)), u < 1 && (S = R(S, A, u));
|
|
2825
|
-
const nt =
|
|
2825
|
+
const nt = q(S[0], S[1], S[2]), ot = q(A[0], A[1], A[2]), be = g ? Nt(S, A, g) : $(nt, ot);
|
|
2826
2826
|
if (be < y) {
|
|
2827
2827
|
const E = Math.round(be * 100) / 100, O = _(S), H = _(A);
|
|
2828
2828
|
i.push({
|
|
@@ -2949,7 +2949,7 @@ const Ja = {
|
|
|
2949
2949
|
"select",
|
|
2950
2950
|
"textarea",
|
|
2951
2951
|
"video"
|
|
2952
|
-
]),
|
|
2952
|
+
]), oi = /* @__PURE__ */ new Set([
|
|
2953
2953
|
"button",
|
|
2954
2954
|
"checkbox",
|
|
2955
2955
|
"combobox",
|
|
@@ -2973,7 +2973,7 @@ const Ja = {
|
|
|
2973
2973
|
"tabpanel",
|
|
2974
2974
|
"textbox",
|
|
2975
2975
|
"treeitem"
|
|
2976
|
-
]),
|
|
2976
|
+
]), ri = {
|
|
2977
2977
|
grid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader"]),
|
|
2978
2978
|
listbox: /* @__PURE__ */ new Set(["option"]),
|
|
2979
2979
|
menu: /* @__PURE__ */ new Set(["menuitem", "menuitemcheckbox", "menuitemradio"]),
|
|
@@ -2984,9 +2984,9 @@ const Ja = {
|
|
|
2984
2984
|
treegrid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader", "treeitem"])
|
|
2985
2985
|
};
|
|
2986
2986
|
function si(e, a) {
|
|
2987
|
-
var n,
|
|
2988
|
-
const t = (n = e.getAttribute("role")) == null ? void 0 : n.toLowerCase(), i = (
|
|
2989
|
-
return !t || !i ? !1 : ((
|
|
2987
|
+
var n, o, r;
|
|
2988
|
+
const t = (n = e.getAttribute("role")) == null ? void 0 : n.toLowerCase(), i = (o = a.getAttribute("role")) == null ? void 0 : o.toLowerCase();
|
|
2989
|
+
return !t || !i ? !1 : ((r = ri[t]) == null ? void 0 : r.has(i)) ?? !1;
|
|
2990
2990
|
}
|
|
2991
2991
|
function li(e) {
|
|
2992
2992
|
var n;
|
|
@@ -2994,7 +2994,7 @@ function li(e) {
|
|
|
2994
2994
|
if (ni.has(a))
|
|
2995
2995
|
return a === "a" && !e.hasAttribute("href") ? !1 : a === "audio" || a === "video" ? e.hasAttribute("controls") : !(a === "img" && !e.hasAttribute("usemap") || a === "input" && e.type === "hidden" || e.disabled);
|
|
2996
2996
|
const t = (n = e.getAttribute("role")) == null ? void 0 : n.toLowerCase();
|
|
2997
|
-
if (t &&
|
|
2997
|
+
if (t && oi.has(t)) return !0;
|
|
2998
2998
|
const i = e.getAttribute("tabindex");
|
|
2999
2999
|
return i !== null && i !== "-1" || e.getAttribute("contenteditable") === "true";
|
|
3000
3000
|
}
|
|
@@ -3013,26 +3013,26 @@ const di = {
|
|
|
3013
3013
|
run(e) {
|
|
3014
3014
|
const a = [], t = e.body ?? e;
|
|
3015
3015
|
if (!t) return a;
|
|
3016
|
-
const n = (e.body ? e : e.ownerDocument).createTreeWalker(t, NodeFilter.SHOW_ELEMENT),
|
|
3017
|
-
let
|
|
3018
|
-
for (;
|
|
3019
|
-
for (;
|
|
3020
|
-
|
|
3021
|
-
if (!h(
|
|
3022
|
-
if (
|
|
3023
|
-
const s =
|
|
3024
|
-
si(s,
|
|
3016
|
+
const n = (e.body ? e : e.ownerDocument).createTreeWalker(t, NodeFilter.SHOW_ELEMENT), o = [];
|
|
3017
|
+
let r = n.currentNode;
|
|
3018
|
+
for (; r; ) {
|
|
3019
|
+
for (; o.length > 0 && !o[o.length - 1].contains(r); )
|
|
3020
|
+
o.pop();
|
|
3021
|
+
if (!h(r) && li(r)) {
|
|
3022
|
+
if (o.length > 0) {
|
|
3023
|
+
const s = o[o.length - 1];
|
|
3024
|
+
si(s, r) || a.push({
|
|
3025
3025
|
ruleId: "keyboard-accessible/nested-interactive",
|
|
3026
|
-
selector: p(
|
|
3027
|
-
html: m(
|
|
3026
|
+
selector: p(r),
|
|
3027
|
+
html: m(r),
|
|
3028
3028
|
impact: "serious",
|
|
3029
|
-
message: `Interactive element <${
|
|
3029
|
+
message: `Interactive element <${r.tagName.toLowerCase()}> is nested inside <${s.tagName.toLowerCase()}>.`,
|
|
3030
3030
|
fix: { type: "suggest", suggestion: "Move the nested interactive element outside its interactive parent so they are siblings instead of nested" }
|
|
3031
3031
|
});
|
|
3032
3032
|
}
|
|
3033
|
-
ci(
|
|
3033
|
+
ci(r) && o.push(r);
|
|
3034
3034
|
}
|
|
3035
|
-
|
|
3035
|
+
r = n.nextNode();
|
|
3036
3036
|
}
|
|
3037
3037
|
return a;
|
|
3038
3038
|
}
|
|
@@ -3053,9 +3053,9 @@ const di = {
|
|
|
3053
3053
|
if (h(i) || !(i instanceof HTMLElement)) continue;
|
|
3054
3054
|
const n = i.tagName.toLowerCase();
|
|
3055
3055
|
if (n === "body" || n === "html") continue;
|
|
3056
|
-
const
|
|
3057
|
-
if (
|
|
3058
|
-
const
|
|
3056
|
+
const o = i.getAttribute("role");
|
|
3057
|
+
if (o === "presentation" || o === "none" || o === "listbox" || o === "menu" || o === "tree" || o === "tabpanel") continue;
|
|
3058
|
+
const r = w(i), s = r.overflowX, l = r.overflowY;
|
|
3059
3059
|
if (!(s === "scroll" || s === "auto" || l === "scroll" || l === "auto")) continue;
|
|
3060
3060
|
if (i.scrollHeight > 0 || i.clientHeight > 0) {
|
|
3061
3061
|
const g = i.scrollHeight - i.clientHeight, f = i.scrollWidth - i.clientWidth;
|
|
@@ -3089,18 +3089,18 @@ const di = {
|
|
|
3089
3089
|
const a = [], t = /* @__PURE__ */ new Map();
|
|
3090
3090
|
for (const n of e.querySelectorAll("[accesskey]")) {
|
|
3091
3091
|
if (h(n)) continue;
|
|
3092
|
-
const
|
|
3093
|
-
if (!
|
|
3094
|
-
const
|
|
3095
|
-
|
|
3092
|
+
const o = (i = n.getAttribute("accesskey")) == null ? void 0 : i.trim().toLowerCase();
|
|
3093
|
+
if (!o) continue;
|
|
3094
|
+
const r = t.get(o) || [];
|
|
3095
|
+
r.push(n), t.set(o, r);
|
|
3096
3096
|
}
|
|
3097
|
-
for (const [n,
|
|
3098
|
-
if (
|
|
3099
|
-
for (const
|
|
3097
|
+
for (const [n, o] of t)
|
|
3098
|
+
if (o.length > 1)
|
|
3099
|
+
for (const r of o.slice(1))
|
|
3100
3100
|
a.push({
|
|
3101
3101
|
ruleId: "keyboard-accessible/accesskeys",
|
|
3102
|
-
selector: p(
|
|
3103
|
-
html: m(
|
|
3102
|
+
selector: p(r),
|
|
3103
|
+
html: m(r),
|
|
3104
3104
|
impact: "serious",
|
|
3105
3105
|
message: `Duplicate accesskey "${n}". Each accesskey must be unique.`
|
|
3106
3106
|
});
|
|
@@ -3122,8 +3122,8 @@ const di = {
|
|
|
3122
3122
|
if (h(t) || !(t instanceof HTMLElement)) continue;
|
|
3123
3123
|
const i = t.getAttribute("style") || "";
|
|
3124
3124
|
if (/outline\s*:\s*(none|0)\s*(;|$|!)/i.test(i)) {
|
|
3125
|
-
const
|
|
3126
|
-
!
|
|
3125
|
+
const o = /border\s*:/i.test(i), r = /box-shadow\s*:/i.test(i);
|
|
3126
|
+
!o && !r && a.push({
|
|
3127
3127
|
ruleId: "keyboard-accessible/focus-visible",
|
|
3128
3128
|
selector: p(t),
|
|
3129
3129
|
html: m(t),
|
|
@@ -3183,12 +3183,12 @@ function ue(e) {
|
|
|
3183
3183
|
description: e.description,
|
|
3184
3184
|
guidance: e.guidance,
|
|
3185
3185
|
run(a) {
|
|
3186
|
-
const t = [], i = a.querySelectorAll(e.selector), n = e.filterTopLevel ? Array.from(i).filter((
|
|
3186
|
+
const t = [], i = a.querySelectorAll(e.selector), n = e.filterTopLevel ? Array.from(i).filter((o) => !o.closest(Xe)) : Array.from(i);
|
|
3187
3187
|
return n.length > 1 && n.slice(1).forEach(
|
|
3188
|
-
(
|
|
3188
|
+
(o) => t.push({
|
|
3189
3189
|
ruleId: e.id,
|
|
3190
|
-
selector: p(
|
|
3191
|
-
html: m(
|
|
3190
|
+
selector: p(o),
|
|
3191
|
+
html: m(o),
|
|
3192
3192
|
impact: "moderate",
|
|
3193
3193
|
message: `Page has multiple ${e.landmarkName} landmarks.`
|
|
3194
3194
|
})
|
|
@@ -3292,7 +3292,7 @@ const bi = {
|
|
|
3292
3292
|
fixability: "mechanical",
|
|
3293
3293
|
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.",
|
|
3294
3294
|
fix: { type: "remove-element" }
|
|
3295
|
-
}, yi = N(vi),
|
|
3295
|
+
}, yi = N(vi), wi = {
|
|
3296
3296
|
id: "navigable/document-title",
|
|
3297
3297
|
category: "navigable",
|
|
3298
3298
|
actRuleIds: ["2779a5"],
|
|
@@ -3306,13 +3306,13 @@ const bi = {
|
|
|
3306
3306
|
var t, i, n;
|
|
3307
3307
|
const a = e.querySelector("title");
|
|
3308
3308
|
if (!a || !((t = a.textContent) != null && t.trim())) {
|
|
3309
|
-
let
|
|
3310
|
-
const
|
|
3311
|
-
if ((i =
|
|
3312
|
-
|
|
3309
|
+
let o;
|
|
3310
|
+
const r = e.querySelector("h1");
|
|
3311
|
+
if ((i = r == null ? void 0 : r.textContent) != null && i.trim())
|
|
3312
|
+
o = `h1: "${r.textContent.trim().slice(0, 100)}"`;
|
|
3313
3313
|
else if (e.body) {
|
|
3314
3314
|
const s = ((n = e.body.textContent) == null ? void 0 : n.trim().replace(/\s+/g, " ")) || "";
|
|
3315
|
-
s && (
|
|
3315
|
+
s && (o = `Page text: "${s.slice(0, 150)}"`);
|
|
3316
3316
|
}
|
|
3317
3317
|
return [{
|
|
3318
3318
|
ruleId: "navigable/document-title",
|
|
@@ -3320,13 +3320,13 @@ const bi = {
|
|
|
3320
3320
|
html: "<html>",
|
|
3321
3321
|
impact: "serious",
|
|
3322
3322
|
message: a ? "Document <title> element is empty." : "Document is missing a <title> element.",
|
|
3323
|
-
context:
|
|
3323
|
+
context: o,
|
|
3324
3324
|
fix: { type: "add-element", tag: "title", parent: "head", textContent: "" }
|
|
3325
3325
|
}];
|
|
3326
3326
|
}
|
|
3327
3327
|
return [];
|
|
3328
3328
|
}
|
|
3329
|
-
},
|
|
3329
|
+
}, xi = {
|
|
3330
3330
|
id: "navigable/bypass",
|
|
3331
3331
|
category: "navigable",
|
|
3332
3332
|
actRuleIds: ["cf77f2"],
|
|
@@ -3342,10 +3342,10 @@ const bi = {
|
|
|
3342
3342
|
)) return [];
|
|
3343
3343
|
const t = e.querySelector('a[href^="#"]');
|
|
3344
3344
|
if (t) {
|
|
3345
|
-
const
|
|
3346
|
-
if (
|
|
3347
|
-
const
|
|
3348
|
-
if (e.getElementById(
|
|
3345
|
+
const o = t.getAttribute("href");
|
|
3346
|
+
if (o && o.length > 1) {
|
|
3347
|
+
const r = o.slice(1);
|
|
3348
|
+
if (e.getElementById(r)) return [];
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
3351
3351
|
if (e.querySelector("h1, h2, h3, [role='heading']")) return [];
|
|
@@ -3369,17 +3369,17 @@ const bi = {
|
|
|
3369
3369
|
description: "Page should contain a level-one heading.",
|
|
3370
3370
|
guidance: "A level-one heading (<h1> or role='heading' with aria-level='1') helps users understand the page topic and provides a landmark for screen reader navigation. Each page should have at least one level-one heading that describes the main content, typically matching or similar to the page title.",
|
|
3371
3371
|
run(e) {
|
|
3372
|
-
var
|
|
3372
|
+
var r, s, l;
|
|
3373
3373
|
const a = e.querySelector("h1");
|
|
3374
|
-
if (a &&
|
|
3374
|
+
if (a && x(a)) return [];
|
|
3375
3375
|
const t = e.querySelectorAll('[role="heading"][aria-level="1"]');
|
|
3376
3376
|
for (const d of t)
|
|
3377
|
-
if (
|
|
3378
|
-
const i = [], n = (s = (
|
|
3377
|
+
if (x(d)) return [];
|
|
3378
|
+
const i = [], n = (s = (r = e.querySelector("title")) == null ? void 0 : r.textContent) == null ? void 0 : s.trim();
|
|
3379
3379
|
n && i.push(`Page title: "${n}"`);
|
|
3380
|
-
const
|
|
3381
|
-
if (
|
|
3382
|
-
const d = ((l =
|
|
3380
|
+
const o = e.querySelector("main");
|
|
3381
|
+
if (o) {
|
|
3382
|
+
const d = ((l = o.textContent) == null ? void 0 : l.trim().replace(/\s+/g, " ")) || "";
|
|
3383
3383
|
d && i.push(`Main content: "${d.slice(0, 100)}"`);
|
|
3384
3384
|
}
|
|
3385
3385
|
return [{
|
|
@@ -3404,18 +3404,18 @@ const bi = {
|
|
|
3404
3404
|
run(e) {
|
|
3405
3405
|
const a = [], t = e.querySelectorAll("h1, h2, h3, h4, h5, h6, [role='heading']");
|
|
3406
3406
|
let i = 0, n = null;
|
|
3407
|
-
for (const
|
|
3408
|
-
if (h(
|
|
3409
|
-
let
|
|
3410
|
-
|
|
3407
|
+
for (const o of t) {
|
|
3408
|
+
if (h(o)) continue;
|
|
3409
|
+
let r;
|
|
3410
|
+
o.hasAttribute("aria-level") ? r = parseInt(o.getAttribute("aria-level"), 10) : r = parseInt(o.tagName[1], 10), i > 0 && r > i + 1 && a.push({
|
|
3411
3411
|
ruleId: "navigable/heading-order",
|
|
3412
|
-
selector: p(
|
|
3413
|
-
html: m(
|
|
3412
|
+
selector: p(o),
|
|
3413
|
+
html: m(o),
|
|
3414
3414
|
impact: "moderate",
|
|
3415
|
-
message: `Heading level ${
|
|
3415
|
+
message: `Heading level ${r} skipped from level ${i}. Use h${i + 1} instead.`,
|
|
3416
3416
|
context: n ? `Previous heading: ${m(n)}` : void 0,
|
|
3417
3417
|
fix: { type: "suggest", suggestion: `Change this heading to an h${i + 1} element to maintain proper heading hierarchy` }
|
|
3418
|
-
}), i =
|
|
3418
|
+
}), i = r, n = o;
|
|
3419
3419
|
}
|
|
3420
3420
|
return a;
|
|
3421
3421
|
}
|
|
@@ -3434,12 +3434,12 @@ const bi = {
|
|
|
3434
3434
|
var i;
|
|
3435
3435
|
const a = [], t = e.querySelectorAll('h1, h2, h3, h4, h5, h6, [role="heading"]');
|
|
3436
3436
|
for (const n of t)
|
|
3437
|
-
if (!h(n) && !
|
|
3438
|
-
let
|
|
3439
|
-
const
|
|
3440
|
-
if (
|
|
3441
|
-
const s = ((i =
|
|
3442
|
-
s && (
|
|
3437
|
+
if (!h(n) && !x(n)) {
|
|
3438
|
+
let o;
|
|
3439
|
+
const r = n.nextElementSibling;
|
|
3440
|
+
if (r) {
|
|
3441
|
+
const s = ((i = r.textContent) == null ? void 0 : i.trim().replace(/\s+/g, " ")) || "";
|
|
3442
|
+
s && (o = s.slice(0, 100));
|
|
3443
3443
|
}
|
|
3444
3444
|
a.push({
|
|
3445
3445
|
ruleId: "navigable/empty-heading",
|
|
@@ -3447,7 +3447,7 @@ const bi = {
|
|
|
3447
3447
|
html: m(n),
|
|
3448
3448
|
impact: "minor",
|
|
3449
3449
|
message: "Heading is empty. Add text content or remove the heading element.",
|
|
3450
|
-
context:
|
|
3450
|
+
context: o ? `Following content: "${o}"` : void 0,
|
|
3451
3451
|
fix: { type: "add-text-content" }
|
|
3452
3452
|
});
|
|
3453
3453
|
}
|
|
@@ -3468,8 +3468,8 @@ const bi = {
|
|
|
3468
3468
|
const a = [];
|
|
3469
3469
|
for (const n of e.querySelectorAll("p")) {
|
|
3470
3470
|
if (h(n)) continue;
|
|
3471
|
-
const
|
|
3472
|
-
if ((
|
|
3471
|
+
const o = n.getAttribute("style") || "", r = /font-weight\s*:\s*(bold|[6-9]00)/i.test(o), s = /font-size\s*:\s*(\d+)\s*(px|em|rem)/i.test(o), l = ((t = n.className) == null ? void 0 : t.toLowerCase()) || "", d = /\bh[1-6]\b|\bheading\b/.test(l), c = ((i = n.textContent) == null ? void 0 : i.trim()) || "", u = c.length > 0 && c.length < 50, b = !c.match(/[.!?,;:]$/);
|
|
3472
|
+
if ((r && s || r && d) && u && b) {
|
|
3473
3473
|
const v = n.nextElementSibling;
|
|
3474
3474
|
v && (v.tagName === "P" || v.tagName === "DIV" || v.tagName === "UL") && a.push({
|
|
3475
3475
|
ruleId: "navigable/p-as-heading",
|
|
@@ -3485,16 +3485,16 @@ const bi = {
|
|
|
3485
3485
|
}
|
|
3486
3486
|
};
|
|
3487
3487
|
function qi(e) {
|
|
3488
|
-
var n,
|
|
3488
|
+
var n, o;
|
|
3489
3489
|
const a = [], t = e.getAttribute("href");
|
|
3490
3490
|
t && a.push(`href: ${t}`);
|
|
3491
3491
|
const i = e.parentElement;
|
|
3492
3492
|
if (i) {
|
|
3493
|
-
const
|
|
3494
|
-
if ((n =
|
|
3495
|
-
a.push(`Nearby heading: ${
|
|
3493
|
+
const r = i.closest("h1, h2, h3, h4, h5, h6");
|
|
3494
|
+
if ((n = r == null ? void 0 : r.textContent) != null && n.trim())
|
|
3495
|
+
a.push(`Nearby heading: ${r.textContent.trim().slice(0, 80)}`);
|
|
3496
3496
|
else {
|
|
3497
|
-
const s = (
|
|
3497
|
+
const s = (o = i.textContent) == null ? void 0 : o.trim().slice(0, 100);
|
|
3498
3498
|
s && a.push(`Parent text: ${s}`);
|
|
3499
3499
|
}
|
|
3500
3500
|
}
|
|
@@ -3514,8 +3514,8 @@ const Ei = {
|
|
|
3514
3514
|
run(e) {
|
|
3515
3515
|
const a = [];
|
|
3516
3516
|
for (const t of e.querySelectorAll('a[href], area[href], [role="link"]')) {
|
|
3517
|
-
if (h(t) ||
|
|
3518
|
-
|
|
3517
|
+
if (h(t) || I(t) || t.getRootNode() instanceof ShadowRoot) continue;
|
|
3518
|
+
x(t) || a.push({
|
|
3519
3519
|
ruleId: "navigable/link-name",
|
|
3520
3520
|
selector: p(t),
|
|
3521
3521
|
html: m(t),
|
|
@@ -3541,8 +3541,8 @@ const Ei = {
|
|
|
3541
3541
|
for (const i of t) {
|
|
3542
3542
|
const n = i.getAttribute("href");
|
|
3543
3543
|
if (!n || n === "#") continue;
|
|
3544
|
-
const
|
|
3545
|
-
if (!(
|
|
3544
|
+
const o = k(i).toLowerCase();
|
|
3545
|
+
if (!(o.includes("skip") || o.includes("jump") || o.includes("main content") || o.includes("navigation"))) continue;
|
|
3546
3546
|
const s = n.slice(1);
|
|
3547
3547
|
e.getElementById(s) || a.push({
|
|
3548
3548
|
ruleId: "navigable/skip-link",
|
|
@@ -3635,7 +3635,7 @@ const Ei = {
|
|
|
3635
3635
|
}
|
|
3636
3636
|
return a;
|
|
3637
3637
|
}
|
|
3638
|
-
},
|
|
3638
|
+
}, Pi = {
|
|
3639
3639
|
id: "landmarks/complementary-is-top-level",
|
|
3640
3640
|
category: "landmarks",
|
|
3641
3641
|
wcag: [],
|
|
@@ -3658,7 +3658,7 @@ const Ei = {
|
|
|
3658
3658
|
}
|
|
3659
3659
|
return a;
|
|
3660
3660
|
}
|
|
3661
|
-
},
|
|
3661
|
+
}, Di = {
|
|
3662
3662
|
id: "landmarks/landmark-unique",
|
|
3663
3663
|
category: "landmarks",
|
|
3664
3664
|
wcag: [],
|
|
@@ -3675,14 +3675,14 @@ const Ei = {
|
|
|
3675
3675
|
{ selector: 'form[aria-label], form[aria-labelledby], [role="form"], [role="search"]', type: "form" }
|
|
3676
3676
|
];
|
|
3677
3677
|
for (const { selector: i, type: n } of t) {
|
|
3678
|
-
const
|
|
3679
|
-
if (
|
|
3680
|
-
const
|
|
3681
|
-
for (const s of
|
|
3682
|
-
const l =
|
|
3683
|
-
d.push(s),
|
|
3678
|
+
const o = Array.from(e.querySelectorAll(i)).filter((s) => !h(s));
|
|
3679
|
+
if (o.length <= 1) continue;
|
|
3680
|
+
const r = /* @__PURE__ */ new Map();
|
|
3681
|
+
for (const s of o) {
|
|
3682
|
+
const l = x(s).toLowerCase() || "", d = r.get(l) || [];
|
|
3683
|
+
d.push(s), r.set(l, d);
|
|
3684
3684
|
}
|
|
3685
|
-
for (const [s, l] of
|
|
3685
|
+
for (const [s, l] of r)
|
|
3686
3686
|
if (l.length > 1)
|
|
3687
3687
|
for (const d of l.slice(1))
|
|
3688
3688
|
a.push({
|
|
@@ -3710,8 +3710,8 @@ const Ei = {
|
|
|
3710
3710
|
if (!t) return [];
|
|
3711
3711
|
for (const n of t.children) {
|
|
3712
3712
|
if (h(n) || n instanceof HTMLScriptElement || n instanceof HTMLStyleElement || n.tagName === "NOSCRIPT" || n instanceof HTMLElement && n.hidden || n.matches('a[href^="#"]')) continue;
|
|
3713
|
-
const
|
|
3714
|
-
!
|
|
3713
|
+
const o = n.matches(Re), r = (i = n.textContent) == null ? void 0 : i.trim();
|
|
3714
|
+
!o && r && (n.querySelector(Re) || a.push({
|
|
3715
3715
|
ruleId: "landmarks/region",
|
|
3716
3716
|
selector: p(n),
|
|
3717
3717
|
html: m(n),
|
|
@@ -3738,14 +3738,14 @@ const Ei = {
|
|
|
3738
3738
|
if (!e.doctype && e.body) {
|
|
3739
3739
|
const n = e.body.children;
|
|
3740
3740
|
if (n.length > 0 && Array.from(n).every(
|
|
3741
|
-
(
|
|
3741
|
+
(o) => o.tagName.toLowerCase() === "svg" || o.tagName.toLowerCase() === "math"
|
|
3742
3742
|
)) return [];
|
|
3743
3743
|
}
|
|
3744
3744
|
if (!((t = a.getAttribute("lang")) != null && t.trim())) {
|
|
3745
3745
|
let n;
|
|
3746
3746
|
if (e.body) {
|
|
3747
|
-
const
|
|
3748
|
-
|
|
3747
|
+
const o = ((i = e.body.textContent) == null ? void 0 : i.trim().replace(/\s+/g, " ")) || "";
|
|
3748
|
+
o && (n = o.slice(0, 200));
|
|
3749
3749
|
}
|
|
3750
3750
|
return [{
|
|
3751
3751
|
ruleId: "readable/html-has-lang",
|
|
@@ -3761,13 +3761,13 @@ const Ei = {
|
|
|
3761
3761
|
}
|
|
3762
3762
|
}, ji = new Set(
|
|
3763
3763
|
"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(" ")
|
|
3764
|
-
),
|
|
3764
|
+
), Wi = new Set(
|
|
3765
3765
|
"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(" ")
|
|
3766
|
-
),
|
|
3766
|
+
), Ui = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
|
|
3767
3767
|
function Ke(e) {
|
|
3768
|
-
if (!
|
|
3768
|
+
if (!Ui.test(e)) return !1;
|
|
3769
3769
|
const a = e.split("-")[0].toLowerCase();
|
|
3770
|
-
return a.length === 2 ? ji.has(a) : a.length === 3 ? !
|
|
3770
|
+
return a.length === 2 ? ji.has(a) : a.length === 3 ? !Wi.has(a) : !1;
|
|
3771
3771
|
}
|
|
3772
3772
|
function Ce(e) {
|
|
3773
3773
|
var i;
|
|
@@ -3777,25 +3777,25 @@ function Ce(e) {
|
|
|
3777
3777
|
if (!t.data.trim()) continue;
|
|
3778
3778
|
const n = t.parentElement;
|
|
3779
3779
|
if (!n || n instanceof HTMLElement && (n.hidden || n.style.display === "none")) continue;
|
|
3780
|
-
let
|
|
3781
|
-
for (;
|
|
3782
|
-
if (
|
|
3783
|
-
|
|
3780
|
+
let o = n, r = !1;
|
|
3781
|
+
for (; o && o !== e; ) {
|
|
3782
|
+
if (o.hasAttribute("lang")) {
|
|
3783
|
+
r = !0;
|
|
3784
3784
|
break;
|
|
3785
3785
|
}
|
|
3786
|
-
|
|
3786
|
+
o = o.parentElement;
|
|
3787
3787
|
}
|
|
3788
|
-
if (!
|
|
3788
|
+
if (!r) return !0;
|
|
3789
3789
|
}
|
|
3790
3790
|
for (const n of e.querySelectorAll("img[alt]")) {
|
|
3791
3791
|
if (!((i = n.getAttribute("alt")) == null ? void 0 : i.trim())) continue;
|
|
3792
|
-
let
|
|
3793
|
-
for (;
|
|
3794
|
-
if (
|
|
3792
|
+
let r = n.parentElement, s = !1;
|
|
3793
|
+
for (; r && r !== e; ) {
|
|
3794
|
+
if (r.hasAttribute("lang")) {
|
|
3795
3795
|
s = !0;
|
|
3796
3796
|
break;
|
|
3797
3797
|
}
|
|
3798
|
-
|
|
3798
|
+
r = r.parentElement;
|
|
3799
3799
|
}
|
|
3800
3800
|
if (!s) return !0;
|
|
3801
3801
|
}
|
|
@@ -3867,11 +3867,11 @@ const Oi = {
|
|
|
3867
3867
|
description: "The lang and xml:lang attributes on <html> must match.",
|
|
3868
3868
|
guidance: "In XHTML documents, if both lang and xml:lang are present, they must specify the same base language. Mismatched values confuse assistive technologies. Either remove xml:lang (preferred for HTML5) or ensure both attributes have identical values.",
|
|
3869
3869
|
run(e) {
|
|
3870
|
-
var n,
|
|
3871
|
-
const a = e.documentElement, t = (n = a.getAttribute("lang")) == null ? void 0 : n.trim().toLowerCase(), i = (
|
|
3870
|
+
var n, o;
|
|
3871
|
+
const a = e.documentElement, t = (n = a.getAttribute("lang")) == null ? void 0 : n.trim().toLowerCase(), i = (o = a.getAttribute("xml:lang")) == null ? void 0 : o.trim().toLowerCase();
|
|
3872
3872
|
if (t && i) {
|
|
3873
|
-
const
|
|
3874
|
-
if (
|
|
3873
|
+
const r = t.split("-")[0], s = i.split("-")[0];
|
|
3874
|
+
if (r !== s)
|
|
3875
3875
|
return [{
|
|
3876
3876
|
ruleId: "readable/html-xml-lang-mismatch",
|
|
3877
3877
|
selector: "html",
|
|
@@ -3897,7 +3897,7 @@ const Oi = {
|
|
|
3897
3897
|
const a = [];
|
|
3898
3898
|
for (const t of e.querySelectorAll("iframe, frame")) {
|
|
3899
3899
|
if (h(t) || Ge(t)) continue;
|
|
3900
|
-
if (!
|
|
3900
|
+
if (!x(t)) {
|
|
3901
3901
|
const n = t.getAttribute("src");
|
|
3902
3902
|
a.push({
|
|
3903
3903
|
ruleId: "labels-and-names/frame-title",
|
|
@@ -3924,21 +3924,21 @@ const Oi = {
|
|
|
3924
3924
|
run(e) {
|
|
3925
3925
|
var n;
|
|
3926
3926
|
const a = [], t = Array.from(e.querySelectorAll("iframe[title], frame[title]")), i = /* @__PURE__ */ new Map();
|
|
3927
|
-
for (const
|
|
3928
|
-
if (h(
|
|
3929
|
-
const
|
|
3930
|
-
if (
|
|
3931
|
-
const s = i.get(
|
|
3932
|
-
s.push(
|
|
3927
|
+
for (const o of t) {
|
|
3928
|
+
if (h(o) || Ge(o)) continue;
|
|
3929
|
+
const r = (n = o.getAttribute("title")) == null ? void 0 : n.trim().toLowerCase();
|
|
3930
|
+
if (r) {
|
|
3931
|
+
const s = i.get(r) || [];
|
|
3932
|
+
s.push(o), i.set(r, s);
|
|
3933
3933
|
}
|
|
3934
3934
|
}
|
|
3935
|
-
for (const [,
|
|
3936
|
-
if (
|
|
3937
|
-
for (const
|
|
3935
|
+
for (const [, o] of i)
|
|
3936
|
+
if (o.length > 1)
|
|
3937
|
+
for (const r of o.slice(1))
|
|
3938
3938
|
a.push({
|
|
3939
3939
|
ruleId: "labels-and-names/frame-title-unique",
|
|
3940
|
-
selector: p(
|
|
3941
|
-
html: m(
|
|
3940
|
+
selector: p(r),
|
|
3941
|
+
html: m(r),
|
|
3942
3942
|
impact: "moderate",
|
|
3943
3943
|
message: "Frame title is not unique. Use a distinct title for each frame."
|
|
3944
3944
|
});
|
|
@@ -3994,10 +3994,10 @@ const Ji = [
|
|
|
3994
3994
|
"textbox"
|
|
3995
3995
|
]);
|
|
3996
3996
|
function Zi(e) {
|
|
3997
|
-
var
|
|
3998
|
-
const a = (
|
|
3997
|
+
var r, s, l, d;
|
|
3998
|
+
const a = (r = e.getAttribute("role")) == null ? void 0 : r.trim().toLowerCase();
|
|
3999
3999
|
if (a && Ki.has(a) || (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) && !(a && Qi.has(a)))
|
|
4000
|
-
return
|
|
4000
|
+
return x(e);
|
|
4001
4001
|
const i = e.getAttribute("aria-labelledby");
|
|
4002
4002
|
if (i) {
|
|
4003
4003
|
const c = i.split(/\s+/).map((u) => {
|
|
@@ -4012,8 +4012,8 @@ function Zi(e) {
|
|
|
4012
4012
|
const c = Xi(e);
|
|
4013
4013
|
if (c) return c;
|
|
4014
4014
|
}
|
|
4015
|
-
const
|
|
4016
|
-
if (
|
|
4015
|
+
const o = (l = e.getAttribute("title")) == null ? void 0 : l.trim();
|
|
4016
|
+
if (o) return o;
|
|
4017
4017
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
|
|
4018
4018
|
const c = (d = e.getAttribute("placeholder")) == null ? void 0 : d.trim();
|
|
4019
4019
|
if (c) return c;
|
|
@@ -4034,16 +4034,16 @@ const en = {
|
|
|
4034
4034
|
var i;
|
|
4035
4035
|
const a = [], t = e.querySelectorAll(`${Qe}, ${Ji}`);
|
|
4036
4036
|
for (const n of t) {
|
|
4037
|
-
if (h(n) ||
|
|
4038
|
-
const
|
|
4039
|
-
if (
|
|
4037
|
+
if (h(n) || I(n)) continue;
|
|
4038
|
+
const o = (i = n.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase();
|
|
4039
|
+
if (o === "presentation" || o === "none") continue;
|
|
4040
4040
|
if (!Zi(n)) {
|
|
4041
4041
|
const s = [], l = n.tagName.toLowerCase(), d = n.getAttribute("type");
|
|
4042
4042
|
d && l === "input" && s.push(`type: ${d}`);
|
|
4043
4043
|
const c = n.getAttribute("name");
|
|
4044
4044
|
c && s.push(`name: "${c}"`);
|
|
4045
4045
|
const u = n.getAttribute("placeholder");
|
|
4046
|
-
u && s.push(`placeholder: "${u}"`),
|
|
4046
|
+
u && s.push(`placeholder: "${u}"`), o && s.push(`role: ${o}`);
|
|
4047
4047
|
const b = n.getAttribute("id");
|
|
4048
4048
|
b && s.push(`id: "${b}"`), a.push({
|
|
4049
4049
|
ruleId: "labels-and-names/form-label",
|
|
@@ -4072,15 +4072,15 @@ const en = {
|
|
|
4072
4072
|
for (const i of t) {
|
|
4073
4073
|
if (h(i) || !i.id) continue;
|
|
4074
4074
|
const n = e.querySelectorAll(`label[for="${CSS.escape(i.id)}"]`);
|
|
4075
|
-
let
|
|
4076
|
-
for (;
|
|
4077
|
-
if (
|
|
4078
|
-
|
|
4075
|
+
let o = 0, r = i.parentElement;
|
|
4076
|
+
for (; r; ) {
|
|
4077
|
+
if (r.tagName.toLowerCase() === "label" && !r.hasAttribute("for")) {
|
|
4078
|
+
o++;
|
|
4079
4079
|
break;
|
|
4080
4080
|
}
|
|
4081
|
-
|
|
4081
|
+
r = r.parentElement;
|
|
4082
4082
|
}
|
|
4083
|
-
const s = n.length +
|
|
4083
|
+
const s = n.length + o;
|
|
4084
4084
|
s > 1 && a.push({
|
|
4085
4085
|
ruleId: "labels-and-names/multiple-labels",
|
|
4086
4086
|
selector: p(i),
|
|
@@ -4107,9 +4107,9 @@ const en = {
|
|
|
4107
4107
|
for (const n of e.querySelectorAll(
|
|
4108
4108
|
'input[type="submit"], input[type="button"], input[type="reset"]'
|
|
4109
4109
|
)) {
|
|
4110
|
-
if (h(n) ||
|
|
4111
|
-
const
|
|
4112
|
-
!
|
|
4110
|
+
if (h(n) || I(n)) continue;
|
|
4111
|
+
const o = (t = n.getAttribute("value")) == null ? void 0 : t.trim(), r = (i = n.getAttribute("type")) == null ? void 0 : i.toLowerCase(), s = (r === "submit" || r === "reset") && !n.hasAttribute("value");
|
|
4112
|
+
!o && !s && !x(n) && a.push({
|
|
4113
4113
|
ruleId: "labels-and-names/input-button-name",
|
|
4114
4114
|
selector: p(n),
|
|
4115
4115
|
html: m(n),
|
|
@@ -4127,8 +4127,8 @@ function Te(e) {
|
|
|
4127
4127
|
function Ne(e, a) {
|
|
4128
4128
|
const t = Te(e), i = Te(a);
|
|
4129
4129
|
if (!t || !i || t.includes(i) || i.includes(t)) return !0;
|
|
4130
|
-
const n = i.split(/\s+/).map((
|
|
4131
|
-
return n.length >= 2 && n.filter((
|
|
4130
|
+
const n = i.split(/\s+/).map((o) => o.replace(/[.,;:!?\u2026]+$/g, "")).filter((o) => o.length > 2);
|
|
4131
|
+
return n.length >= 2 && n.filter((r) => t.includes(r)).length / n.length > 0.5;
|
|
4132
4132
|
}
|
|
4133
4133
|
const nn = {
|
|
4134
4134
|
id: "labels-and-names/label-content-mismatch",
|
|
@@ -4145,14 +4145,14 @@ const nn = {
|
|
|
4145
4145
|
const a = [];
|
|
4146
4146
|
for (const t of e.querySelectorAll('button, [role="button"], a[href], input[type="submit"], input[type="button"]')) {
|
|
4147
4147
|
if (h(t)) continue;
|
|
4148
|
-
const i =
|
|
4148
|
+
const i = x(t);
|
|
4149
4149
|
if (!i) continue;
|
|
4150
4150
|
let n = "";
|
|
4151
4151
|
t instanceof HTMLInputElement ? n = t.value || "" : n = ee(t);
|
|
4152
|
-
const
|
|
4153
|
-
if (!
|
|
4154
|
-
const
|
|
4155
|
-
!
|
|
4152
|
+
const o = n.trim();
|
|
4153
|
+
if (!o || o.length <= 2) continue;
|
|
4154
|
+
const r = t.hasAttribute("aria-label"), s = t.hasAttribute("aria-labelledby");
|
|
4155
|
+
!r && !s || Ne(i, n) || a.push({
|
|
4156
4156
|
ruleId: "labels-and-names/label-content-mismatch",
|
|
4157
4157
|
selector: p(t),
|
|
4158
4158
|
html: m(t),
|
|
@@ -4163,26 +4163,26 @@ const nn = {
|
|
|
4163
4163
|
}
|
|
4164
4164
|
for (const t of e.querySelectorAll("input, select, textarea")) {
|
|
4165
4165
|
if (h(t) || t instanceof HTMLInputElement && ["hidden", "submit", "button", "image"].includes(t.type)) continue;
|
|
4166
|
-
const i =
|
|
4166
|
+
const i = x(t);
|
|
4167
4167
|
if (!i || !t.hasAttribute("aria-label")) continue;
|
|
4168
|
-
const
|
|
4169
|
-
let
|
|
4170
|
-
if (
|
|
4171
|
-
const s = e.querySelector(`label[for="${CSS.escape(
|
|
4172
|
-
s && (
|
|
4168
|
+
const o = t.id;
|
|
4169
|
+
let r = "";
|
|
4170
|
+
if (o) {
|
|
4171
|
+
const s = e.querySelector(`label[for="${CSS.escape(o)}"]`);
|
|
4172
|
+
s && (r = ee(s));
|
|
4173
4173
|
}
|
|
4174
|
-
|
|
4174
|
+
r.trim() && (Ne(i, r) || a.push({
|
|
4175
4175
|
ruleId: "labels-and-names/label-content-mismatch",
|
|
4176
4176
|
selector: p(t),
|
|
4177
4177
|
html: m(t),
|
|
4178
4178
|
impact: "serious",
|
|
4179
|
-
message: `Accessible name "${i}" does not contain visible label "${
|
|
4179
|
+
message: `Accessible name "${i}" does not contain visible label "${r.trim()}".`,
|
|
4180
4180
|
fix: { type: "suggest", suggestion: "Update aria-label to include the visible label text so voice control users can activate this element by speaking its label" }
|
|
4181
4181
|
}));
|
|
4182
4182
|
}
|
|
4183
4183
|
return a;
|
|
4184
4184
|
}
|
|
4185
|
-
},
|
|
4185
|
+
}, on = {
|
|
4186
4186
|
id: "labels-and-names/label-title-only",
|
|
4187
4187
|
category: "labels-and-names",
|
|
4188
4188
|
wcag: ["4.1.2"],
|
|
@@ -4192,15 +4192,15 @@ const nn = {
|
|
|
4192
4192
|
description: "Form elements should not use title attribute as the only accessible name.",
|
|
4193
4193
|
guidance: "The title attribute is unreliable as a label because it only appears on hover/focus (not visible to touch users) and is often ignored by assistive technologies. Use a visible <label> element, aria-label, or aria-labelledby instead. Title can supplement a label but should not replace it.",
|
|
4194
4194
|
run(e) {
|
|
4195
|
-
var i, n,
|
|
4195
|
+
var i, n, o;
|
|
4196
4196
|
const a = [], t = e.querySelectorAll(Qe);
|
|
4197
|
-
for (const
|
|
4198
|
-
if (h(
|
|
4199
|
-
const s =
|
|
4197
|
+
for (const r of t) {
|
|
4198
|
+
if (h(r)) continue;
|
|
4199
|
+
const s = r.hasAttribute("title") && ((i = r.getAttribute("title")) == null ? void 0 : i.trim()), l = r.hasAttribute("aria-label") && ((n = r.getAttribute("aria-label")) == null ? void 0 : n.trim()), d = r.hasAttribute("aria-labelledby"), c = Yi(r), u = !!((o = c == null ? void 0 : c.textContent) != null && o.trim());
|
|
4200
4200
|
s && !l && !d && !u && a.push({
|
|
4201
4201
|
ruleId: "labels-and-names/label-title-only",
|
|
4202
|
-
selector: p(
|
|
4203
|
-
html: m(
|
|
4202
|
+
selector: p(r),
|
|
4203
|
+
html: m(r),
|
|
4204
4204
|
impact: "serious",
|
|
4205
4205
|
message: "Form element uses title attribute as only label. Use <label>, aria-label, or aria-labelledby instead.",
|
|
4206
4206
|
fix: { type: "suggest", suggestion: "Add a visible <label> element or aria-label attribute, and optionally keep the title as supplementary text" }
|
|
@@ -4208,7 +4208,7 @@ const nn = {
|
|
|
4208
4208
|
}
|
|
4209
4209
|
return a;
|
|
4210
4210
|
}
|
|
4211
|
-
},
|
|
4211
|
+
}, rn = {
|
|
4212
4212
|
id: "labels-and-names/aria-command-name",
|
|
4213
4213
|
category: "labels-and-names",
|
|
4214
4214
|
actRuleIds: ["m6b1q3"],
|
|
@@ -4221,12 +4221,12 @@ const nn = {
|
|
|
4221
4221
|
var t;
|
|
4222
4222
|
const a = [];
|
|
4223
4223
|
for (const i of e.querySelectorAll('[role="button"], [role="link"], [role="menuitem"]')) {
|
|
4224
|
-
if (h(i) ||
|
|
4224
|
+
if (h(i) || I(i) || se(i)) continue;
|
|
4225
4225
|
const n = i.getAttribute("role");
|
|
4226
4226
|
if ((i.tagName.toLowerCase() === "button" || i.tagName.toLowerCase() === "a") && n !== "menuitem") continue;
|
|
4227
|
-
if (!
|
|
4228
|
-
const
|
|
4229
|
-
if ((t =
|
|
4227
|
+
if (!x(i)) {
|
|
4228
|
+
const r = i.querySelector("img[alt]");
|
|
4229
|
+
if ((t = r == null ? void 0 : r.getAttribute("alt")) != null && t.trim()) continue;
|
|
4230
4230
|
a.push({
|
|
4231
4231
|
ruleId: "labels-and-names/aria-command-name",
|
|
4232
4232
|
selector: p(i),
|
|
@@ -4254,13 +4254,13 @@ function M(e) {
|
|
|
4254
4254
|
var i;
|
|
4255
4255
|
const t = [];
|
|
4256
4256
|
for (const n of a.querySelectorAll(e.selector)) {
|
|
4257
|
-
if (h(n) || e.checkComputedHidden &&
|
|
4257
|
+
if (h(n) || e.checkComputedHidden && I(n) || e.checkShadowDOM && se(n)) continue;
|
|
4258
4258
|
if (e.roleSet) {
|
|
4259
|
-
const
|
|
4260
|
-
if (!
|
|
4259
|
+
const r = (i = n.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase();
|
|
4260
|
+
if (!r || !e.roleSet.has(r)) continue;
|
|
4261
4261
|
}
|
|
4262
4262
|
if (e.skipNative && n.matches(e.skipNative)) continue;
|
|
4263
|
-
|
|
4263
|
+
x(n) || t.push({
|
|
4264
4264
|
ruleId: e.id,
|
|
4265
4265
|
selector: p(n),
|
|
4266
4266
|
html: m(n),
|
|
@@ -4337,12 +4337,12 @@ const sn = M({
|
|
|
4337
4337
|
fix: { type: "add-text-content" }
|
|
4338
4338
|
});
|
|
4339
4339
|
function bn(e) {
|
|
4340
|
-
var
|
|
4340
|
+
var o, r, s;
|
|
4341
4341
|
const a = [], t = e.className;
|
|
4342
4342
|
t && typeof t == "string" && t.trim() && a.push(`Classes: ${t.trim().slice(0, 100)}`);
|
|
4343
4343
|
const i = e.closest("form");
|
|
4344
4344
|
if (i) {
|
|
4345
|
-
const l = i.getAttribute("aria-label") || ((
|
|
4345
|
+
const l = i.getAttribute("aria-label") || ((r = (o = i.querySelector("legend")) == null ? void 0 : o.textContent) == null ? void 0 : r.trim());
|
|
4346
4346
|
l && a.push(`Form: ${l.slice(0, 60)}`);
|
|
4347
4347
|
}
|
|
4348
4348
|
const n = e.parentElement;
|
|
@@ -4366,10 +4366,10 @@ const hn = {
|
|
|
4366
4366
|
run(e) {
|
|
4367
4367
|
const a = [];
|
|
4368
4368
|
for (const t of e.querySelectorAll('button, [role="button"]')) {
|
|
4369
|
-
if (h(t) ||
|
|
4369
|
+
if (h(t) || I(t)) continue;
|
|
4370
4370
|
const i = t.getAttribute("role");
|
|
4371
4371
|
if ((i === "none" || i === "presentation") && !(t.matches('button:not([disabled]), [tabindex]:not([tabindex="-1"])') || t.tagName.toLowerCase() === "button" && !t.disabled) || se(t)) continue;
|
|
4372
|
-
|
|
4372
|
+
x(t) || a.push({
|
|
4373
4373
|
ruleId: "labels-and-names/button-name",
|
|
4374
4374
|
selector: p(t),
|
|
4375
4375
|
html: m(t),
|
|
@@ -4394,7 +4394,7 @@ const hn = {
|
|
|
4394
4394
|
const a = [];
|
|
4395
4395
|
for (const t of e.querySelectorAll("details > summary:first-of-type")) {
|
|
4396
4396
|
if (h(t)) continue;
|
|
4397
|
-
|
|
4397
|
+
x(t) || a.push({
|
|
4398
4398
|
ruleId: "labels-and-names/summary-name",
|
|
4399
4399
|
selector: p(t),
|
|
4400
4400
|
html: m(t),
|
|
@@ -4405,14 +4405,14 @@ const hn = {
|
|
|
4405
4405
|
}
|
|
4406
4406
|
return a;
|
|
4407
4407
|
}
|
|
4408
|
-
},
|
|
4408
|
+
}, re = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"];
|
|
4409
4409
|
function fn(e) {
|
|
4410
4410
|
const a = /* @__PURE__ */ new Set();
|
|
4411
4411
|
for (const t of e.querySelectorAll("[aria-labelledby], [aria-describedby], [aria-controls], [aria-owns], [aria-flowto]"))
|
|
4412
|
-
for (const i of
|
|
4412
|
+
for (const i of re) {
|
|
4413
4413
|
const n = t.getAttribute(i);
|
|
4414
|
-
n && n.split(/\s+/).forEach((
|
|
4415
|
-
|
|
4414
|
+
n && n.split(/\s+/).forEach((o) => {
|
|
4415
|
+
o && a.add(o);
|
|
4416
4416
|
});
|
|
4417
4417
|
}
|
|
4418
4418
|
for (const t of e.querySelectorAll("label[for]")) {
|
|
@@ -4433,14 +4433,14 @@ const vn = {
|
|
|
4433
4433
|
const a = [], t = fn(e), i = /* @__PURE__ */ new Map();
|
|
4434
4434
|
for (const n of e.querySelectorAll("[id]"))
|
|
4435
4435
|
t.has(n.id) && (n instanceof HTMLElement && (n.style.display === "none" || n.style.visibility === "hidden" || n.hidden) || i.set(n.id, (i.get(n.id) ?? 0) + 1));
|
|
4436
|
-
for (const [n,
|
|
4437
|
-
if (
|
|
4438
|
-
const
|
|
4439
|
-
|
|
4436
|
+
for (const [n, o] of i) {
|
|
4437
|
+
if (o <= 1) continue;
|
|
4438
|
+
const r = e.querySelectorAll(`#${CSS.escape(n)}`), s = e.querySelector(
|
|
4439
|
+
re.map((c) => `[${c}~="${CSS.escape(n)}"]`).join(", ")
|
|
4440
4440
|
), l = e.querySelector(`label[for="${CSS.escape(n)}"]`);
|
|
4441
4441
|
let d;
|
|
4442
4442
|
if (s) {
|
|
4443
|
-
const c =
|
|
4443
|
+
const c = re.find(
|
|
4444
4444
|
(u) => {
|
|
4445
4445
|
var b;
|
|
4446
4446
|
return (b = s.getAttribute(u)) == null ? void 0 : b.split(/\s+/).includes(n);
|
|
@@ -4450,11 +4450,11 @@ const vn = {
|
|
|
4450
4450
|
} else l && (d = "label[for]");
|
|
4451
4451
|
a.push({
|
|
4452
4452
|
ruleId: "labels-and-names/duplicate-id-aria",
|
|
4453
|
-
selector: p(
|
|
4454
|
-
html: m(
|
|
4453
|
+
selector: p(r[1]),
|
|
4454
|
+
html: m(r[1]),
|
|
4455
4455
|
impact: "critical",
|
|
4456
4456
|
message: `Duplicate ID "${n}" referenced by ${d ?? "an accessibility attribute"}.`,
|
|
4457
|
-
context: `First element: ${m(
|
|
4457
|
+
context: `First element: ${m(r[0])}${d ? `
|
|
4458
4458
|
Referenced by: ${d}` : ""}`,
|
|
4459
4459
|
fix: { type: "suggest", suggestion: "Change the duplicate ID to a unique value so the ARIA or label reference points to the correct element" }
|
|
4460
4460
|
});
|
|
@@ -4462,6 +4462,49 @@ Referenced by: ${d}` : ""}`,
|
|
|
4462
4462
|
return a;
|
|
4463
4463
|
}
|
|
4464
4464
|
}, yn = {
|
|
4465
|
+
id: "input-assistance/accessible-authentication",
|
|
4466
|
+
category: "input-assistance",
|
|
4467
|
+
wcag: ["3.3.8"],
|
|
4468
|
+
level: "AA",
|
|
4469
|
+
fixability: "mechanical",
|
|
4470
|
+
description: 'Password inputs must not block password managers. Avoid autocomplete="off" and allow pasting.',
|
|
4471
|
+
guidance: 'WCAG 2.2 SC 3.3.8 requires that authentication steps either avoid cognitive function tests or provide a mechanism to assist users. Password managers are a key assistive mechanism. Setting autocomplete="off" on password fields prevents password managers from filling credentials. Blocking paste via onpaste attributes prevents users from pasting stored passwords. Set autocomplete to "current-password" for login forms or "new-password" for registration/change-password forms, and do not block paste on password fields.',
|
|
4472
|
+
run(e) {
|
|
4473
|
+
var t;
|
|
4474
|
+
const a = [];
|
|
4475
|
+
for (const i of e.querySelectorAll('input[type="password"]')) {
|
|
4476
|
+
if (h(i) || I(i) || i.disabled || i.getAttribute("aria-disabled") === "true") continue;
|
|
4477
|
+
if (((t = i.getAttribute("autocomplete")) == null ? void 0 : t.trim().toLowerCase()) === "off") {
|
|
4478
|
+
a.push({
|
|
4479
|
+
ruleId: "input-assistance/accessible-authentication",
|
|
4480
|
+
selector: p(i),
|
|
4481
|
+
html: m(i),
|
|
4482
|
+
impact: "critical",
|
|
4483
|
+
message: 'Password field has autocomplete="off" which blocks password managers.',
|
|
4484
|
+
fix: {
|
|
4485
|
+
type: "set-attribute",
|
|
4486
|
+
attribute: "autocomplete",
|
|
4487
|
+
value: "current-password"
|
|
4488
|
+
}
|
|
4489
|
+
});
|
|
4490
|
+
continue;
|
|
4491
|
+
}
|
|
4492
|
+
const o = i.getAttribute("onpaste");
|
|
4493
|
+
o && /return\s+false|preventDefault/.test(o) && a.push({
|
|
4494
|
+
ruleId: "input-assistance/accessible-authentication",
|
|
4495
|
+
selector: p(i),
|
|
4496
|
+
html: m(i),
|
|
4497
|
+
impact: "critical",
|
|
4498
|
+
message: "Password field blocks pasting, preventing password manager use.",
|
|
4499
|
+
fix: {
|
|
4500
|
+
type: "remove-attribute",
|
|
4501
|
+
attribute: "onpaste"
|
|
4502
|
+
}
|
|
4503
|
+
});
|
|
4504
|
+
}
|
|
4505
|
+
return a;
|
|
4506
|
+
}
|
|
4507
|
+
}, wn = {
|
|
4465
4508
|
id: "aria/aria-roles",
|
|
4466
4509
|
category: "aria",
|
|
4467
4510
|
actRuleIds: ["674b10"],
|
|
@@ -4473,13 +4516,13 @@ Referenced by: ${d}` : ""}`,
|
|
|
4473
4516
|
run(e) {
|
|
4474
4517
|
const a = [];
|
|
4475
4518
|
for (const t of e.querySelectorAll("[role]")) {
|
|
4476
|
-
const
|
|
4477
|
-
!
|
|
4519
|
+
const o = t.getAttribute("role").replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "").split(/\s+/).filter(Boolean);
|
|
4520
|
+
!o.some((s) => dt(s)) && o.length > 0 && a.push({
|
|
4478
4521
|
ruleId: "aria/aria-roles",
|
|
4479
4522
|
selector: p(t),
|
|
4480
4523
|
html: m(t),
|
|
4481
4524
|
impact: "critical",
|
|
4482
|
-
message: `Invalid ARIA role "${
|
|
4525
|
+
message: `Invalid ARIA role "${o[0]}".`,
|
|
4483
4526
|
fix: { type: "remove-attribute", attribute: "role" }
|
|
4484
4527
|
});
|
|
4485
4528
|
}
|
|
@@ -4497,7 +4540,7 @@ Referenced by: ${d}` : ""}`,
|
|
|
4497
4540
|
run(e) {
|
|
4498
4541
|
return le(e).validAttr;
|
|
4499
4542
|
}
|
|
4500
|
-
},
|
|
4543
|
+
}, An = {
|
|
4501
4544
|
id: "aria/aria-valid-attr-value",
|
|
4502
4545
|
category: "aria",
|
|
4503
4546
|
actRuleIds: ["6a7281"],
|
|
@@ -4509,7 +4552,7 @@ Referenced by: ${d}` : ""}`,
|
|
|
4509
4552
|
run(e) {
|
|
4510
4553
|
return le(e).validAttrValue;
|
|
4511
4554
|
}
|
|
4512
|
-
},
|
|
4555
|
+
}, kn = {
|
|
4513
4556
|
checkbox: ["aria-checked"],
|
|
4514
4557
|
combobox: ["aria-expanded"],
|
|
4515
4558
|
heading: ["aria-level"],
|
|
@@ -4523,7 +4566,7 @@ Referenced by: ${d}` : ""}`,
|
|
|
4523
4566
|
slider: ["aria-valuenow"],
|
|
4524
4567
|
spinbutton: ["aria-valuenow"],
|
|
4525
4568
|
switch: ["aria-checked"]
|
|
4526
|
-
},
|
|
4569
|
+
}, Sn = {
|
|
4527
4570
|
id: "aria/aria-required-attr",
|
|
4528
4571
|
category: "aria",
|
|
4529
4572
|
actRuleIds: ["4e8ab6"],
|
|
@@ -4536,22 +4579,22 @@ Referenced by: ${d}` : ""}`,
|
|
|
4536
4579
|
const a = [];
|
|
4537
4580
|
for (const t of e.querySelectorAll("[role]")) {
|
|
4538
4581
|
if (h(t) || t instanceof HTMLElement && t.style.display === "none") continue;
|
|
4539
|
-
const i = t.getAttribute("role").trim().toLowerCase(), n =
|
|
4582
|
+
const i = t.getAttribute("role").trim().toLowerCase(), n = kn[i];
|
|
4540
4583
|
if (n && !(i === "checkbox" && t instanceof HTMLInputElement && t.type === "checkbox") && !(i === "radio" && t instanceof HTMLInputElement && t.type === "radio") && !(i === "option" && t instanceof HTMLOptionElement) && !(i === "heading" && /^h[1-6]$/i.test(t.tagName))) {
|
|
4541
4584
|
if (i === "separator") {
|
|
4542
|
-
const
|
|
4543
|
-
if (!
|
|
4585
|
+
const o = t.getAttribute("tabindex");
|
|
4586
|
+
if (!o || o === "-1") continue;
|
|
4544
4587
|
}
|
|
4545
4588
|
if (!(t.tagName.toLowerCase() === "hr" && !t.hasAttribute("role"))) {
|
|
4546
|
-
for (const
|
|
4547
|
-
if (!t.hasAttribute(
|
|
4589
|
+
for (const o of n)
|
|
4590
|
+
if (!t.hasAttribute(o)) {
|
|
4548
4591
|
a.push({
|
|
4549
4592
|
ruleId: "aria/aria-required-attr",
|
|
4550
4593
|
selector: p(t),
|
|
4551
4594
|
html: m(t),
|
|
4552
4595
|
impact: "critical",
|
|
4553
|
-
message: `Role "${i}" requires attribute "${
|
|
4554
|
-
fix: { type: "add-attribute", attribute:
|
|
4596
|
+
message: `Role "${i}" requires attribute "${o}".`,
|
|
4597
|
+
fix: { type: "add-attribute", attribute: o, value: "" }
|
|
4555
4598
|
});
|
|
4556
4599
|
break;
|
|
4557
4600
|
}
|
|
@@ -4560,7 +4603,7 @@ Referenced by: ${d}` : ""}`,
|
|
|
4560
4603
|
}
|
|
4561
4604
|
return a;
|
|
4562
4605
|
}
|
|
4563
|
-
},
|
|
4606
|
+
}, In = {
|
|
4564
4607
|
alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
|
|
4565
4608
|
alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
|
|
4566
4609
|
application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
|
|
@@ -4632,7 +4675,7 @@ Referenced by: ${d}` : ""}`,
|
|
|
4632
4675
|
tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
|
|
4633
4676
|
treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
|
|
4634
4677
|
treeitem: /* @__PURE__ */ new Set(["aria-checked", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"])
|
|
4635
|
-
},
|
|
4678
|
+
}, qn = {
|
|
4636
4679
|
id: "aria/aria-allowed-attr",
|
|
4637
4680
|
category: "aria",
|
|
4638
4681
|
actRuleIds: ["5c01ea"],
|
|
@@ -4642,30 +4685,45 @@ Referenced by: ${d}` : ""}`,
|
|
|
4642
4685
|
description: "ARIA attributes must be allowed for the element's role.",
|
|
4643
4686
|
guidance: "Each ARIA role supports specific attributes. Using unsupported attributes creates confusion for assistive technologies. Check the ARIA specification for which attributes are valid for each role, or remove the attribute if it's not needed.",
|
|
4644
4687
|
run(e) {
|
|
4645
|
-
const a = []
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4688
|
+
const a = [], t = new Set(e.querySelectorAll("[role]")), i = e.createTreeWalker(
|
|
4689
|
+
e.body || e.documentElement,
|
|
4690
|
+
1
|
|
4691
|
+
/* NodeFilter.SHOW_ELEMENT */
|
|
4692
|
+
);
|
|
4693
|
+
let n = i.currentNode;
|
|
4694
|
+
for (; n; ) {
|
|
4695
|
+
if (n instanceof Element) {
|
|
4696
|
+
for (const o of n.attributes)
|
|
4697
|
+
if (o.name.startsWith("aria-")) {
|
|
4698
|
+
t.add(n);
|
|
4699
|
+
break;
|
|
4700
|
+
}
|
|
4701
|
+
}
|
|
4702
|
+
n = i.nextNode();
|
|
4703
|
+
}
|
|
4704
|
+
for (const o of t) {
|
|
4705
|
+
if (h(o)) continue;
|
|
4706
|
+
const r = W(o);
|
|
4707
|
+
if (!r) continue;
|
|
4708
|
+
const s = In[r];
|
|
4709
|
+
if (s)
|
|
4710
|
+
for (const l of o.attributes) {
|
|
4711
|
+
if (!l.name.startsWith("aria-") || ut.has(l.name) || s.has(l.name)) continue;
|
|
4712
|
+
const d = s.size > 0 ? [...s].join(", ") : "none (only global ARIA attributes)";
|
|
4655
4713
|
a.push({
|
|
4656
4714
|
ruleId: "aria/aria-allowed-attr",
|
|
4657
|
-
selector: p(
|
|
4658
|
-
html: m(
|
|
4715
|
+
selector: p(o),
|
|
4716
|
+
html: m(o),
|
|
4659
4717
|
impact: "critical",
|
|
4660
|
-
message: `ARIA attribute "${
|
|
4661
|
-
context: `Attribute: ${
|
|
4662
|
-
fix: { type: "remove-attribute", attribute:
|
|
4718
|
+
message: `ARIA attribute "${l.name}" is not allowed on role "${r}".`,
|
|
4719
|
+
context: `Attribute: ${l.name}="${l.value}", role: ${r}, allowed role-specific attributes: ${d}`,
|
|
4720
|
+
fix: { type: "remove-attribute", attribute: l.name }
|
|
4663
4721
|
});
|
|
4664
4722
|
}
|
|
4665
4723
|
}
|
|
4666
4724
|
return a;
|
|
4667
4725
|
}
|
|
4668
|
-
},
|
|
4726
|
+
}, En = /* @__PURE__ */ new Set([
|
|
4669
4727
|
"base",
|
|
4670
4728
|
"col",
|
|
4671
4729
|
"colgroup",
|
|
@@ -4680,7 +4738,7 @@ Referenced by: ${d}` : ""}`,
|
|
|
4680
4738
|
"template",
|
|
4681
4739
|
"title",
|
|
4682
4740
|
"track"
|
|
4683
|
-
]),
|
|
4741
|
+
]), P = {
|
|
4684
4742
|
a: /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem", "link"]),
|
|
4685
4743
|
"a[href]": /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem"]),
|
|
4686
4744
|
abbr: "any",
|
|
@@ -4736,6 +4794,7 @@ Referenced by: ${d}` : ""}`,
|
|
|
4736
4794
|
"input[type=checkbox]": /* @__PURE__ */ new Set(["button", "menuitemcheckbox", "option", "switch"]),
|
|
4737
4795
|
"input[type=image]": /* @__PURE__ */ new Set(["link", "menuitem", "menuitemcheckbox", "menuitemradio", "radio", "switch"]),
|
|
4738
4796
|
"input[type=radio]": /* @__PURE__ */ new Set(["menuitemradio"]),
|
|
4797
|
+
"input[type=search]": /* @__PURE__ */ new Set(["combobox", "searchbox"]),
|
|
4739
4798
|
"input[type=text]": /* @__PURE__ */ new Set(["combobox", "searchbox", "spinbutton"]),
|
|
4740
4799
|
ins: "any",
|
|
4741
4800
|
kbd: "any",
|
|
@@ -4787,22 +4846,22 @@ Referenced by: ${d}` : ""}`,
|
|
|
4787
4846
|
video: /* @__PURE__ */ new Set(["application"]),
|
|
4788
4847
|
wbr: /* @__PURE__ */ new Set(["none", "presentation"])
|
|
4789
4848
|
};
|
|
4790
|
-
function
|
|
4849
|
+
function Ln(e) {
|
|
4791
4850
|
var t;
|
|
4792
4851
|
const a = e.tagName.toLowerCase();
|
|
4793
|
-
if (
|
|
4852
|
+
if (En.has(a))
|
|
4794
4853
|
return "none";
|
|
4795
4854
|
if (a === "a" && e.hasAttribute("href"))
|
|
4796
|
-
return
|
|
4855
|
+
return P["a[href]"];
|
|
4797
4856
|
if (a === "img" && e.getAttribute("alt") === "")
|
|
4798
|
-
return
|
|
4857
|
+
return P["img[alt='']"];
|
|
4799
4858
|
if (a === "input") {
|
|
4800
4859
|
const n = `input[type=${((t = e.getAttribute("type")) == null ? void 0 : t.toLowerCase()) || "text"}]`;
|
|
4801
|
-
return n in
|
|
4860
|
+
return n in P ? P[n] : "none";
|
|
4802
4861
|
}
|
|
4803
|
-
return
|
|
4862
|
+
return P[a] || "any";
|
|
4804
4863
|
}
|
|
4805
|
-
const
|
|
4864
|
+
const Rn = {
|
|
4806
4865
|
id: "aria/aria-allowed-role",
|
|
4807
4866
|
category: "aria",
|
|
4808
4867
|
wcag: ["4.1.2"],
|
|
@@ -4817,16 +4876,16 @@ const Ln = {
|
|
|
4817
4876
|
if (h(i)) continue;
|
|
4818
4877
|
const n = (t = i.getAttribute("role")) == null ? void 0 : t.trim().toLowerCase();
|
|
4819
4878
|
if (!n) continue;
|
|
4820
|
-
const
|
|
4821
|
-
if (
|
|
4822
|
-
const
|
|
4823
|
-
|
|
4879
|
+
const o = $e(i);
|
|
4880
|
+
if (o && n === o) continue;
|
|
4881
|
+
const r = Ln(i);
|
|
4882
|
+
r === "none" ? a.push({
|
|
4824
4883
|
ruleId: "aria/aria-allowed-role",
|
|
4825
4884
|
selector: p(i),
|
|
4826
4885
|
html: m(i),
|
|
4827
4886
|
impact: "minor",
|
|
4828
4887
|
message: `Element <${i.tagName.toLowerCase()}> should not have an explicit role.`
|
|
4829
|
-
}) :
|
|
4888
|
+
}) : r !== "any" && !r.has(n) && a.push({
|
|
4830
4889
|
ruleId: "aria/aria-allowed-role",
|
|
4831
4890
|
selector: p(i),
|
|
4832
4891
|
html: m(i),
|
|
@@ -4836,7 +4895,7 @@ const Ln = {
|
|
|
4836
4895
|
}
|
|
4837
4896
|
return a;
|
|
4838
4897
|
}
|
|
4839
|
-
},
|
|
4898
|
+
}, Cn = {
|
|
4840
4899
|
id: "aria/aria-hidden-body",
|
|
4841
4900
|
selector: 'body[aria-hidden="true"]',
|
|
4842
4901
|
check: { type: "selector-exists" },
|
|
@@ -4849,8 +4908,8 @@ const Ln = {
|
|
|
4849
4908
|
fixability: "mechanical",
|
|
4850
4909
|
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.",
|
|
4851
4910
|
skipAriaHidden: !1
|
|
4852
|
-
},
|
|
4853
|
-
function
|
|
4911
|
+
}, Tn = N(Cn);
|
|
4912
|
+
function Nn(e) {
|
|
4854
4913
|
let a = e;
|
|
4855
4914
|
const t = e.ownerDocument, i = t.defaultView;
|
|
4856
4915
|
for (; a && a !== t.body; ) {
|
|
@@ -4863,13 +4922,13 @@ function Tn(e) {
|
|
|
4863
4922
|
}
|
|
4864
4923
|
return !0;
|
|
4865
4924
|
}
|
|
4866
|
-
function
|
|
4925
|
+
function Mn(e) {
|
|
4867
4926
|
const a = e.ownerDocument.defaultView;
|
|
4868
4927
|
if (!a) return !1;
|
|
4869
4928
|
const t = a.getComputedStyle(e), i = t.position;
|
|
4870
4929
|
if (i !== "absolute" && i !== "fixed") return !1;
|
|
4871
|
-
const n = parseFloat(t.top),
|
|
4872
|
-
if (!(!isNaN(n) && n < -500 || !isNaN(
|
|
4930
|
+
const n = parseFloat(t.top), o = parseFloat(t.left);
|
|
4931
|
+
if (!(!isNaN(n) && n < -500 || !isNaN(o) && o < -500)) return !1;
|
|
4873
4932
|
const s = e.id;
|
|
4874
4933
|
if (!s) return !1;
|
|
4875
4934
|
const l = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), d = new RegExp(
|
|
@@ -4881,7 +4940,7 @@ function Nn(e) {
|
|
|
4881
4940
|
}
|
|
4882
4941
|
return !1;
|
|
4883
4942
|
}
|
|
4884
|
-
const
|
|
4943
|
+
const $n = {
|
|
4885
4944
|
id: "aria/aria-hidden-focus",
|
|
4886
4945
|
category: "aria",
|
|
4887
4946
|
actRuleIds: ["6cfa84"],
|
|
@@ -4898,13 +4957,13 @@ const Mn = {
|
|
|
4898
4957
|
t.matches(j) && i.push(t);
|
|
4899
4958
|
for (const n of i)
|
|
4900
4959
|
if (n instanceof HTMLElement) {
|
|
4901
|
-
const
|
|
4902
|
-
if (
|
|
4903
|
-
const
|
|
4904
|
-
if (/\.focus\s*\(/.test(
|
|
4960
|
+
const o = n.getAttribute("tabindex");
|
|
4961
|
+
if (o === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Nn(n)) continue;
|
|
4962
|
+
const r = n.getAttribute("onfocus") || "";
|
|
4963
|
+
if (/\.focus\s*\(/.test(r) || Mn(n)) continue;
|
|
4905
4964
|
const s = n.tagName.toLowerCase();
|
|
4906
4965
|
let l;
|
|
4907
|
-
|
|
4966
|
+
o !== null ? l = `has tabindex="${o}"` : s === "a" && n.hasAttribute("href") ? l = "is a link with href" : s === "button" ? l = "is a <button>" : s === "input" ? l = `is an <input type="${n.type}">` : s === "select" ? l = "is a <select>" : s === "textarea" ? l = "is a <textarea>" : s === "iframe" ? l = "is an <iframe>" : l = `is a natively focusable <${s}>`;
|
|
4908
4967
|
const d = n === t ? n : n.closest('[aria-hidden="true"]');
|
|
4909
4968
|
a.push({
|
|
4910
4969
|
ruleId: "aria/aria-hidden-focus",
|
|
@@ -4919,7 +4978,7 @@ const Mn = {
|
|
|
4919
4978
|
}
|
|
4920
4979
|
return a;
|
|
4921
4980
|
}
|
|
4922
|
-
},
|
|
4981
|
+
}, Hn = {
|
|
4923
4982
|
id: "aria/aria-prohibited-attr",
|
|
4924
4983
|
category: "aria",
|
|
4925
4984
|
actRuleIds: ["kb1m8s"],
|
|
@@ -4931,7 +4990,7 @@ const Mn = {
|
|
|
4931
4990
|
run(e) {
|
|
4932
4991
|
return le(e).prohibitedAttr;
|
|
4933
4992
|
}
|
|
4934
|
-
},
|
|
4993
|
+
}, Pn = [
|
|
4935
4994
|
"a[href]",
|
|
4936
4995
|
"button:not([disabled])",
|
|
4937
4996
|
'input:not([disabled]):not([type="hidden"])',
|
|
@@ -4955,7 +5014,7 @@ const Mn = {
|
|
|
4955
5014
|
];
|
|
4956
5015
|
function Me(e) {
|
|
4957
5016
|
const a = [];
|
|
4958
|
-
e.matches(
|
|
5017
|
+
e.matches(Pn) && a.push("element is focusable");
|
|
4959
5018
|
for (const t of Dn)
|
|
4960
5019
|
if (e.hasAttribute(t)) {
|
|
4961
5020
|
a.push(`has ${t}`);
|
|
@@ -4963,7 +5022,7 @@ function Me(e) {
|
|
|
4963
5022
|
}
|
|
4964
5023
|
return (e.hasAttribute("aria-label") || e.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
|
|
4965
5024
|
}
|
|
4966
|
-
const
|
|
5025
|
+
const Fn = {
|
|
4967
5026
|
id: "aria/presentation-role-conflict",
|
|
4968
5027
|
category: "aria",
|
|
4969
5028
|
actRuleIds: ["46ca7f"],
|
|
@@ -5000,7 +5059,7 @@ const Pn = {
|
|
|
5000
5059
|
}
|
|
5001
5060
|
return a;
|
|
5002
5061
|
}
|
|
5003
|
-
},
|
|
5062
|
+
}, zn = /* @__PURE__ */ new Set([
|
|
5004
5063
|
"button",
|
|
5005
5064
|
"checkbox",
|
|
5006
5065
|
"img",
|
|
@@ -5018,7 +5077,7 @@ const Pn = {
|
|
|
5018
5077
|
"spinbutton",
|
|
5019
5078
|
"switch",
|
|
5020
5079
|
"tab"
|
|
5021
|
-
]),
|
|
5080
|
+
]), jn = {
|
|
5022
5081
|
id: "aria/presentational-children-focusable",
|
|
5023
5082
|
category: "aria",
|
|
5024
5083
|
actRuleIds: ["307n5z"],
|
|
@@ -5031,10 +5090,10 @@ const Pn = {
|
|
|
5031
5090
|
const a = [];
|
|
5032
5091
|
for (const t of e.querySelectorAll("*")) {
|
|
5033
5092
|
if (h(t)) continue;
|
|
5034
|
-
const i =
|
|
5035
|
-
if (!(!i || !
|
|
5093
|
+
const i = W(t);
|
|
5094
|
+
if (!(!i || !zn.has(i))) {
|
|
5036
5095
|
for (const n of t.querySelectorAll(j))
|
|
5037
|
-
if (n !== t && !n.disabled) {
|
|
5096
|
+
if (n !== t && !n.disabled && n.getAttribute("tabindex") !== "-1") {
|
|
5038
5097
|
a.push({
|
|
5039
5098
|
ruleId: "aria/presentational-children-focusable",
|
|
5040
5099
|
selector: p(n),
|
|
@@ -5051,7 +5110,7 @@ const Pn = {
|
|
|
5051
5110
|
}, Ze = [
|
|
5052
5111
|
// Text Alternatives
|
|
5053
5112
|
jt,
|
|
5054
|
-
|
|
5113
|
+
Ut,
|
|
5055
5114
|
Ot,
|
|
5056
5115
|
Vt,
|
|
5057
5116
|
_t,
|
|
@@ -5070,8 +5129,8 @@ const Pn = {
|
|
|
5070
5129
|
ha,
|
|
5071
5130
|
va,
|
|
5072
5131
|
ya,
|
|
5073
|
-
xa,
|
|
5074
5132
|
wa,
|
|
5133
|
+
xa,
|
|
5075
5134
|
ka,
|
|
5076
5135
|
Sa,
|
|
5077
5136
|
Ia,
|
|
@@ -5080,7 +5139,7 @@ const Pn = {
|
|
|
5080
5139
|
Ra,
|
|
5081
5140
|
Ca,
|
|
5082
5141
|
Ta,
|
|
5083
|
-
|
|
5142
|
+
Pa,
|
|
5084
5143
|
Ja,
|
|
5085
5144
|
Ka,
|
|
5086
5145
|
// Keyboard Accessible
|
|
@@ -5097,8 +5156,8 @@ const Pn = {
|
|
|
5097
5156
|
fi,
|
|
5098
5157
|
yi,
|
|
5099
5158
|
// Navigable
|
|
5100
|
-
xi,
|
|
5101
5159
|
wi,
|
|
5160
|
+
xi,
|
|
5102
5161
|
Ai,
|
|
5103
5162
|
ki,
|
|
5104
5163
|
Si,
|
|
@@ -5113,8 +5172,8 @@ const Pn = {
|
|
|
5113
5172
|
Mi,
|
|
5114
5173
|
$i,
|
|
5115
5174
|
Hi,
|
|
5116
|
-
Di,
|
|
5117
5175
|
Pi,
|
|
5176
|
+
Di,
|
|
5118
5177
|
Fi,
|
|
5119
5178
|
// Readable
|
|
5120
5179
|
zi,
|
|
@@ -5128,8 +5187,8 @@ const Pn = {
|
|
|
5128
5187
|
tn,
|
|
5129
5188
|
an,
|
|
5130
5189
|
nn,
|
|
5131
|
-
rn,
|
|
5132
5190
|
on,
|
|
5191
|
+
rn,
|
|
5133
5192
|
sn,
|
|
5134
5193
|
ln,
|
|
5135
5194
|
cn,
|
|
@@ -5140,21 +5199,23 @@ const Pn = {
|
|
|
5140
5199
|
hn,
|
|
5141
5200
|
gn,
|
|
5142
5201
|
vn,
|
|
5143
|
-
//
|
|
5202
|
+
// Input Assistance
|
|
5144
5203
|
yn,
|
|
5145
|
-
|
|
5204
|
+
// ARIA
|
|
5146
5205
|
wn,
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5206
|
+
xn,
|
|
5207
|
+
An,
|
|
5208
|
+
Sn,
|
|
5209
|
+
qn,
|
|
5210
|
+
Rn,
|
|
5211
|
+
Tn,
|
|
5152
5212
|
$n,
|
|
5153
|
-
|
|
5154
|
-
|
|
5213
|
+
Hn,
|
|
5214
|
+
Fn,
|
|
5215
|
+
jn
|
|
5155
5216
|
];
|
|
5156
5217
|
let me = [], et = /* @__PURE__ */ new Set(), tt = !1, at = !1, T, z;
|
|
5157
|
-
function
|
|
5218
|
+
function Bn(e) {
|
|
5158
5219
|
e.additionalRules && (me = e.additionalRules), e.disabledRules && (et = new Set(e.disabledRules)), "includeAAA" in e && (tt = !!e.includeAAA), "componentMode" in e && (at = !!e.componentMode), "locale" in e && (T = e.locale || void 0), z = void 0;
|
|
5159
5220
|
}
|
|
5160
5221
|
function pe() {
|
|
@@ -5165,23 +5226,23 @@ function pe() {
|
|
|
5165
5226
|
}).concat(me);
|
|
5166
5227
|
return T ? (z = Ht(a, T), z) : a;
|
|
5167
5228
|
}
|
|
5168
|
-
function
|
|
5229
|
+
function _n(e) {
|
|
5169
5230
|
it();
|
|
5170
5231
|
const a = pe(), t = T, i = [], n = [];
|
|
5171
|
-
let
|
|
5232
|
+
let o = 0;
|
|
5172
5233
|
return {
|
|
5173
|
-
processChunk(
|
|
5234
|
+
processChunk(r) {
|
|
5174
5235
|
const s = performance.now();
|
|
5175
|
-
for (;
|
|
5176
|
-
const l = a[
|
|
5236
|
+
for (; o < a.length; ) {
|
|
5237
|
+
const l = a[o];
|
|
5177
5238
|
try {
|
|
5178
5239
|
i.push(...l.run(e));
|
|
5179
5240
|
} catch (d) {
|
|
5180
5241
|
n.push({ ruleId: l.id, error: d instanceof Error ? d.message : String(d) });
|
|
5181
5242
|
}
|
|
5182
|
-
if (
|
|
5243
|
+
if (o++, performance.now() - s >= r) break;
|
|
5183
5244
|
}
|
|
5184
|
-
return
|
|
5245
|
+
return o < a.length;
|
|
5185
5246
|
},
|
|
5186
5247
|
getViolations() {
|
|
5187
5248
|
return t ? ze(i, t) : i;
|
|
@@ -5192,17 +5253,17 @@ function Bn(e) {
|
|
|
5192
5253
|
};
|
|
5193
5254
|
}
|
|
5194
5255
|
function it() {
|
|
5195
|
-
mt(),
|
|
5256
|
+
mt(), rt(), st(), kt(), At(), pt();
|
|
5196
5257
|
}
|
|
5197
|
-
function
|
|
5258
|
+
function Gn(e) {
|
|
5198
5259
|
var n;
|
|
5199
5260
|
it();
|
|
5200
5261
|
const a = pe(), t = [], i = [];
|
|
5201
|
-
for (const
|
|
5262
|
+
for (const o of a)
|
|
5202
5263
|
try {
|
|
5203
|
-
t.push(...
|
|
5204
|
-
} catch (
|
|
5205
|
-
i.push({ ruleId:
|
|
5264
|
+
t.push(...o.run(e));
|
|
5265
|
+
} catch (r) {
|
|
5266
|
+
i.push({ ruleId: o.id, error: r instanceof Error ? r.message : String(r) });
|
|
5206
5267
|
}
|
|
5207
5268
|
return {
|
|
5208
5269
|
url: ((n = e.location) == null ? void 0 : n.href) ?? "",
|
|
@@ -5212,29 +5273,29 @@ function _n(e) {
|
|
|
5212
5273
|
skippedRules: i
|
|
5213
5274
|
};
|
|
5214
5275
|
}
|
|
5215
|
-
function
|
|
5276
|
+
function Yn(e, a) {
|
|
5216
5277
|
const t = (l) => `${l.ruleId}\0${l.selector}`, i = /* @__PURE__ */ new Map();
|
|
5217
5278
|
for (const l of e.violations)
|
|
5218
5279
|
i.set(t(l), l);
|
|
5219
5280
|
const n = /* @__PURE__ */ new Map();
|
|
5220
5281
|
for (const l of a.violations)
|
|
5221
5282
|
n.set(t(l), l);
|
|
5222
|
-
const
|
|
5283
|
+
const o = [], r = [];
|
|
5223
5284
|
for (const [l, d] of n)
|
|
5224
|
-
i.has(l) ?
|
|
5285
|
+
i.has(l) ? r.push(d) : o.push(d);
|
|
5225
5286
|
const s = [];
|
|
5226
5287
|
for (const [l, d] of i)
|
|
5227
5288
|
n.has(l) || s.push(d);
|
|
5228
|
-
return { added:
|
|
5289
|
+
return { added: o, fixed: s, unchanged: r };
|
|
5229
5290
|
}
|
|
5230
|
-
const
|
|
5231
|
-
function
|
|
5291
|
+
const Wn = new Map(Ze.map((e) => [e.id, e]));
|
|
5292
|
+
function Xn(e) {
|
|
5232
5293
|
if (T)
|
|
5233
5294
|
return pe().find((i) => i.id === e);
|
|
5234
|
-
const a =
|
|
5295
|
+
const a = Wn.get(e);
|
|
5235
5296
|
return a || me.find((t) => t.id === e);
|
|
5236
5297
|
}
|
|
5237
|
-
const
|
|
5298
|
+
const Jn = {
|
|
5238
5299
|
"navigable/document-title": { description: "Documents must have a <title> element to provide users with an overview of content.", guidance: "Screen reader users rely on page titles to identify and navigate between tabs/windows. Add a descriptive <title> element in <head> that summarizes the page purpose. Keep titles unique across the site, placing specific content before the site name (e.g., 'Contact Us - Acme Corp').", messages: { "Document <title> element is empty.": "Document <title> element is empty.", "Document is missing a <title> element.": "Document is missing a <title> element." } },
|
|
5239
5300
|
"navigable/bypass": { description: "Page must have a mechanism to bypass repeated blocks of content.", guidance: 'Keyboard users must be able to skip repetitive content like navigation. Provide a skip link at the top of the page that links to the main content (e.g., <a href="#main">Skip to main content</a>), or use a <main> landmark. Screen readers can jump directly to landmarks, so a properly marked-up <main> element satisfies this requirement.', messages: { "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link.": "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link." } },
|
|
5240
5301
|
"navigable/page-has-heading-one": { description: "Page should contain a level-one heading.", guidance: "A level-one heading (<h1> or role='heading' with aria-level='1') helps users understand the page topic and provides a landmark for screen reader navigation. Each page should have at least one level-one heading that describes the main content, typically matching or similar to the page title.", messages: { "Page does not contain a level-one heading.": "Page does not contain a level-one heading." } },
|
|
@@ -5244,7 +5305,7 @@ const Xn = {
|
|
|
5244
5305
|
"enough-time/meta-refresh": { description: "Meta refresh must not redirect or refresh automatically.", guidance: "Automatic page refreshes or redirects can disorient users, especially those using screen readers or with cognitive disabilities. They may lose their place or not have time to read content. If a redirect is needed, use a server-side redirect (HTTP 301/302) instead. For timed refreshes, provide user controls.", messages: { "Page redirects after {0} seconds without warning. Use server-side redirect.": "Page redirects after {0} seconds without warning. Use server-side redirect.", "Page auto-refreshes after {0} seconds. Provide user control over refresh.": "Page auto-refreshes after {0} seconds. Provide user control over refresh." } },
|
|
5245
5306
|
"enough-time/blink": { description: "The <blink> element must not be used.", 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.", messages: { "The <blink> element causes accessibility issues. Remove it entirely.": "The <blink> element causes accessibility issues. Remove it entirely." } },
|
|
5246
5307
|
"enough-time/marquee": { description: "The <marquee> element must not be used.", 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.", messages: { "The <marquee> element causes accessibility issues. Replace with static content.": "The <marquee> element causes accessibility issues. Replace with static content." } },
|
|
5247
|
-
"text-alternatives/img-alt": { description: `Images must have alternate text. Add an alt attribute to <img> elements. Decorative images may use an empty alt attribute (alt=""), role='none', or role='presentation'.`, guidance: "Every image needs an alt attribute. For informative images, describe the content or function concisely. For decorative images (backgrounds, spacers, purely visual flourishes), use alt='' to hide them from screen readers. Never omit alt entirely—screen readers may read the filename instead.", messages: { 'Image has whitespace-only alt text. Use alt="" for decorative images or provide descriptive text.': 'Image has whitespace-only alt text. Use alt="" for decorative images or provide descriptive text.', "Image element missing alt attribute.": "Image element missing alt attribute.", 'Element with role="img" has no accessible name. Add aria-label or aria-labelledby.': 'Element with role="img" has no accessible name. Add aria-label or aria-labelledby.' } },
|
|
5308
|
+
"text-alternatives/img-alt": { description: `Images must have alternate text. Add an alt attribute to <img> elements. Decorative images may use an empty alt attribute (alt=""), role='none', or role='presentation'.`, guidance: "Every image needs an alt attribute. For informative images, describe the content or function concisely. For decorative images (backgrounds, spacers, purely visual flourishes), use alt='' to hide them from screen readers. Never omit alt entirely—screen readers may read the filename instead. When an image is inside a link or button that already has text, use alt='' if the image is decorative in that context, or write alt text that complements (not duplicates) the existing text.", messages: { 'Image has whitespace-only alt text. Use alt="" for decorative images or provide descriptive text.': 'Image has whitespace-only alt text. Use alt="" for decorative images or provide descriptive text.', "Image element missing alt attribute.": "Image element missing alt attribute.", 'Element with role="img" has no accessible name. Add aria-label or aria-labelledby.': 'Element with role="img" has no accessible name. Add aria-label or aria-labelledby.' } },
|
|
5248
5309
|
"text-alternatives/svg-img-alt": { description: "SVG elements with an img, graphics-document, or graphics-symbol role must have an accessible name via a <title> element, aria-label, or aria-labelledby.", guidance: "Inline SVGs with role='img' need accessible names. Add a <title> element as the first child of the SVG (screen readers will announce it), or use aria-label on the SVG element. For complex SVGs, use aria-labelledby referencing both a <title> and <desc> element. Decorative SVGs should use aria-hidden='true' instead.", messages: { "{0} with role='{1}' has no accessible name.": "{0} with role='{1}' has no accessible name." } },
|
|
5249
5310
|
"text-alternatives/input-image-alt": { description: 'Image inputs (<input type="image">) must have alternate text describing the button action.', guidance: "Image buttons (<input type='image'>) act as submit buttons with a custom image. Add alt text via alt, aria-label, or aria-labelledby that describes the action (e.g. alt='Search' or alt='Submit order'), not the image itself. Without it, screen readers announce only 'image' or the filename, giving no clue what the button does.", messages: { "Image input missing alt text.": "Image input missing alt text." } },
|
|
5250
5311
|
"text-alternatives/image-redundant-alt": { description: "Image alt text should not duplicate adjacent link or button text. When alt text repeats surrounding text, screen reader users hear the same information twice.", guidance: "When an image is inside a link or button that also has text, make the alt text complementary rather than identical. If the image is purely decorative in that context, use alt='' to avoid repetition.", messages: { 'Alt text "{0}" duplicates surrounding {1} text.': 'Alt text "{0}" duplicates surrounding {1} text.' } },
|
|
@@ -5326,8 +5387,9 @@ const Xn = {
|
|
|
5326
5387
|
"distinguishable/word-spacing": { description: "Word spacing set with !important in style attributes must be at least 0.16em.", guidance: "WCAG 1.4.12 requires users to be able to override text spacing. Using !important on word-spacing with a value below 0.16em prevents this. Either increase the value to at least 0.16em or remove !important.", messages: { "Word spacing {0}em with !important is below the 0.16em minimum.": "Word spacing {0}em with !important is below the 0.16em minimum." } },
|
|
5327
5388
|
"adaptable/orientation-lock": { description: "Page orientation must not be restricted using CSS transforms.", guidance: "Users with motor disabilities may mount their device in a fixed orientation. Using CSS transforms with @media (orientation: portrait/landscape) to rotate content 90° effectively locks the page to one orientation. Remove the orientation-dependent transform and use responsive design instead.", messages: { "CSS locks page orientation via @media (orientation: {0}) with a 90° transform.": "CSS locks page orientation via @media (orientation: {0}) with a 90° transform." } },
|
|
5328
5389
|
"aria/presentational-children-focusable": { description: "Elements with a role that makes children presentational must not contain focusable content.", guidance: "Roles like button, checkbox, img, tab, and others make their children presentational — hidden from assistive technologies. If those children are focusable, keyboard users can reach elements that screen reader users cannot perceive. Move focusable content outside the parent or remove the focusability.", messages: { 'Focusable element inside a "{0}" role whose children are presentational.': 'Focusable element inside a "{0}" role whose children are presentational.' } },
|
|
5329
|
-
"keyboard-accessible/focus-visible": { description: "Elements in sequential focus order must have a visible focus indicator.", guidance: "Keyboard users need to see which element has focus. Do not remove the default focus outline (outline: none) without providing an alternative visible indicator. Use :focus-visible or :focus styles to ensure focus is always perceivable.", messages: { "Focusable element has outline removed without a visible focus alternative.": "Focusable element has outline removed without a visible focus alternative." } }
|
|
5330
|
-
|
|
5390
|
+
"keyboard-accessible/focus-visible": { description: "Elements in sequential focus order must have a visible focus indicator.", guidance: "Keyboard users need to see which element has focus. Do not remove the default focus outline (outline: none) without providing an alternative visible indicator. Use :focus-visible or :focus styles to ensure focus is always perceivable.", messages: { "Focusable element has outline removed without a visible focus alternative.": "Focusable element has outline removed without a visible focus alternative." } },
|
|
5391
|
+
"input-assistance/accessible-authentication": { description: 'Password inputs must not block password managers. Avoid autocomplete="off" and allow pasting.', guidance: 'WCAG 2.2 SC 3.3.8 requires that authentication steps either avoid cognitive function tests or provide a mechanism to assist users. Password managers are a key assistive mechanism. Setting autocomplete="off" on password fields prevents password managers from filling credentials. Blocking paste via onpaste attributes prevents users from pasting stored passwords. Set autocomplete to "current-password" for login forms or "new-password" for registration/change-password forms, and do not block paste on password fields.', messages: { 'Password field has autocomplete="off" which blocks password managers.': 'Password field has autocomplete="off" which blocks password managers.', "Password field blocks pasting, preventing password manager use.": "Password field blocks pasting, preventing password manager use." } }
|
|
5392
|
+
}, Kn = {
|
|
5331
5393
|
"navigable/document-title": { description: "Los documentos deben tener un elemento <title> para proporcionar a los usuarios una vista general del contenido.", guidance: "Los usuarios de lectores de pantalla dependen de los títulos de página para identificar y navegar entre pestañas/ventanas. Agregue un elemento <title> descriptivo en <head> que resuma el propósito de la página. Mantenga los títulos únicos en todo el sitio, colocando el contenido específico antes del nombre del sitio (por ejemplo, 'Contáctenos - Acme Corp').", messages: { "Document <title> element is empty.": "El elemento <title> del documento está vacío.", "Document is missing a <title> element.": "Al documento le falta un elemento <title>." } },
|
|
5332
5394
|
"navigable/bypass": { description: "La página debe tener un mecanismo para omitir bloques de contenido repetidos.", guidance: 'Los usuarios de teclado deben poder omitir contenido repetitivo como la navegación. Proporcione un enlace de salto en la parte superior de la página que enlace al contenido principal (por ejemplo, <a href="#main">Saltar al contenido principal</a>), o use un landmark <main>. Los lectores de pantalla pueden saltar directamente a los landmarks, por lo que un elemento <main> correctamente marcado satisface este requisito.', messages: { "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link.": "La página no tiene un mecanismo para omitir contenido repetido. Agregue un landmark <main> o un enlace de salto." } },
|
|
5333
5395
|
"navigable/page-has-heading-one": { description: "La página debe contener un encabezado de nivel uno.", guidance: "Un encabezado de nivel uno (<h1> o role='heading' con aria-level='1') ayuda a los usuarios a comprender el tema de la página y proporciona un punto de referencia para la navegación con lector de pantalla. Cada página debe tener exactamente un h1 que describa el contenido principal, típicamente coincidiendo o similar al título de la página.", messages: { "Page does not contain a level-one heading.": "La página no contiene un encabezado de nivel uno." } },
|
|
@@ -5419,34 +5481,35 @@ const Xn = {
|
|
|
5419
5481
|
"distinguishable/word-spacing": { description: "El espaciado de palabras establecido con !important en atributos de estilo debe ser al menos 0.16em.", guidance: "WCAG 1.4.12 requiere que los usuarios puedan anular el espaciado de texto. Usar !important en word-spacing con un valor inferior a 0.16em lo impide. Aumente el valor a al menos 0.16em o elimine !important.", messages: { "Word spacing {0}em with !important is below the 0.16em minimum.": "El espaciado de palabras {0}em con !important está por debajo del mínimo de 0.16em." } },
|
|
5420
5482
|
"adaptable/orientation-lock": { description: "La orientación de la página no debe restringirse usando transformaciones CSS.", guidance: "Los usuarios con discapacidades motoras pueden montar su dispositivo en una orientación fija. Usar transformaciones CSS con @media (orientation: portrait/landscape) para rotar el contenido 90° bloquea efectivamente la página a una orientación. Elimine la transformación dependiente de la orientación y use diseño responsivo en su lugar.", messages: { "CSS locks page orientation via @media (orientation: {0}) with a 90° transform.": "CSS bloquea la orientación de la página mediante @media (orientation: {0}) con una transformación de 90°." } },
|
|
5421
5483
|
"aria/presentational-children-focusable": { description: "Los elementos con un rol que hace a los hijos presentacionales no deben contener contenido enfocable.", guidance: "Roles como button, checkbox, img, tab y otros hacen que sus hijos sean presentacionales — ocultos de las tecnologías de asistencia. Si esos hijos son enfocables, los usuarios de teclado pueden alcanzar elementos que los usuarios de lectores de pantalla no pueden percibir. Mueva el contenido enfocable fuera del padre o elimine la enfocabilidad.", messages: { 'Focusable element inside a "{0}" role whose children are presentational.': 'Elemento enfocable dentro de un rol "{0}" cuyos hijos son presentacionales.' } },
|
|
5422
|
-
"keyboard-accessible/focus-visible": { description: "Los elementos en orden de foco secuencial deben tener un indicador de foco visible.", guidance: "Los usuarios de teclado necesitan ver qué elemento tiene el foco. No elimine el contorno de foco predeterminado (outline: none) sin proporcionar un indicador visible alternativo. Use estilos :focus-visible o :focus para asegurar que el foco siempre sea perceptible.", messages: { "Focusable element has outline removed without a visible focus alternative.": "El elemento enfocable tiene el contorno eliminado sin una alternativa de foco visible." } }
|
|
5484
|
+
"keyboard-accessible/focus-visible": { description: "Los elementos en orden de foco secuencial deben tener un indicador de foco visible.", guidance: "Los usuarios de teclado necesitan ver qué elemento tiene el foco. No elimine el contorno de foco predeterminado (outline: none) sin proporcionar un indicador visible alternativo. Use estilos :focus-visible o :focus para asegurar que el foco siempre sea perceptible.", messages: { "Focusable element has outline removed without a visible focus alternative.": "El elemento enfocable tiene el contorno eliminado sin una alternativa de foco visible." } },
|
|
5485
|
+
"input-assistance/accessible-authentication": { description: 'Los campos de contraseña no deben bloquear los administradores de contraseñas. Evite autocomplete="off" y permita pegar.', guidance: 'WCAG 2.2 SC 3.3.8 requiere que los pasos de autenticación eviten pruebas de función cognitiva o proporcionen un mecanismo para asistir a los usuarios. Los administradores de contraseñas son un mecanismo de asistencia clave. Establecer autocomplete="off" en campos de contraseña impide que los administradores de contraseñas completen las credenciales. Bloquear el pegado mediante atributos onpaste impide que los usuarios peguen contraseñas almacenadas. Establezca autocomplete en "current-password" para formularios de inicio de sesión o "new-password" para formularios de registro/cambio de contraseña, y no bloquee el pegado en campos de contraseña.', messages: { 'Password field has autocomplete="off" which blocks password managers.': 'El campo de contraseña tiene autocomplete="off" lo cual bloquea los administradores de contraseñas.', "Password field blocks pasting, preventing password manager use.": "El campo de contraseña bloquea el pegado, impidiendo el uso de administradores de contraseñas." } }
|
|
5423
5486
|
};
|
|
5424
5487
|
export {
|
|
5425
5488
|
it as clearAllCaches,
|
|
5426
5489
|
At as clearAriaAttrAuditCache,
|
|
5427
5490
|
mt as clearAriaHiddenCache,
|
|
5428
5491
|
kt as clearColorCaches,
|
|
5429
|
-
|
|
5492
|
+
rt as clearComputedRoleCache,
|
|
5430
5493
|
N as compileDeclarativeRule,
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5494
|
+
Bn as configureRules,
|
|
5495
|
+
_n as createChunkedAudit,
|
|
5496
|
+
Yn as diffAudit,
|
|
5497
|
+
x as getAccessibleName,
|
|
5435
5498
|
k as getAccessibleTextContent,
|
|
5436
5499
|
pe as getActiveRules,
|
|
5437
|
-
|
|
5500
|
+
W as getComputedRole,
|
|
5438
5501
|
m as getHtmlSnippet,
|
|
5439
5502
|
$e as getImplicitRole,
|
|
5440
|
-
|
|
5503
|
+
Xn as getRuleById,
|
|
5441
5504
|
p as getSelector,
|
|
5442
5505
|
h as isAriaHidden,
|
|
5443
5506
|
dt as isValidRole,
|
|
5444
|
-
|
|
5445
|
-
|
|
5507
|
+
Jn as localeEn,
|
|
5508
|
+
Kn as localeEs,
|
|
5446
5509
|
Un as querySelectorShadowAware,
|
|
5447
|
-
|
|
5510
|
+
On as registerLocale,
|
|
5448
5511
|
Ze as rules,
|
|
5449
|
-
|
|
5512
|
+
Gn as runAudit,
|
|
5450
5513
|
ze as translateViolations,
|
|
5451
|
-
|
|
5514
|
+
Vn as validateDeclarativeRule
|
|
5452
5515
|
};
|