@accesslint/core 0.2.2 → 0.2.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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  let M = /* @__PURE__ */ new WeakMap();
2
- function Q() {
2
+ function oe() {
3
3
  M = /* @__PURE__ */ new WeakMap();
4
4
  }
5
5
  function J(t) {
@@ -125,22 +125,22 @@ function E(t) {
125
125
  return M.set(t, i), i;
126
126
  }
127
127
  let $ = /* @__PURE__ */ new WeakMap();
128
- function Z() {
128
+ function se() {
129
129
  $ = /* @__PURE__ */ new WeakMap();
130
130
  }
131
131
  function b(t) {
132
132
  const a = $.get(t);
133
133
  if (a !== void 0) return a;
134
- const e = de(t);
134
+ const e = le(t);
135
135
  return $.set(t, e), e;
136
136
  }
137
- function de(t) {
137
+ function le(t) {
138
138
  var r, o, s, u, h;
139
139
  const a = t.getAttribute("aria-labelledby");
140
140
  if (a) {
141
141
  const d = a.split(/\s+/).map((p) => {
142
142
  const g = t.ownerDocument.getElementById(p);
143
- return g ? w(g).trim() : "";
143
+ return g ? y(g).trim() : "";
144
144
  }).filter(Boolean);
145
145
  if (d.length) return d.join(" ");
146
146
  }
@@ -148,10 +148,10 @@ function de(t) {
148
148
  if (e) return e;
149
149
  if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) {
150
150
  if (t.id) {
151
- const g = t.ownerDocument.querySelector(`label[for="${CSS.escape(t.id)}"]`), f = g ? w(g).trim() : "";
151
+ const g = t.ownerDocument.querySelector(`label[for="${CSS.escape(t.id)}"]`), f = g ? y(g).trim() : "";
152
152
  if (f) return f;
153
153
  }
154
- const d = t.closest("label"), p = d ? w(d).trim() : "";
154
+ const d = t.closest("label"), p = d ? y(d).trim() : "";
155
155
  if (p) return p;
156
156
  }
157
157
  const i = (o = t.getAttribute("title")) == null ? void 0 : o.trim();
@@ -164,24 +164,24 @@ function de(t) {
164
164
  if (n === "fieldset") {
165
165
  const d = t.querySelector(":scope > legend");
166
166
  if (d) {
167
- const p = w(d).trim();
167
+ const p = y(d).trim();
168
168
  if (p) return p;
169
169
  }
170
170
  }
171
171
  if (n === "table") {
172
172
  const d = t.querySelector(":scope > caption");
173
173
  if (d) {
174
- const p = w(d).trim();
174
+ const p = y(d).trim();
175
175
  if (p) return p;
176
176
  }
177
177
  }
178
178
  if (!(t instanceof HTMLInputElement)) {
179
- const d = w(t).trim();
179
+ const d = y(t).trim();
180
180
  if (d) return d;
181
181
  }
182
182
  return t instanceof HTMLImageElement || t instanceof HTMLAreaElement ? ((u = t.alt) == null ? void 0 : u.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((h = t.alt) == null ? void 0 : h.trim()) ?? "" : "";
183
183
  }
184
- const ue = /* @__PURE__ */ new Set([
184
+ const ce = /* @__PURE__ */ new Set([
185
185
  "alert",
186
186
  "alertdialog",
187
187
  "application",
@@ -265,12 +265,12 @@ const ue = /* @__PURE__ */ new Set([
265
265
  "treegrid",
266
266
  "treeitem"
267
267
  ]);
268
- function me(t) {
268
+ function de(t) {
269
269
  const a = t.trim().toLowerCase().replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "");
270
- return ue.has(a);
270
+ return ce.has(a);
271
271
  }
272
272
  let H = /* @__PURE__ */ new WeakMap();
273
- function ee() {
273
+ function ue() {
274
274
  H = /* @__PURE__ */ new WeakMap();
275
275
  }
276
276
  function m(t) {
@@ -279,10 +279,10 @@ function m(t) {
279
279
  let e;
280
280
  return t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none") ? e = !0 : t.parentElement ? e = m(t.parentElement) : e = !1, H.set(t, e), e;
281
281
  }
282
- function pe(t) {
282
+ function me(t) {
283
283
  return !!(t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none"));
284
284
  }
285
- function w(t) {
285
+ function y(t) {
286
286
  var e, i, n, r;
287
287
  let a = "";
288
288
  for (const o of t.childNodes)
@@ -290,7 +290,7 @@ function w(t) {
290
290
  a += o.textContent ?? "";
291
291
  else if (o.nodeType === 1) {
292
292
  const s = o;
293
- if (!pe(s)) {
293
+ if (!me(s)) {
294
294
  const u = (e = s.tagName) == null ? void 0 : e.toLowerCase();
295
295
  if (u === "img" || u === "area")
296
296
  a += ((i = s.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? s.getAttribute("alt") ?? "";
@@ -302,13 +302,13 @@ function w(t) {
302
302
  const d = s.querySelector("title");
303
303
  d && (a += d.textContent ?? "");
304
304
  }
305
- } else (r = s.getAttribute("aria-label")) != null && r.trim() ? a += s.getAttribute("aria-label").trim() : a += w(s);
305
+ } else (r = s.getAttribute("aria-label")) != null && r.trim() ? a += s.getAttribute("aria-label").trim() : a += y(s);
306
306
  }
307
307
  }
308
308
  return a;
309
309
  }
310
310
  let D = /* @__PURE__ */ new WeakMap();
311
- function te() {
311
+ function pe() {
312
312
  D = /* @__PURE__ */ new WeakMap();
313
313
  }
314
314
  function he(t) {
@@ -385,7 +385,7 @@ function c(t) {
385
385
  const n = e.map((o, s) => (s === 0 ? "" : o.delimiter) + o.selector).join("");
386
386
  return D.set(t, n), n;
387
387
  }
388
- function Wa(t) {
388
+ function ja(t) {
389
389
  const a = [], e = [];
390
390
  let i = t;
391
391
  for (; i; ) {
@@ -487,7 +487,7 @@ const fe = /* @__PURE__ */ new Set([
487
487
  "aria-multiselectable",
488
488
  "aria-readonly",
489
489
  "aria-required"
490
- ]), ye = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), we = /* @__PURE__ */ new Set([
490
+ ]), we = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), ye = /* @__PURE__ */ new Set([
491
491
  "aria-colcount",
492
492
  "aria-colindex",
493
493
  "aria-colspan",
@@ -501,7 +501,7 @@ const fe = /* @__PURE__ */ new Set([
501
501
  "aria-valuemax",
502
502
  "aria-valuemin",
503
503
  "aria-valuenow"
504
- ]), P = {
504
+ ]), V = {
505
505
  "aria-autocomplete": /* @__PURE__ */ new Set(["inline", "list", "both", "none"]),
506
506
  "aria-current": /* @__PURE__ */ new Set(["page", "step", "location", "date", "time", "true", "false"]),
507
507
  "aria-dropeffect": /* @__PURE__ */ new Set(["copy", "execute", "link", "move", "none", "popup"]),
@@ -511,7 +511,7 @@ const fe = /* @__PURE__ */ new Set([
511
511
  "aria-orientation": /* @__PURE__ */ new Set(["horizontal", "vertical", "undefined"]),
512
512
  "aria-relevant": /* @__PURE__ */ new Set(["additions", "all", "removals", "text"]),
513
513
  "aria-sort": /* @__PURE__ */ new Set(["ascending", "descending", "none", "other"])
514
- }, V = /* @__PURE__ */ new Set([
514
+ }, U = /* @__PURE__ */ new Set([
515
515
  "caption",
516
516
  "code",
517
517
  "deletion",
@@ -589,13 +589,13 @@ const fe = /* @__PURE__ */ new Set([
589
589
  time: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
590
590
  tooltip: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"])
591
591
  };
592
- let I = null, q = null;
593
- function ae() {
594
- I = null, q = null;
592
+ let q = null, C = null;
593
+ function ke() {
594
+ q = null, C = null;
595
595
  }
596
596
  function _(t) {
597
597
  var n;
598
- if (q && (I == null ? void 0 : I.deref()) === t) return q;
598
+ if (C && (q == null ? void 0 : q.deref()) === t) return C;
599
599
  const a = [], e = [], i = [];
600
600
  for (const r of t.querySelectorAll("*")) {
601
601
  let o = !1;
@@ -633,7 +633,7 @@ function _(t) {
633
633
  message: `${d.name} must be "true" or "false", got "${p}".`
634
634
  });
635
635
  }
636
- } else if (ye.has(d.name)) {
636
+ } else if (we.has(d.name)) {
637
637
  if (p !== "true" && p !== "false" && p !== "mixed") {
638
638
  const g = h();
639
639
  e.push({
@@ -644,7 +644,7 @@ function _(t) {
644
644
  message: `${d.name} must be "true", "false", or "mixed", got "${p}".`
645
645
  });
646
646
  }
647
- } else if (we.has(d.name)) {
647
+ } else if (ye.has(d.name)) {
648
648
  if (p === "" || !/^-?\d+$/.test(p)) {
649
649
  const g = h();
650
650
  e.push({
@@ -666,10 +666,10 @@ function _(t) {
666
666
  message: `${d.name} must be a number, got "${p}".`
667
667
  });
668
668
  }
669
- } else if (P[d.name]) {
669
+ } else if (V[d.name]) {
670
670
  const g = p.split(/\s+/);
671
671
  for (const f of g)
672
- if (!P[d.name].has(f)) {
672
+ if (!V[d.name].has(f)) {
673
673
  const v = h();
674
674
  e.push({
675
675
  ruleId: "aria-valid-attr-value",
@@ -697,14 +697,14 @@ function _(t) {
697
697
  });
698
698
  }
699
699
  } else if (d) {
700
- if (V.has(d)) {
700
+ if (U.has(d)) {
701
701
  const f = r.hasAttribute("aria-label"), v = r.hasAttribute("aria-labelledby");
702
702
  if (f || v) {
703
- const y = h();
703
+ const w = h();
704
704
  i.push({
705
705
  ruleId: "aria-prohibited-attr",
706
- selector: y.selector,
707
- html: y.html,
706
+ selector: w.selector,
707
+ html: w.html,
708
708
  impact: "serious",
709
709
  message: `aria-label and aria-labelledby are prohibited on role "${d}".`
710
710
  });
@@ -714,7 +714,7 @@ function _(t) {
714
714
  if (g) {
715
715
  for (const f of r.attributes)
716
716
  if (f.name.startsWith("aria-") && g.has(f.name)) {
717
- if ((f.name === "aria-label" || f.name === "aria-labelledby") && V.has(d))
717
+ if ((f.name === "aria-label" || f.name === "aria-labelledby") && U.has(d))
718
718
  continue;
719
719
  const v = h();
720
720
  i.push({
@@ -729,61 +729,87 @@ function _(t) {
729
729
  }
730
730
  }
731
731
  }
732
- return I = new WeakRef(t), q = { validAttr: a, validAttrValue: e, prohibitedAttr: i }, q;
732
+ return q = new WeakRef(t), C = { validAttr: a, validAttrValue: e, prohibitedAttr: i }, C;
733
733
  }
734
- let B = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap();
735
- function ie() {
736
- B = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap();
734
+ let O = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap();
735
+ function Ie() {
736
+ O = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap();
737
737
  }
738
- function C(t) {
739
- let a = B.get(t);
740
- return a || (a = getComputedStyle(t), B.set(t, a), a);
738
+ function x(t) {
739
+ let a = O.get(t);
740
+ return a || (a = getComputedStyle(t), O.set(t, a), a);
741
741
  }
742
- function U(t, a, e) {
742
+ function j(t, a, e) {
743
743
  const [i, n, r] = [t, a, e].map((o) => {
744
744
  const s = o / 255;
745
745
  return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
746
746
  });
747
747
  return 0.2126 * i + 0.7152 * n + 0.0722 * r;
748
748
  }
749
- function ke(t, a) {
749
+ function qe(t, a) {
750
750
  const e = Math.max(t, a), i = Math.min(t, a);
751
751
  return (e + 0.05) / (i + 0.05);
752
752
  }
753
- function ne(t) {
753
+ function Z(t) {
754
754
  const a = t.match(
755
755
  /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*[\d.]+)?\s*\)/
756
756
  );
757
757
  return a ? [parseInt(a[1]), parseInt(a[2]), parseInt(a[3])] : null;
758
758
  }
759
- function Ie(t) {
760
- const a = O.get(t);
759
+ function Ce(t) {
760
+ const a = W.get(t);
761
761
  if (a !== void 0) return a;
762
- const e = qe(t);
763
- return O.set(t, e), e;
762
+ const e = Te(t);
763
+ return W.set(t, e), e;
764
764
  }
765
- function qe(t) {
765
+ function Te(t) {
766
766
  let a = t;
767
767
  for (; a; ) {
768
- const e = C(a), i = e.backgroundColor;
769
- if (i === "transparent" || i === "rgba(0, 0, 0, 0)") {
768
+ const e = x(a), i = e.backgroundImage;
769
+ if (i && i !== "none" && i !== "initial") return null;
770
+ const n = e.backgroundColor;
771
+ if (n === "transparent" || n === "rgba(0, 0, 0, 0)") {
770
772
  a = a.parentElement;
771
773
  continue;
772
774
  }
773
- const n = i.match(/rgba\(.+?,\s*([\d.]+)\s*\)/);
774
- if (n && parseFloat(n[1]) < 0.1) {
775
+ const r = n.match(/rgba\(.+?,\s*([\d.]+)\s*\)/);
776
+ if (r && parseFloat(r[1]) < 0.1) {
775
777
  a = a.parentElement;
776
778
  continue;
777
779
  }
778
- return e.backgroundImage && e.backgroundImage !== "none" ? null : ne(i);
780
+ return Z(n);
779
781
  }
780
782
  return [255, 255, 255];
781
783
  }
782
- function Ce(t) {
783
- const a = C(t), e = parseFloat(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
784
+ const Ee = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
785
+ function Le(t) {
786
+ const a = B.get(t);
787
+ if (a !== void 0) return a;
788
+ const e = Re(t);
789
+ return B.set(t, e), e;
790
+ }
791
+ function Re(t) {
792
+ let a = t, e = !1;
793
+ for (; a; ) {
794
+ const i = x(a).position;
795
+ if ((i === "absolute" || i === "fixed") && (e = !0), a !== t && i !== "static") {
796
+ for (const n of a.children)
797
+ if (!(n === t || n.contains(t)) && Ee.has(n.tagName)) {
798
+ if (e) return !0;
799
+ const r = x(n).position;
800
+ if (r === "absolute" || r === "fixed") return !0;
801
+ }
802
+ if (e) break;
803
+ }
804
+ a = a.parentElement;
805
+ }
806
+ return !1;
807
+ }
808
+ function Ne(t) {
809
+ const a = x(t), e = parseFloat(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
784
810
  return e >= 24 || e >= 18.66 && i >= 700;
785
811
  }
786
- function Te(t) {
812
+ function Me(t) {
787
813
  var r, o;
788
814
  const a = [], e = t.closest("a");
789
815
  if (e) {
@@ -803,7 +829,7 @@ function Te(t) {
803
829
  return a.length > 0 ? a.join(`
804
830
  `) : void 0;
805
831
  }
806
- const Ee = {
832
+ const $e = {
807
833
  id: "img-alt",
808
834
  wcag: ["1.1.1"],
809
835
  level: "A",
@@ -819,11 +845,11 @@ const Ee = {
819
845
  html: l(e),
820
846
  impact: "critical",
821
847
  message: "Image element missing alt attribute.",
822
- context: Te(e)
848
+ context: Me(e)
823
849
  });
824
850
  return a;
825
851
  }
826
- }, Le = {
852
+ }, He = {
827
853
  id: "svg-img-alt",
828
854
  wcag: ["1.1.1"],
829
855
  level: "A",
@@ -844,7 +870,7 @@ const Ee = {
844
870
  }
845
871
  return a;
846
872
  }
847
- }, Re = {
873
+ }, De = {
848
874
  id: "input-image-alt",
849
875
  wcag: ["1.1.1", "4.1.2"],
850
876
  level: "A",
@@ -863,7 +889,7 @@ const Ee = {
863
889
  });
864
890
  return a;
865
891
  }
866
- }, Ne = {
892
+ }, Oe = {
867
893
  id: "image-redundant-alt",
868
894
  wcag: [],
869
895
  level: "A",
@@ -891,7 +917,7 @@ const Ee = {
891
917
  }
892
918
  return a;
893
919
  }
894
- }, Me = ["image", "picture", "photo", "graphic", "icon", "img"], $e = {
920
+ }, We = ["image", "picture", "photo", "graphic", "icon", "img"], Be = {
895
921
  id: "image-alt-redundant-words",
896
922
  wcag: [],
897
923
  level: "A",
@@ -903,7 +929,7 @@ const Ee = {
903
929
  const a = [];
904
930
  for (const e of t.querySelectorAll("img[alt]")) {
905
931
  const i = e.getAttribute("alt").toLowerCase();
906
- i && Me.some((n) => i.split(/\s+/).includes(n)) && a.push({
932
+ i && We.some((n) => i.split(/\s+/).includes(n)) && a.push({
907
933
  ruleId: "image-alt-redundant-words",
908
934
  selector: c(e),
909
935
  html: l(e),
@@ -913,7 +939,7 @@ const Ee = {
913
939
  }
914
940
  return a;
915
941
  }
916
- }, He = {
942
+ }, Fe = {
917
943
  id: "area-alt",
918
944
  wcag: ["1.1.1", "4.1.2"],
919
945
  level: "A",
@@ -934,7 +960,7 @@ const Ee = {
934
960
  }
935
961
  return a;
936
962
  }
937
- }, De = {
963
+ }, _e = {
938
964
  id: "object-alt",
939
965
  wcag: ["1.1.1"],
940
966
  level: "A",
@@ -953,7 +979,7 @@ const Ee = {
953
979
  });
954
980
  return a;
955
981
  }
956
- }, Be = {
982
+ }, Pe = {
957
983
  id: "role-img-alt",
958
984
  wcag: ["1.1.1"],
959
985
  level: "A",
@@ -975,7 +1001,7 @@ const Ee = {
975
1001
  return a;
976
1002
  }
977
1003
  };
978
- function _a(t) {
1004
+ function za(t) {
979
1005
  if (typeof t != "object" || t === null)
980
1006
  return "Rule spec must be an object";
981
1007
  const a = t;
@@ -1005,10 +1031,10 @@ function _a(t) {
1005
1031
  return "Rule must have a wcag array";
1006
1032
  if (typeof a.level != "string" || !["A", "AA"].includes(a.level))
1007
1033
  return "Rule must have level A or AA";
1008
- const n = Oe(e);
1034
+ const n = Ve(e);
1009
1035
  return n || null;
1010
1036
  }
1011
- function Oe(t) {
1037
+ function Ve(t) {
1012
1038
  switch (t.type) {
1013
1039
  case "selector-exists":
1014
1040
  return null;
@@ -1034,7 +1060,7 @@ function S(t, a, e) {
1034
1060
  }
1035
1061
  return i;
1036
1062
  }
1037
- function x(t) {
1063
+ function k(t) {
1038
1064
  const a = t.skipAriaHidden !== !1;
1039
1065
  return {
1040
1066
  id: t.id,
@@ -1064,7 +1090,7 @@ function x(t) {
1064
1090
  for (const s of e.querySelectorAll(t.selector)) {
1065
1091
  if (a && m(s)) continue;
1066
1092
  const u = s.getAttribute(n);
1067
- u !== null && We(u, r, o) && i.push({
1093
+ u !== null && Ue(u, r, o) && i.push({
1068
1094
  ruleId: t.id,
1069
1095
  selector: c(s),
1070
1096
  html: l(s),
@@ -1158,7 +1184,7 @@ function x(t) {
1158
1184
  }
1159
1185
  };
1160
1186
  }
1161
- function We(t, a, e) {
1187
+ function Ue(t, a, e) {
1162
1188
  switch (a) {
1163
1189
  case ">":
1164
1190
  return parseFloat(t) > e;
@@ -1176,7 +1202,7 @@ function We(t, a, e) {
1176
1202
  return !1;
1177
1203
  }
1178
1204
  }
1179
- const _e = {
1205
+ const je = {
1180
1206
  id: "server-side-image-map",
1181
1207
  selector: "img[ismap], input[type='image'][ismap]",
1182
1208
  check: { type: "selector-exists" },
@@ -1187,7 +1213,7 @@ const _e = {
1187
1213
  level: "A",
1188
1214
  guidance: "Server-side image maps (using ismap attribute) send click coordinates to the server, which is inaccessible to keyboard users and screen readers who can't precisely click specific regions. Replace with client-side image maps (<map> with <area> elements) that provide keyboard access and accessible names, or use linked images/buttons instead.",
1189
1215
  prompt: "Explain that the ismap attribute should be removed and the functionality replaced with a client-side <map> element with <area> children, or separate linked images/buttons."
1190
- }, Fe = x(_e), Pe = {
1216
+ }, ze = k(je), Ge = {
1191
1217
  id: "label",
1192
1218
  wcag: ["4.1.2"],
1193
1219
  level: "A",
@@ -1210,7 +1236,7 @@ const _e = {
1210
1236
  }
1211
1237
  return a;
1212
1238
  }
1213
- }, Ve = {
1239
+ }, Xe = {
1214
1240
  id: "form-field-multiple-labels",
1215
1241
  wcag: [],
1216
1242
  level: "A",
@@ -1242,7 +1268,7 @@ const _e = {
1242
1268
  }
1243
1269
  return a;
1244
1270
  }
1245
- }, Ue = {
1271
+ }, Ke = {
1246
1272
  id: "select-name",
1247
1273
  wcag: ["4.1.2"],
1248
1274
  level: "A",
@@ -1261,7 +1287,7 @@ const _e = {
1261
1287
  });
1262
1288
  return a;
1263
1289
  }
1264
- }, je = {
1290
+ }, Ye = {
1265
1291
  id: "input-button-name",
1266
1292
  wcag: ["4.1.2"],
1267
1293
  level: "A",
@@ -1286,7 +1312,7 @@ const _e = {
1286
1312
  }
1287
1313
  return a;
1288
1314
  }
1289
- }, ze = /* @__PURE__ */ new Set([
1315
+ }, Qe = /* @__PURE__ */ new Set([
1290
1316
  "off",
1291
1317
  "on",
1292
1318
  "name",
@@ -1341,7 +1367,7 @@ const _e = {
1341
1367
  "impp",
1342
1368
  "url",
1343
1369
  "photo"
1344
- ]), Ge = {
1370
+ ]), Je = {
1345
1371
  id: "autocomplete-valid",
1346
1372
  wcag: ["1.3.5"],
1347
1373
  level: "AA",
@@ -1354,7 +1380,7 @@ const _e = {
1354
1380
  const i = e.getAttribute("autocomplete").trim();
1355
1381
  if (!i) continue;
1356
1382
  const n = i.split(/\s+/), r = n[n.length - 1];
1357
- ze.has(r) || a.push({
1383
+ Qe.has(r) || a.push({
1358
1384
  ruleId: "autocomplete-valid",
1359
1385
  selector: c(e),
1360
1386
  html: l(e),
@@ -1365,16 +1391,16 @@ const _e = {
1365
1391
  return a;
1366
1392
  }
1367
1393
  };
1368
- function j(t) {
1394
+ function z(t) {
1369
1395
  return t.toLowerCase().replace(/\s+/g, " ").trim();
1370
1396
  }
1371
- function z(t, a) {
1372
- const e = j(t), i = j(a);
1397
+ function G(t, a) {
1398
+ const e = z(t), i = z(a);
1373
1399
  if (!e || !i || e.includes(i) || i.includes(e)) return !0;
1374
1400
  const n = i.split(/\s+/).map((r) => r.replace(/[.,;:!?\u2026]+$/g, "")).filter((r) => r.length > 2);
1375
1401
  return n.length >= 2 && n.filter((o) => e.includes(o)).length / n.length > 0.5;
1376
1402
  }
1377
- function W(t) {
1403
+ function F(t) {
1378
1404
  let a = "";
1379
1405
  for (const e of t.childNodes)
1380
1406
  if (e.nodeType === 3)
@@ -1384,11 +1410,11 @@ function W(t) {
1384
1410
  if (n === "style" || n === "script" || n === "svg" || i.getAttribute("aria-hidden") === "true" || i instanceof HTMLElement && i.style.display === "none") continue;
1385
1411
  const r = i.getAttribute("role");
1386
1412
  if (r === "img" || r === "presentation" || r === "none") continue;
1387
- a += W(i);
1413
+ a += F(i);
1388
1414
  }
1389
1415
  return a;
1390
1416
  }
1391
- const Xe = {
1417
+ const Ze = {
1392
1418
  id: "label-content-name-mismatch",
1393
1419
  wcag: ["2.5.3"],
1394
1420
  level: "A",
@@ -1402,11 +1428,11 @@ const Xe = {
1402
1428
  const i = b(e);
1403
1429
  if (!i) continue;
1404
1430
  let n = "";
1405
- e instanceof HTMLInputElement ? n = e.value || "" : n = W(e);
1431
+ e instanceof HTMLInputElement ? n = e.value || "" : n = F(e);
1406
1432
  const r = n.trim();
1407
1433
  if (!r || r.length <= 2) continue;
1408
1434
  const o = e.hasAttribute("aria-label"), s = e.hasAttribute("aria-labelledby");
1409
- !o && !s || z(i, n) || a.push({
1435
+ !o && !s || G(i, n) || a.push({
1410
1436
  ruleId: "label-content-name-mismatch",
1411
1437
  selector: c(e),
1412
1438
  html: l(e),
@@ -1422,9 +1448,9 @@ const Xe = {
1422
1448
  let o = "";
1423
1449
  if (r) {
1424
1450
  const s = t.querySelector(`label[for="${CSS.escape(r)}"]`);
1425
- s && (o = W(s));
1451
+ s && (o = F(s));
1426
1452
  }
1427
- o.trim() && (z(i, o) || a.push({
1453
+ o.trim() && (G(i, o) || a.push({
1428
1454
  ruleId: "label-content-name-mismatch",
1429
1455
  selector: c(e),
1430
1456
  html: l(e),
@@ -1434,7 +1460,7 @@ const Xe = {
1434
1460
  }
1435
1461
  return a;
1436
1462
  }
1437
- }, Ke = {
1463
+ }, et = {
1438
1464
  id: "label-title-only",
1439
1465
  wcag: [],
1440
1466
  level: "A",
@@ -1467,7 +1493,7 @@ const Xe = {
1467
1493
  }
1468
1494
  return a;
1469
1495
  }
1470
- }, Ye = {
1496
+ }, tt = {
1471
1497
  id: "tabindex",
1472
1498
  selector: "[tabindex]",
1473
1499
  check: { type: "attribute-value", attribute: "tabindex", operator: ">", value: 0 },
@@ -1479,7 +1505,7 @@ const Xe = {
1479
1505
  tags: ["best-practice"],
1480
1506
  guidance: "Positive tabindex values force elements to the front of the tab order regardless of DOM position, creating unpredictable navigation for keyboard users. Use tabindex='0' to add elements to the natural tab order, or tabindex='-1' to make elements programmatically focusable but not in tab order. Rely on DOM order for tab sequence.",
1481
1507
  prompt: "Change the positive tabindex value to tabindex='0' and rely on DOM order for tab sequence instead."
1482
- }, Qe = x(Ye), Je = /* @__PURE__ */ new Set([
1508
+ }, at = k(tt), it = /* @__PURE__ */ new Set([
1483
1509
  "div",
1484
1510
  "span",
1485
1511
  "p",
@@ -1506,7 +1532,7 @@ const Xe = {
1506
1532
  "tr",
1507
1533
  "td",
1508
1534
  "th"
1509
- ]), Ze = {
1535
+ ]), nt = {
1510
1536
  id: "focus-order-semantics",
1511
1537
  wcag: [],
1512
1538
  tags: ["best-practice"],
@@ -1518,7 +1544,7 @@ const Xe = {
1518
1544
  const a = [];
1519
1545
  for (const e of t.querySelectorAll('[tabindex="0"]')) {
1520
1546
  const i = e.tagName.toLowerCase();
1521
- if (!Je.has(i)) continue;
1547
+ if (!it.has(i)) continue;
1522
1548
  e.getAttribute("role") || a.push({
1523
1549
  ruleId: "focus-order-semantics",
1524
1550
  selector: c(e),
@@ -1529,7 +1555,7 @@ const Xe = {
1529
1555
  }
1530
1556
  return a;
1531
1557
  }
1532
- }, et = /* @__PURE__ */ new Set([
1558
+ }, rt = /* @__PURE__ */ new Set([
1533
1559
  "a",
1534
1560
  "audio",
1535
1561
  "button",
@@ -1538,7 +1564,7 @@ const Xe = {
1538
1564
  "select",
1539
1565
  "textarea",
1540
1566
  "video"
1541
- ]), tt = /* @__PURE__ */ new Set([
1567
+ ]), ot = /* @__PURE__ */ new Set([
1542
1568
  "button",
1543
1569
  "checkbox",
1544
1570
  "combobox",
@@ -1562,7 +1588,7 @@ const Xe = {
1562
1588
  "tabpanel",
1563
1589
  "textbox",
1564
1590
  "treeitem"
1565
- ]), at = {
1591
+ ]), st = {
1566
1592
  grid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader"]),
1567
1593
  listbox: /* @__PURE__ */ new Set(["option"]),
1568
1594
  menu: /* @__PURE__ */ new Set(["menuitem", "menuitemcheckbox", "menuitemradio"]),
@@ -1572,26 +1598,26 @@ const Xe = {
1572
1598
  tree: /* @__PURE__ */ new Set(["treeitem"]),
1573
1599
  treegrid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader", "treeitem"])
1574
1600
  };
1575
- function it(t, a) {
1601
+ function lt(t, a) {
1576
1602
  var n, r, o;
1577
1603
  const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase(), i = (r = a.getAttribute("role")) == null ? void 0 : r.toLowerCase();
1578
- return !e || !i ? !1 : ((o = at[e]) == null ? void 0 : o.has(i)) ?? !1;
1604
+ return !e || !i ? !1 : ((o = st[e]) == null ? void 0 : o.has(i)) ?? !1;
1579
1605
  }
1580
- function nt(t) {
1606
+ function ct(t) {
1581
1607
  var n;
1582
1608
  const a = t.tagName.toLowerCase();
1583
- if (et.has(a))
1609
+ if (rt.has(a))
1584
1610
  return a === "a" && !t.hasAttribute("href") ? !1 : a === "audio" || a === "video" ? t.hasAttribute("controls") : !(a === "img" && !t.hasAttribute("usemap") || a === "input" && t.type === "hidden" || t.disabled);
1585
1611
  const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase();
1586
- if (e && tt.has(e)) return !0;
1612
+ if (e && ot.has(e)) return !0;
1587
1613
  const i = t.getAttribute("tabindex");
1588
1614
  return i !== null && i !== "-1" || t.getAttribute("contenteditable") === "true";
1589
1615
  }
1590
- function rt(t) {
1616
+ function dt(t) {
1591
1617
  const a = t.tagName.toLowerCase();
1592
1618
  return !!(a === "a" && t.hasAttribute("href") || a === "button" && !t.disabled);
1593
1619
  }
1594
- const ot = {
1620
+ const ut = {
1595
1621
  id: "nested-interactive",
1596
1622
  wcag: ["4.1.2"],
1597
1623
  level: "A",
@@ -1606,10 +1632,10 @@ const ot = {
1606
1632
  for (; o; ) {
1607
1633
  for (; r.length > 0 && !r[r.length - 1].contains(o); )
1608
1634
  r.pop();
1609
- if (!m(o) && nt(o)) {
1635
+ if (!m(o) && ct(o)) {
1610
1636
  if (r.length > 0) {
1611
1637
  const s = r[r.length - 1];
1612
- it(s, o) || a.push({
1638
+ lt(s, o) || a.push({
1613
1639
  ruleId: "nested-interactive",
1614
1640
  selector: c(o),
1615
1641
  html: l(o),
@@ -1617,13 +1643,13 @@ const ot = {
1617
1643
  message: `Interactive element <${o.tagName.toLowerCase()}> is nested inside <${s.tagName.toLowerCase()}>.`
1618
1644
  });
1619
1645
  }
1620
- rt(o) && r.push(o);
1646
+ dt(o) && r.push(o);
1621
1647
  }
1622
1648
  o = n.nextNode();
1623
1649
  }
1624
1650
  return a;
1625
1651
  }
1626
- }, st = {
1652
+ }, mt = {
1627
1653
  id: "scrollable-region-focusable",
1628
1654
  wcag: ["2.1.1"],
1629
1655
  level: "A",
@@ -1634,7 +1660,7 @@ const ot = {
1634
1660
  const a = [];
1635
1661
  for (const e of t.querySelectorAll("*")) {
1636
1662
  if (m(e) || !(e instanceof HTMLElement)) continue;
1637
- const i = C(e), n = i.overflowX, r = i.overflowY;
1663
+ const i = x(e), n = i.overflowX, r = i.overflowY;
1638
1664
  if (!(n === "scroll" || n === "auto" || r === "scroll" || r === "auto") || !(e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth)) continue;
1639
1665
  const u = e.getAttribute("tabindex");
1640
1666
  u !== null && u !== "-1" || e.querySelector(
@@ -1649,7 +1675,7 @@ const ot = {
1649
1675
  }
1650
1676
  return a;
1651
1677
  }
1652
- }, lt = {
1678
+ }, pt = {
1653
1679
  id: "accesskeys",
1654
1680
  wcag: [],
1655
1681
  level: "A",
@@ -1679,7 +1705,7 @@ const ot = {
1679
1705
  });
1680
1706
  return a;
1681
1707
  }
1682
- }, ct = {
1708
+ }, ht = {
1683
1709
  id: "heading-order",
1684
1710
  wcag: [],
1685
1711
  level: "A",
@@ -1704,7 +1730,7 @@ const ot = {
1704
1730
  }
1705
1731
  return a;
1706
1732
  }
1707
- }, L = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', G = 'main, [role="main"], header, [role="banner"], footer, [role="contentinfo"], nav, [role="navigation"], aside, [role="complementary"], section[aria-label], section[aria-labelledby], [role="region"][aria-label], [role="region"][aria-labelledby], form[aria-label], form[aria-labelledby], [role="form"][aria-label], [role="form"][aria-labelledby], [role="search"]', dt = {
1733
+ }, L = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', X = 'main, [role="main"], header, [role="banner"], footer, [role="contentinfo"], nav, [role="navigation"], aside, [role="complementary"], section[aria-label], section[aria-labelledby], [role="region"][aria-label], [role="region"][aria-labelledby], form[aria-label], form[aria-labelledby], [role="form"][aria-label], [role="form"][aria-labelledby], [role="search"]', gt = {
1708
1734
  id: "landmark-one-main",
1709
1735
  wcag: [],
1710
1736
  level: "A",
@@ -1728,7 +1754,7 @@ const ot = {
1728
1754
  message: "Page has multiple main landmarks."
1729
1755
  })) : [];
1730
1756
  }
1731
- }, ut = {
1757
+ }, bt = {
1732
1758
  id: "landmark-no-duplicate-banner",
1733
1759
  wcag: [],
1734
1760
  level: "A",
@@ -1748,7 +1774,7 @@ const ot = {
1748
1774
  })
1749
1775
  ), a;
1750
1776
  }
1751
- }, mt = {
1777
+ }, ft = {
1752
1778
  id: "landmark-no-duplicate-contentinfo",
1753
1779
  wcag: [],
1754
1780
  level: "A",
@@ -1768,7 +1794,7 @@ const ot = {
1768
1794
  })
1769
1795
  ), a;
1770
1796
  }
1771
- }, pt = {
1797
+ }, vt = {
1772
1798
  id: "landmark-no-duplicate-main",
1773
1799
  wcag: [],
1774
1800
  level: "A",
@@ -1788,7 +1814,7 @@ const ot = {
1788
1814
  })
1789
1815
  ), a;
1790
1816
  }
1791
- }, ht = {
1817
+ }, wt = {
1792
1818
  id: "landmark-banner-is-top-level",
1793
1819
  wcag: [],
1794
1820
  level: "A",
@@ -1808,7 +1834,7 @@ const ot = {
1808
1834
  });
1809
1835
  return a;
1810
1836
  }
1811
- }, gt = {
1837
+ }, yt = {
1812
1838
  id: "landmark-contentinfo-is-top-level",
1813
1839
  wcag: [],
1814
1840
  level: "A",
@@ -1828,7 +1854,7 @@ const ot = {
1828
1854
  });
1829
1855
  return a;
1830
1856
  }
1831
- }, bt = {
1857
+ }, At = {
1832
1858
  id: "landmark-main-is-top-level",
1833
1859
  wcag: [],
1834
1860
  level: "A",
@@ -1850,7 +1876,7 @@ const ot = {
1850
1876
  }
1851
1877
  return a;
1852
1878
  }
1853
- }, ft = {
1879
+ }, St = {
1854
1880
  id: "landmark-complementary-is-top-level",
1855
1881
  wcag: [],
1856
1882
  level: "A",
@@ -1872,7 +1898,7 @@ const ot = {
1872
1898
  }
1873
1899
  return a;
1874
1900
  }
1875
- }, vt = {
1901
+ }, xt = {
1876
1902
  id: "landmark-unique",
1877
1903
  wcag: [],
1878
1904
  level: "A",
@@ -1908,7 +1934,7 @@ const ot = {
1908
1934
  }
1909
1935
  return a;
1910
1936
  }
1911
- }, yt = {
1937
+ }, kt = {
1912
1938
  id: "region",
1913
1939
  wcag: [],
1914
1940
  level: "A",
@@ -1922,8 +1948,8 @@ const ot = {
1922
1948
  if (!e) return [];
1923
1949
  for (const n of e.children) {
1924
1950
  if (m(n) || n instanceof HTMLScriptElement || n instanceof HTMLStyleElement || n.tagName === "NOSCRIPT" || n instanceof HTMLElement && n.hidden || n.matches('a[href^="#"]')) continue;
1925
- const r = n.matches(G), o = (i = n.textContent) == null ? void 0 : i.trim();
1926
- !r && o && (n.querySelector(G) || a.push({
1951
+ const r = n.matches(X), o = (i = n.textContent) == null ? void 0 : i.trim();
1952
+ !r && o && (n.querySelector(X) || a.push({
1927
1953
  ruleId: "region",
1928
1954
  selector: c(n),
1929
1955
  html: l(n),
@@ -1933,7 +1959,7 @@ const ot = {
1933
1959
  }
1934
1960
  return a;
1935
1961
  }
1936
- }, wt = {
1962
+ }, It = {
1937
1963
  id: "list",
1938
1964
  selector: "ul, ol",
1939
1965
  check: { type: "child-invalid", allowedChildren: ["li", "script", "template"] },
@@ -1944,7 +1970,7 @@ const ot = {
1944
1970
  level: "A",
1945
1971
  guidance: "Screen readers announce list structure ('list with 5 items') based on proper markup. Placing non-<li> elements directly inside <ul> or <ol> breaks this structure. Wrap content in <li> elements, or if you need wrapper divs for styling, restructure your CSS to style the <li> elements directly.",
1946
1972
  prompt: "Explain how to restructure this element within the list properly."
1947
- }, At = x(wt), St = {
1973
+ }, qt = k(It), Ct = {
1948
1974
  id: "dlitem",
1949
1975
  wcag: ["1.3.1"],
1950
1976
  level: "A",
@@ -1963,7 +1989,7 @@ const ot = {
1963
1989
  });
1964
1990
  return a;
1965
1991
  }
1966
- }, xt = {
1992
+ }, Tt = {
1967
1993
  id: "definition-list",
1968
1994
  selector: "dl",
1969
1995
  check: { type: "child-invalid", allowedChildren: ["dt", "dd", "div", "script", "template"] },
@@ -1974,7 +2000,7 @@ const ot = {
1974
2000
  level: "A",
1975
2001
  guidance: "Definition lists have strict content requirements. Only <dt> (terms), <dd> (definitions), and <div> (for grouping dt/dd pairs) are valid children. Other elements break the list structure for screen readers. Move invalid elements outside the <dl>, or restructure using proper definition list markup.",
1976
2002
  prompt: "Explain whether to move this element outside the <dl> or convert it to dt/dd."
1977
- }, kt = x(xt), It = {
2003
+ }, Et = k(Tt), Lt = {
1978
2004
  id: "document-title",
1979
2005
  wcag: ["2.4.2"],
1980
2006
  level: "A",
@@ -1992,7 +2018,7 @@ const ot = {
1992
2018
  message: a ? "Document <title> element is empty." : "Document is missing a <title> element."
1993
2019
  }] : [];
1994
2020
  }
1995
- }, qt = {
2021
+ }, Rt = {
1996
2022
  id: "bypass",
1997
2023
  wcag: ["2.4.1"],
1998
2024
  level: "A",
@@ -2019,7 +2045,7 @@ const ot = {
2019
2045
  message: "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link."
2020
2046
  }];
2021
2047
  }
2022
- }, Ct = {
2048
+ }, Nt = {
2023
2049
  id: "page-has-heading-one",
2024
2050
  wcag: [],
2025
2051
  level: "A",
@@ -2041,7 +2067,7 @@ const ot = {
2041
2067
  message: "Page does not contain a level-one heading."
2042
2068
  }];
2043
2069
  }
2044
- }, Tt = {
2070
+ }, Mt = {
2045
2071
  id: "frame-title",
2046
2072
  wcag: ["4.1.2"],
2047
2073
  level: "A",
@@ -2062,7 +2088,7 @@ const ot = {
2062
2088
  }
2063
2089
  return a;
2064
2090
  }
2065
- }, Et = {
2091
+ }, $t = {
2066
2092
  id: "frame-title-unique",
2067
2093
  wcag: ["4.1.2"],
2068
2094
  level: "A",
@@ -2095,7 +2121,7 @@ const ot = {
2095
2121
  });
2096
2122
  return a;
2097
2123
  }
2098
- }, Lt = {
2124
+ }, Ht = {
2099
2125
  id: "empty-heading",
2100
2126
  wcag: [],
2101
2127
  level: "A",
@@ -2115,7 +2141,7 @@ const ot = {
2115
2141
  });
2116
2142
  return a;
2117
2143
  }
2118
- }, Rt = {
2144
+ }, Dt = {
2119
2145
  id: "meta-viewport",
2120
2146
  wcag: ["1.4.4"],
2121
2147
  level: "AA",
@@ -2147,7 +2173,7 @@ const ot = {
2147
2173
  }
2148
2174
  return a;
2149
2175
  }
2150
- }, Nt = {
2176
+ }, Ot = {
2151
2177
  id: "meta-refresh",
2152
2178
  wcag: ["2.2.1", "2.2.4", "3.2.5"],
2153
2179
  level: "A",
@@ -2182,7 +2208,7 @@ const ot = {
2182
2208
  }
2183
2209
  return a;
2184
2210
  }
2185
- }, Mt = {
2211
+ }, Wt = {
2186
2212
  id: "blink",
2187
2213
  selector: "blink",
2188
2214
  check: { type: "selector-exists" },
@@ -2193,7 +2219,7 @@ const ot = {
2193
2219
  level: "A",
2194
2220
  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.",
2195
2221
  prompt: "Suggest static alternatives to the blinking effect."
2196
- }, $t = x(Mt), Ht = {
2222
+ }, Bt = k(Wt), Ft = {
2197
2223
  id: "marquee",
2198
2224
  selector: "marquee",
2199
2225
  check: { type: "selector-exists" },
@@ -2204,7 +2230,7 @@ const ot = {
2204
2230
  level: "A",
2205
2231
  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.",
2206
2232
  prompt: "Suggest static alternatives or accessible carousel patterns."
2207
- }, Dt = x(Ht), Bt = {
2233
+ }, _t = k(Ft), Pt = {
2208
2234
  id: "p-as-heading",
2209
2235
  wcag: [],
2210
2236
  level: "A",
@@ -2219,8 +2245,8 @@ const ot = {
2219
2245
  if (m(n)) continue;
2220
2246
  const r = n.getAttribute("style") || "", o = /font-weight\s*:\s*(bold|[6-9]00)/i.test(r), s = /font-size\s*:\s*(\d+)\s*(px|em|rem)/i.test(r), u = ((e = n.className) == null ? void 0 : e.toLowerCase()) || "", h = /\bh[1-6]\b|\bheading\b/.test(u), d = ((i = n.textContent) == null ? void 0 : i.trim()) || "", p = d.length > 0 && d.length < 50, g = !d.match(/[.!?,;:]$/);
2221
2247
  if ((o && s || o && h) && p && g) {
2222
- const y = n.nextElementSibling;
2223
- y && (y.tagName === "P" || y.tagName === "DIV" || y.tagName === "UL") && a.push({
2248
+ const w = n.nextElementSibling;
2249
+ w && (w.tagName === "P" || w.tagName === "DIV" || w.tagName === "UL") && a.push({
2224
2250
  ruleId: "p-as-heading",
2225
2251
  selector: c(n),
2226
2252
  html: l(n),
@@ -2231,7 +2257,7 @@ const ot = {
2231
2257
  }
2232
2258
  return a;
2233
2259
  }
2234
- }, Ot = {
2260
+ }, Vt = {
2235
2261
  id: "aria-roles",
2236
2262
  wcag: ["4.1.2"],
2237
2263
  level: "A",
@@ -2243,7 +2269,7 @@ const ot = {
2243
2269
  for (const e of t.querySelectorAll("[role]")) {
2244
2270
  const r = e.getAttribute("role").replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "").split(/\s+/);
2245
2271
  for (const o of r)
2246
- if (o && !me(o)) {
2272
+ if (o && !de(o)) {
2247
2273
  a.push({
2248
2274
  ruleId: "aria-roles",
2249
2275
  selector: c(e),
@@ -2256,7 +2282,7 @@ const ot = {
2256
2282
  }
2257
2283
  return a;
2258
2284
  }
2259
- }, Wt = {
2285
+ }, Ut = {
2260
2286
  id: "aria-valid-attr",
2261
2287
  wcag: ["4.1.2"],
2262
2288
  level: "A",
@@ -2266,7 +2292,7 @@ const ot = {
2266
2292
  run(t) {
2267
2293
  return _(t).validAttr;
2268
2294
  }
2269
- }, _t = {
2295
+ }, jt = {
2270
2296
  id: "aria-valid-attr-value",
2271
2297
  wcag: ["4.1.2"],
2272
2298
  level: "A",
@@ -2276,7 +2302,7 @@ const ot = {
2276
2302
  run(t) {
2277
2303
  return _(t).validAttrValue;
2278
2304
  }
2279
- }, Ft = {
2305
+ }, zt = {
2280
2306
  checkbox: ["aria-checked"],
2281
2307
  combobox: ["aria-expanded"],
2282
2308
  heading: ["aria-level"],
@@ -2291,7 +2317,7 @@ const ot = {
2291
2317
  slider: ["aria-valuenow"],
2292
2318
  spinbutton: ["aria-valuenow"],
2293
2319
  switch: ["aria-checked"]
2294
- }, Pt = {
2320
+ }, Gt = {
2295
2321
  id: "aria-required-attr",
2296
2322
  wcag: ["4.1.2"],
2297
2323
  level: "A",
@@ -2301,7 +2327,7 @@ const ot = {
2301
2327
  run(t) {
2302
2328
  const a = [];
2303
2329
  for (const e of t.querySelectorAll("[role]")) {
2304
- const i = e.getAttribute("role").trim().toLowerCase(), n = Ft[i];
2330
+ const i = e.getAttribute("role").trim().toLowerCase(), n = zt[i];
2305
2331
  if (n && !(i === "checkbox" && e instanceof HTMLInputElement && e.type === "checkbox") && !(i === "radio" && e instanceof HTMLInputElement && e.type === "radio") && !(i === "option" && e instanceof HTMLOptionElement) && !(i === "heading" && /^h[1-6]$/i.test(e.tagName))) {
2306
2332
  if (i === "separator") {
2307
2333
  const r = e.getAttribute("tabindex");
@@ -2325,7 +2351,7 @@ const ot = {
2325
2351
  return a;
2326
2352
  }
2327
2353
  };
2328
- function Vt(t) {
2354
+ function Xt(t) {
2329
2355
  var r, o, s;
2330
2356
  const a = [], e = t.className;
2331
2357
  e && typeof e == "string" && e.trim() && a.push(`Classes: ${e.trim().slice(0, 100)}`);
@@ -2342,7 +2368,7 @@ function Vt(t) {
2342
2368
  return a.length > 0 ? a.join(`
2343
2369
  `) : void 0;
2344
2370
  }
2345
- const Ut = {
2371
+ const Kt = {
2346
2372
  id: "button-name",
2347
2373
  wcag: ["4.1.2"],
2348
2374
  level: "A",
@@ -2359,12 +2385,12 @@ const Ut = {
2359
2385
  html: l(e),
2360
2386
  impact: "critical",
2361
2387
  message: "Button has no discernible text.",
2362
- context: Vt(e)
2388
+ context: Xt(e)
2363
2389
  });
2364
2390
  }
2365
2391
  return a;
2366
2392
  }
2367
- }, jt = {
2393
+ }, Yt = {
2368
2394
  alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
2369
2395
  alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
2370
2396
  application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
@@ -2436,7 +2462,7 @@ const Ut = {
2436
2462
  tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
2437
2463
  treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
2438
2464
  treeitem: /* @__PURE__ */ new Set(["aria-checked", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"])
2439
- }, zt = /* @__PURE__ */ new Set([
2465
+ }, Qt = /* @__PURE__ */ new Set([
2440
2466
  "aria-atomic",
2441
2467
  "aria-busy",
2442
2468
  "aria-controls",
@@ -2460,7 +2486,7 @@ const Ut = {
2460
2486
  "aria-roledescription",
2461
2487
  "aria-braillelabel",
2462
2488
  "aria-brailleroledescription"
2463
- ]), Gt = {
2489
+ ]), Jt = {
2464
2490
  id: "aria-allowed-attr",
2465
2491
  wcag: ["4.1.2"],
2466
2492
  level: "A",
@@ -2473,10 +2499,10 @@ const Ut = {
2473
2499
  if (m(e)) continue;
2474
2500
  const i = E(e);
2475
2501
  if (!i) continue;
2476
- const n = jt[i];
2502
+ const n = Yt[i];
2477
2503
  if (n)
2478
2504
  for (const r of e.attributes)
2479
- r.name.startsWith("aria-") && (zt.has(r.name) || n.has(r.name) || a.push({
2505
+ r.name.startsWith("aria-") && (Qt.has(r.name) || n.has(r.name) || a.push({
2480
2506
  ruleId: "aria-allowed-attr",
2481
2507
  selector: c(e),
2482
2508
  html: l(e),
@@ -2486,7 +2512,7 @@ const Ut = {
2486
2512
  }
2487
2513
  return a;
2488
2514
  }
2489
- }, Xt = /* @__PURE__ */ new Set([
2515
+ }, Zt = /* @__PURE__ */ new Set([
2490
2516
  "base",
2491
2517
  "col",
2492
2518
  "colgroup",
@@ -2501,7 +2527,7 @@ const Ut = {
2501
2527
  "template",
2502
2528
  "title",
2503
2529
  "track"
2504
- ]), k = {
2530
+ ]), I = {
2505
2531
  a: /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem", "link"]),
2506
2532
  "a[href]": /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem"]),
2507
2533
  abbr: "any",
@@ -2608,22 +2634,22 @@ const Ut = {
2608
2634
  video: /* @__PURE__ */ new Set(["application"]),
2609
2635
  wbr: /* @__PURE__ */ new Set(["none", "presentation"])
2610
2636
  };
2611
- function Kt(t) {
2637
+ function ea(t) {
2612
2638
  var e;
2613
2639
  const a = t.tagName.toLowerCase();
2614
- if (Xt.has(a))
2640
+ if (Zt.has(a))
2615
2641
  return "none";
2616
2642
  if (a === "a" && t.hasAttribute("href"))
2617
- return k["a[href]"];
2643
+ return I["a[href]"];
2618
2644
  if (a === "img" && t.getAttribute("alt") === "")
2619
- return k["img[alt='']"];
2645
+ return I["img[alt='']"];
2620
2646
  if (a === "input") {
2621
2647
  const n = `input[type=${((e = t.getAttribute("type")) == null ? void 0 : e.toLowerCase()) || "text"}]`;
2622
- return n in k ? k[n] : "none";
2648
+ return n in I ? I[n] : "none";
2623
2649
  }
2624
- return k[a] || "any";
2650
+ return I[a] || "any";
2625
2651
  }
2626
- const Yt = {
2652
+ const ta = {
2627
2653
  id: "aria-allowed-role",
2628
2654
  wcag: ["4.1.2"],
2629
2655
  level: "A",
@@ -2639,7 +2665,7 @@ const Yt = {
2639
2665
  if (!n) continue;
2640
2666
  const r = J(i);
2641
2667
  if (r && n === r) continue;
2642
- const o = Kt(i);
2668
+ const o = ea(i);
2643
2669
  o === "none" ? a.push({
2644
2670
  ruleId: "aria-allowed-role",
2645
2671
  selector: c(i),
@@ -2656,7 +2682,7 @@ const Yt = {
2656
2682
  }
2657
2683
  return a;
2658
2684
  }
2659
- }, X = {
2685
+ }, K = {
2660
2686
  // Each array is an OR group - at least one of each inner array must be present
2661
2687
  combobox: [["listbox", "tree", "grid", "dialog", "textbox"]],
2662
2688
  // Must own/contain one of these
@@ -2673,7 +2699,7 @@ const Yt = {
2673
2699
  tablist: [["tab"]],
2674
2700
  tree: [["treeitem", "group"]],
2675
2701
  treegrid: [["row", "rowgroup"]]
2676
- }, K = {
2702
+ }, Y = {
2677
2703
  caption: ["figure", "table", "grid", "treegrid"],
2678
2704
  // cell/gridcell/columnheader/rowheader must be in a row
2679
2705
  // but we skip checking native td/th since they're handled by HTML semantics
@@ -2687,7 +2713,7 @@ const Yt = {
2687
2713
  tab: ["tablist"],
2688
2714
  treeitem: ["tree", "group"]
2689
2715
  };
2690
- function Qt(t, a) {
2716
+ function aa(t, a) {
2691
2717
  var r;
2692
2718
  const e = ((r = t.getAttribute("aria-owns")) == null ? void 0 : r.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
2693
2719
  for (const o of t.querySelectorAll("*")) {
@@ -2705,7 +2731,7 @@ function Qt(t, a) {
2705
2731
  if (!o.some((u) => n.has(u))) return !1;
2706
2732
  return !0;
2707
2733
  }
2708
- const Jt = {
2734
+ const ia = {
2709
2735
  id: "aria-required-children",
2710
2736
  wcag: ["4.1.2"],
2711
2737
  level: "A",
@@ -2718,9 +2744,9 @@ const Jt = {
2718
2744
  for (const i of t.querySelectorAll("[role]")) {
2719
2745
  if (m(i)) continue;
2720
2746
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2721
- if (!n || !(n in X)) continue;
2722
- const r = X[n];
2723
- if (!Qt(i, r)) {
2747
+ if (!n || !(n in K)) continue;
2748
+ const r = K[n];
2749
+ if (!aa(i, r)) {
2724
2750
  const o = r.map((s) => s.join(" or ")).join(", ");
2725
2751
  a.push({
2726
2752
  ruleId: "aria-required-children",
@@ -2733,7 +2759,7 @@ const Jt = {
2733
2759
  }
2734
2760
  return a;
2735
2761
  }
2736
- }, Zt = {
2762
+ }, na = {
2737
2763
  id: "aria-required-parent",
2738
2764
  wcag: ["4.1.2"],
2739
2765
  level: "A",
@@ -2746,8 +2772,8 @@ const Jt = {
2746
2772
  for (const i of t.querySelectorAll("[role]")) {
2747
2773
  if (m(i)) continue;
2748
2774
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2749
- if (!n || !(n in K)) continue;
2750
- const r = K[n];
2775
+ if (!n || !(n in Y)) continue;
2776
+ const r = Y[n];
2751
2777
  let o = i.parentElement, s = !1;
2752
2778
  for (; o && o !== t.documentElement; ) {
2753
2779
  const u = E(o);
@@ -2767,7 +2793,7 @@ const Jt = {
2767
2793
  }
2768
2794
  return a;
2769
2795
  }
2770
- }, ea = [
2796
+ }, ra = [
2771
2797
  "a[href]",
2772
2798
  "button:not([disabled])",
2773
2799
  'input:not([disabled]):not([type="hidden"])',
@@ -2783,7 +2809,7 @@ const Jt = {
2783
2809
  "embed",
2784
2810
  "area[href]"
2785
2811
  ].join(", ");
2786
- function ta(t) {
2812
+ function oa(t) {
2787
2813
  let a = t;
2788
2814
  const e = t.ownerDocument, i = e.defaultView;
2789
2815
  for (; a && a !== e.body; ) {
@@ -2796,7 +2822,7 @@ function ta(t) {
2796
2822
  }
2797
2823
  return !0;
2798
2824
  }
2799
- const aa = {
2825
+ const sa = {
2800
2826
  id: "aria-hidden-body",
2801
2827
  selector: 'body[aria-hidden="true"]',
2802
2828
  check: { type: "selector-exists" },
@@ -2808,7 +2834,7 @@ const aa = {
2808
2834
  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.",
2809
2835
  prompt: "Instruct to remove aria-hidden='true' from the body element.",
2810
2836
  skipAriaHidden: !1
2811
- }, ia = x(aa), na = {
2837
+ }, la = k(sa), ca = {
2812
2838
  id: "aria-hidden-focus",
2813
2839
  wcag: ["4.1.2"],
2814
2840
  level: "A",
@@ -2819,10 +2845,10 @@ const aa = {
2819
2845
  const a = [];
2820
2846
  for (const e of t.querySelectorAll('[aria-hidden="true"]')) {
2821
2847
  if (e === t.body) continue;
2822
- const i = e.querySelectorAll(ea);
2848
+ const i = e.querySelectorAll(ra);
2823
2849
  for (const n of i)
2824
2850
  if (n instanceof HTMLElement) {
2825
- if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !ta(n)) continue;
2851
+ if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !oa(n)) continue;
2826
2852
  a.push({
2827
2853
  ruleId: "aria-hidden-focus",
2828
2854
  selector: c(n),
@@ -2834,7 +2860,7 @@ const aa = {
2834
2860
  }
2835
2861
  return a;
2836
2862
  }
2837
- }, ra = {
2863
+ }, da = {
2838
2864
  id: "aria-command-name",
2839
2865
  wcag: ["4.1.2"],
2840
2866
  level: "A",
@@ -2860,7 +2886,7 @@ const aa = {
2860
2886
  }
2861
2887
  return a;
2862
2888
  }
2863
- }, oa = {
2889
+ }, ua = {
2864
2890
  id: "aria-input-field-name",
2865
2891
  wcag: ["4.1.2"],
2866
2892
  level: "A",
@@ -2881,7 +2907,7 @@ const aa = {
2881
2907
  }
2882
2908
  return a;
2883
2909
  }
2884
- }, sa = {
2910
+ }, ma = {
2885
2911
  id: "aria-toggle-field-name",
2886
2912
  wcag: ["4.1.2"],
2887
2913
  level: "A",
@@ -2902,7 +2928,7 @@ const aa = {
2902
2928
  }
2903
2929
  return a;
2904
2930
  }
2905
- }, la = {
2931
+ }, pa = {
2906
2932
  id: "aria-meter-name",
2907
2933
  wcag: ["4.1.2"],
2908
2934
  level: "A",
@@ -2923,7 +2949,7 @@ const aa = {
2923
2949
  }
2924
2950
  return a;
2925
2951
  }
2926
- }, ca = {
2952
+ }, ha = {
2927
2953
  id: "aria-progressbar-name",
2928
2954
  wcag: ["4.1.2"],
2929
2955
  level: "A",
@@ -2944,7 +2970,7 @@ const aa = {
2944
2970
  }
2945
2971
  return a;
2946
2972
  }
2947
- }, da = {
2973
+ }, ga = {
2948
2974
  id: "aria-dialog-name",
2949
2975
  wcag: ["4.1.2"],
2950
2976
  level: "A",
@@ -2965,7 +2991,7 @@ const aa = {
2965
2991
  }
2966
2992
  return a;
2967
2993
  }
2968
- }, ua = {
2994
+ }, ba = {
2969
2995
  id: "aria-tooltip-name",
2970
2996
  wcag: ["4.1.2"],
2971
2997
  level: "A",
@@ -2986,7 +3012,7 @@ const aa = {
2986
3012
  }
2987
3013
  return a;
2988
3014
  }
2989
- }, ma = {
3015
+ }, fa = {
2990
3016
  id: "aria-treeitem-name",
2991
3017
  wcag: ["4.1.2"],
2992
3018
  level: "A",
@@ -3007,7 +3033,7 @@ const aa = {
3007
3033
  }
3008
3034
  return a;
3009
3035
  }
3010
- }, pa = {
3036
+ }, va = {
3011
3037
  id: "aria-prohibited-attr",
3012
3038
  wcag: ["4.1.2"],
3013
3039
  level: "A",
@@ -3017,14 +3043,14 @@ const aa = {
3017
3043
  run(t) {
3018
3044
  return _(t).prohibitedAttr;
3019
3045
  }
3020
- }, ha = [
3046
+ }, wa = [
3021
3047
  "a[href]",
3022
3048
  "button:not([disabled])",
3023
3049
  'input:not([disabled]):not([type="hidden"])',
3024
3050
  "select:not([disabled])",
3025
3051
  "textarea:not([disabled])",
3026
3052
  '[tabindex]:not([tabindex="-1"])'
3027
- ].join(", "), ga = [
3053
+ ].join(", "), ya = [
3028
3054
  "aria-atomic",
3029
3055
  "aria-busy",
3030
3056
  "aria-controls",
@@ -3038,7 +3064,7 @@ const aa = {
3038
3064
  "aria-live",
3039
3065
  "aria-owns",
3040
3066
  "aria-relevant"
3041
- ], ba = {
3067
+ ], Aa = {
3042
3068
  id: "presentation-role-conflict",
3043
3069
  wcag: ["4.1.2"],
3044
3070
  level: "A",
@@ -3050,8 +3076,8 @@ const aa = {
3050
3076
  for (const e of t.querySelectorAll('[role="presentation"], [role="none"]')) {
3051
3077
  if (m(e)) continue;
3052
3078
  const i = [];
3053
- e.matches(ha) && i.push("element is focusable");
3054
- for (const n of ga)
3079
+ e.matches(wa) && i.push("element is focusable");
3080
+ for (const n of ya)
3055
3081
  if (e.hasAttribute(n)) {
3056
3082
  i.push(`has ${n}`);
3057
3083
  break;
@@ -3066,7 +3092,7 @@ const aa = {
3066
3092
  }
3067
3093
  return a;
3068
3094
  }
3069
- }, fa = {
3095
+ }, Sa = {
3070
3096
  id: "summary-name",
3071
3097
  wcag: ["4.1.2"],
3072
3098
  level: "A",
@@ -3088,7 +3114,7 @@ const aa = {
3088
3114
  return a;
3089
3115
  }
3090
3116
  };
3091
- function va(t) {
3117
+ function xa(t) {
3092
3118
  var n, r;
3093
3119
  const a = [], e = t.getAttribute("href");
3094
3120
  e && a.push(`href: ${e}`);
@@ -3105,7 +3131,7 @@ function va(t) {
3105
3131
  return a.length > 0 ? a.join(`
3106
3132
  `) : void 0;
3107
3133
  }
3108
- const ya = {
3134
+ const ka = {
3109
3135
  id: "link-name",
3110
3136
  wcag: ["2.4.4", "4.1.2"],
3111
3137
  level: "A",
@@ -3122,12 +3148,12 @@ const ya = {
3122
3148
  html: l(e),
3123
3149
  impact: "serious",
3124
3150
  message: "Link has no discernible text.",
3125
- context: va(e)
3151
+ context: xa(e)
3126
3152
  });
3127
3153
  }
3128
3154
  return a;
3129
3155
  }
3130
- }, wa = {
3156
+ }, Ia = {
3131
3157
  id: "skip-link",
3132
3158
  wcag: ["2.4.1"],
3133
3159
  level: "A",
@@ -3140,7 +3166,7 @@ const ya = {
3140
3166
  for (const i of e) {
3141
3167
  const n = i.getAttribute("href");
3142
3168
  if (!n || n === "#") continue;
3143
- const r = w(i).toLowerCase();
3169
+ const r = y(i).toLowerCase();
3144
3170
  if (!(r.includes("skip") || r.includes("jump") || r.includes("main content") || r.includes("navigation"))) continue;
3145
3171
  const s = n.slice(1);
3146
3172
  t.getElementById(s) || a.push({
@@ -3153,7 +3179,7 @@ const ya = {
3153
3179
  }
3154
3180
  return a;
3155
3181
  }
3156
- }, Aa = {
3182
+ }, qa = {
3157
3183
  id: "link-in-text-block",
3158
3184
  wcag: ["1.4.1"],
3159
3185
  level: "A",
@@ -3180,7 +3206,7 @@ const ya = {
3180
3206
  }
3181
3207
  return a;
3182
3208
  }
3183
- }, Sa = {
3209
+ }, Ca = {
3184
3210
  id: "html-has-lang",
3185
3211
  wcag: ["3.1.1"],
3186
3212
  level: "A",
@@ -3198,7 +3224,7 @@ const ya = {
3198
3224
  message: "<html> element missing lang attribute."
3199
3225
  }];
3200
3226
  }
3201
- }, re = /^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i, xa = {
3227
+ }, ee = /^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i, Ta = {
3202
3228
  id: "html-lang-valid",
3203
3229
  wcag: ["3.1.1"],
3204
3230
  level: "A",
@@ -3208,7 +3234,7 @@ const ya = {
3208
3234
  run(t) {
3209
3235
  var e;
3210
3236
  const a = (e = t.documentElement.getAttribute("lang")) == null ? void 0 : e.trim();
3211
- return a && !re.test(a) ? [{
3237
+ return a && !ee.test(a) ? [{
3212
3238
  ruleId: "html-lang-valid",
3213
3239
  selector: "html",
3214
3240
  html: l(t.documentElement),
@@ -3216,7 +3242,7 @@ const ya = {
3216
3242
  message: `Invalid lang attribute value "${a}".`
3217
3243
  }] : [];
3218
3244
  }
3219
- }, ka = {
3245
+ }, Ea = {
3220
3246
  id: "valid-lang",
3221
3247
  wcag: ["3.1.2"],
3222
3248
  level: "AA",
@@ -3229,7 +3255,7 @@ const ya = {
3229
3255
  for (const i of t.querySelectorAll("[lang]")) {
3230
3256
  if (m(i) || i === t.documentElement) continue;
3231
3257
  const n = (e = i.getAttribute("lang")) == null ? void 0 : e.trim();
3232
- n && !re.test(n) && a.push({
3258
+ n && !ee.test(n) && a.push({
3233
3259
  ruleId: "valid-lang",
3234
3260
  selector: c(i),
3235
3261
  html: l(i),
@@ -3239,7 +3265,7 @@ const ya = {
3239
3265
  }
3240
3266
  return a;
3241
3267
  }
3242
- }, Ia = {
3268
+ }, La = {
3243
3269
  id: "html-xml-lang-mismatch",
3244
3270
  wcag: ["3.1.1"],
3245
3271
  level: "A",
@@ -3262,7 +3288,7 @@ const ya = {
3262
3288
  }
3263
3289
  return [];
3264
3290
  }
3265
- }, qa = {
3291
+ }, Ra = {
3266
3292
  id: "td-headers-attr",
3267
3293
  wcag: ["1.3.1"],
3268
3294
  level: "A",
@@ -3290,7 +3316,7 @@ const ya = {
3290
3316
  }
3291
3317
  return a;
3292
3318
  }
3293
- }, Ca = {
3319
+ }, Na = {
3294
3320
  id: "th-has-data-cells",
3295
3321
  wcag: ["1.3.1"],
3296
3322
  level: "A",
@@ -3312,7 +3338,7 @@ const ya = {
3312
3338
  }
3313
3339
  return a;
3314
3340
  }
3315
- }, Ta = {
3341
+ }, Ma = {
3316
3342
  id: "td-has-header",
3317
3343
  wcag: ["1.3.1"],
3318
3344
  level: "A",
@@ -3341,17 +3367,17 @@ const ya = {
3341
3367
  const g = p.closest("tr");
3342
3368
  if (!g) continue;
3343
3369
  const f = g.querySelector("th") !== null, v = Array.from(g.children).indexOf(p);
3344
- let y = !1;
3370
+ let w = !1;
3345
3371
  const T = n.querySelector("thead");
3346
3372
  if (T) {
3347
3373
  const A = T.querySelector("tr");
3348
- A && ((e = A.querySelectorAll("th, td")[v]) == null ? void 0 : e.tagName.toLowerCase()) === "th" && (y = !0);
3374
+ A && ((e = A.querySelectorAll("th, td")[v]) == null ? void 0 : e.tagName.toLowerCase()) === "th" && (w = !0);
3349
3375
  }
3350
- if (!y) {
3376
+ if (!w) {
3351
3377
  const A = n.querySelector("tbody > tr, tr");
3352
- A && ((i = A.querySelectorAll("th, td")[v]) == null ? void 0 : i.tagName.toLowerCase()) === "th" && (y = !0);
3378
+ A && ((i = A.querySelectorAll("th, td")[v]) == null ? void 0 : i.tagName.toLowerCase()) === "th" && (w = !0);
3353
3379
  }
3354
- if (!f && !y && !h && !d) {
3380
+ if (!f && !w && !h && !d) {
3355
3381
  a.push({
3356
3382
  ruleId: "td-has-header",
3357
3383
  selector: c(p),
@@ -3365,7 +3391,7 @@ const ya = {
3365
3391
  }
3366
3392
  return a;
3367
3393
  }
3368
- }, Ea = {
3394
+ }, $a = {
3369
3395
  id: "scope-attr-valid",
3370
3396
  wcag: ["1.3.1"],
3371
3397
  level: "A",
@@ -3388,7 +3414,7 @@ const ya = {
3388
3414
  }
3389
3415
  return a;
3390
3416
  }
3391
- }, La = {
3417
+ }, Ha = {
3392
3418
  id: "empty-table-header",
3393
3419
  wcag: [],
3394
3420
  level: "A",
@@ -3411,7 +3437,7 @@ const ya = {
3411
3437
  }
3412
3438
  return a;
3413
3439
  }
3414
- }, N = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], Ra = {
3440
+ }, N = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], Da = {
3415
3441
  id: "duplicate-id-aria",
3416
3442
  wcag: ["4.1.2"],
3417
3443
  level: "A",
@@ -3459,7 +3485,7 @@ Referenced by: ${h}` : ""}`
3459
3485
  }
3460
3486
  return a;
3461
3487
  }
3462
- }, Na = {
3488
+ }, Oa = {
3463
3489
  id: "video-caption",
3464
3490
  wcag: ["1.2.2"],
3465
3491
  level: "A",
@@ -3480,7 +3506,7 @@ Referenced by: ${h}` : ""}`
3480
3506
  }
3481
3507
  return a;
3482
3508
  }
3483
- }, Ma = {
3509
+ }, Wa = {
3484
3510
  id: "audio-caption",
3485
3511
  wcag: ["1.2.1"],
3486
3512
  level: "A",
@@ -3502,7 +3528,7 @@ Referenced by: ${h}` : ""}`
3502
3528
  }
3503
3529
  return a;
3504
3530
  }
3505
- }, $a = /* @__PURE__ */ new Set([
3531
+ }, Ba = /* @__PURE__ */ new Set([
3506
3532
  "SCRIPT",
3507
3533
  "STYLE",
3508
3534
  "NOSCRIPT",
@@ -3518,23 +3544,37 @@ Referenced by: ${h}` : ""}`
3518
3544
  "BR",
3519
3545
  "HR"
3520
3546
  ]);
3521
- function Y([t, a, e]) {
3547
+ function Q([t, a, e]) {
3522
3548
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3523
3549
  }
3524
- function Ha(t) {
3550
+ function Fa(t) {
3525
3551
  return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!t.closest("fieldset[disabled]");
3526
3552
  }
3527
- function Da(t) {
3553
+ function _a(t) {
3554
+ const a = t.clip;
3555
+ if (a && a.startsWith("rect(")) {
3556
+ const i = a.match(/[\d.]+/g);
3557
+ if (!i || i.every((n) => parseFloat(n) === 0)) return !0;
3558
+ }
3559
+ const e = t.clipPath;
3560
+ if (e === "inset(50%)" || e === "inset(100%)") return !0;
3561
+ if (t.overflow === "hidden" && t.position === "absolute") {
3562
+ const i = parseFloat(t.width), n = parseFloat(t.height);
3563
+ if (i <= 1 && n <= 1) return !0;
3564
+ }
3565
+ return !1;
3566
+ }
3567
+ function Pa(t) {
3528
3568
  if (m(t)) return !0;
3529
3569
  let a = t;
3530
3570
  for (; a; ) {
3531
- const e = C(a);
3532
- if (e.display === "none" || e.visibility === "hidden") return !0;
3571
+ const e = x(a);
3572
+ if (e.display === "none" || e.visibility === "hidden" || _a(e)) return !0;
3533
3573
  a = a.parentElement;
3534
3574
  }
3535
3575
  return !1;
3536
3576
  }
3537
- const Ba = {
3577
+ const Va = {
3538
3578
  id: "color-contrast",
3539
3579
  wcag: ["1.4.3"],
3540
3580
  level: "AA",
@@ -3549,138 +3589,138 @@ const Ba = {
3549
3589
  for (; r = i.nextNode(); ) {
3550
3590
  if (!r.textContent || !r.textContent.trim()) continue;
3551
3591
  const o = r.parentElement;
3552
- if (!o || n.has(o) || (n.add(o), $a.has(o.tagName)) || Ha(o) || Da(o)) continue;
3553
- const s = C(o);
3592
+ if (!o || n.has(o) || (n.add(o), Ba.has(o.tagName)) || Fa(o) || Pa(o)) continue;
3593
+ const s = x(o);
3554
3594
  if (parseFloat(s.opacity) === 0) continue;
3555
- const u = ne(s.color);
3595
+ const u = Z(s.color);
3556
3596
  if (!u) continue;
3557
3597
  const h = s.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/);
3558
- if (h && parseFloat(h[1]) === 0) continue;
3559
- const d = Ie(o);
3598
+ if (h && parseFloat(h[1]) === 0 || Le(o)) continue;
3599
+ const d = Ce(o);
3560
3600
  if (!d) continue;
3561
- const p = U(u[0], u[1], u[2]), g = U(d[0], d[1], d[2]), f = ke(p, g), v = Ce(o) ? 3 : 4.5;
3601
+ const p = j(u[0], u[1], u[2]), g = j(d[0], d[1], d[2]), f = qe(p, g), v = Ne(o) ? 3 : 4.5;
3562
3602
  if (f < v) {
3563
- const y = Math.round(f * 100) / 100, T = Y(u), A = Y(d);
3603
+ const w = Math.round(f * 100) / 100, T = Q(u), A = Q(d);
3564
3604
  a.push({
3565
3605
  ruleId: "color-contrast",
3566
3606
  selector: c(o),
3567
3607
  html: l(o),
3568
3608
  impact: "serious",
3569
- message: `Insufficient color contrast ratio of ${y}:1 (required ${v}:1).`,
3570
- context: `foreground: ${T} rgb(${u.join(", ")}), background: ${A} rgb(${d.join(", ")}), ratio: ${y}:1, required: ${v}:1`
3609
+ message: `Insufficient color contrast ratio of ${w}:1 (required ${v}:1).`,
3610
+ context: `foreground: ${T} rgb(${u.join(", ")}), background: ${A} rgb(${d.join(", ")}), ratio: ${w}:1, required: ${v}:1`
3571
3611
  });
3572
3612
  }
3573
3613
  }
3574
3614
  return a;
3575
3615
  }
3576
- }, oe = [
3616
+ }, te = [
3577
3617
  // Document Structure
3578
- It,
3579
- qt,
3580
- Ct,
3581
- Tt,
3582
- Et,
3618
+ Lt,
3583
3619
  Rt,
3584
3620
  Nt,
3621
+ Mt,
3585
3622
  $t,
3586
3623
  Dt,
3624
+ Ot,
3625
+ Bt,
3626
+ _t,
3587
3627
  // Images
3588
- Ee,
3589
- Le,
3590
- Re,
3591
- Ne,
3592
3628
  $e,
3593
3629
  He,
3594
3630
  De,
3631
+ Oe,
3595
3632
  Be,
3596
3633
  Fe,
3597
- // Forms
3634
+ _e,
3598
3635
  Pe,
3599
- Ve,
3600
- Ue,
3601
- je,
3636
+ ze,
3637
+ // Forms
3602
3638
  Ge,
3603
3639
  Xe,
3604
3640
  Ke,
3605
- // Keyboard
3606
- Qe,
3641
+ Ye,
3642
+ Je,
3607
3643
  Ze,
3608
- ot,
3609
- st,
3610
- lt,
3611
- // Structure
3612
- ct,
3613
- Lt,
3614
- Bt,
3615
- dt,
3644
+ et,
3645
+ // Keyboard
3646
+ at,
3647
+ nt,
3616
3648
  ut,
3617
3649
  mt,
3618
3650
  pt,
3651
+ // Structure
3619
3652
  ht,
3653
+ Ht,
3654
+ Pt,
3620
3655
  gt,
3621
3656
  bt,
3622
3657
  ft,
3623
3658
  vt,
3659
+ wt,
3624
3660
  yt,
3625
3661
  At,
3626
3662
  St,
3663
+ xt,
3627
3664
  kt,
3665
+ qt,
3666
+ Ct,
3667
+ Et,
3628
3668
  // ARIA
3629
- Ot,
3630
- Wt,
3631
- _t,
3632
- Pt,
3669
+ Vt,
3670
+ Ut,
3671
+ jt,
3633
3672
  Gt,
3634
- Yt,
3635
3673
  Jt,
3636
- Zt,
3674
+ ta,
3637
3675
  ia,
3638
3676
  na,
3639
- ra,
3640
- oa,
3641
- sa,
3642
3677
  la,
3643
3678
  ca,
3644
3679
  da,
3645
3680
  ua,
3646
3681
  ma,
3647
3682
  pa,
3683
+ ha,
3684
+ ga,
3648
3685
  ba,
3649
- Ut,
3650
3686
  fa,
3651
- // Links
3652
- ya,
3653
- wa,
3687
+ va,
3654
3688
  Aa,
3655
- // Language
3689
+ Kt,
3656
3690
  Sa,
3657
- xa,
3691
+ // Links
3658
3692
  ka,
3659
3693
  Ia,
3660
- // Tables
3661
3694
  qa,
3695
+ // Language
3662
3696
  Ca,
3663
3697
  Ta,
3664
3698
  Ea,
3665
3699
  La,
3666
- // Parsing
3700
+ // Tables
3667
3701
  Ra,
3668
- // Media
3669
3702
  Na,
3670
3703
  Ma,
3704
+ $a,
3705
+ Ha,
3706
+ // Parsing
3707
+ Da,
3708
+ // Media
3709
+ Oa,
3710
+ Wa,
3671
3711
  // Color
3672
- Ba
3712
+ Va
3673
3713
  ];
3674
- let F = [], se = /* @__PURE__ */ new Set();
3675
- function Fa(t) {
3676
- t.additionalRules && (F = t.additionalRules), t.disabledRules && (se = new Set(t.disabledRules));
3714
+ let P = [], ae = /* @__PURE__ */ new Set();
3715
+ function Ga(t) {
3716
+ t.additionalRules && (P = t.additionalRules), t.disabledRules && (ae = new Set(t.disabledRules));
3677
3717
  }
3678
- function le() {
3679
- return oe.filter((a) => !se.has(a.id)).concat(F);
3718
+ function ie() {
3719
+ return te.filter((a) => !ae.has(a.id)).concat(P);
3680
3720
  }
3681
- function Pa(t) {
3682
- ee(), Q(), Z(), ie(), ae(), te();
3683
- const a = le(), e = [];
3721
+ function Xa(t) {
3722
+ ne();
3723
+ const a = ie(), e = [];
3684
3724
  let i = 0;
3685
3725
  return {
3686
3726
  processChunk(n) {
@@ -3699,10 +3739,13 @@ function Pa(t) {
3699
3739
  }
3700
3740
  };
3701
3741
  }
3702
- function Va(t) {
3742
+ function ne() {
3743
+ ue(), oe(), se(), Ie(), ke(), pe();
3744
+ }
3745
+ function Ka(t) {
3703
3746
  var i;
3704
- ee(), Q(), Z(), ie(), ae(), te();
3705
- const a = le(), e = [];
3747
+ ne();
3748
+ const a = ie(), e = [];
3706
3749
  for (const n of a)
3707
3750
  try {
3708
3751
  e.push(...n.run(t));
@@ -3715,31 +3758,32 @@ function Va(t) {
3715
3758
  ruleCount: a.length
3716
3759
  };
3717
3760
  }
3718
- const Oa = new Map(oe.map((t) => [t.id, t]));
3719
- function Ua(t) {
3720
- const a = Oa.get(t);
3721
- return a || F.find((e) => e.id === t);
3761
+ const Ua = new Map(te.map((t) => [t.id, t]));
3762
+ function Ya(t) {
3763
+ const a = Ua.get(t);
3764
+ return a || P.find((e) => e.id === t);
3722
3765
  }
3723
3766
  export {
3724
- ae as clearAriaAttrAuditCache,
3725
- ee as clearAriaHiddenCache,
3726
- ie as clearColorCaches,
3727
- Q as clearComputedRoleCache,
3728
- x as compileDeclarativeRule,
3729
- Fa as configureRules,
3730
- Pa as createChunkedAudit,
3767
+ ne as clearAllCaches,
3768
+ ke as clearAriaAttrAuditCache,
3769
+ ue as clearAriaHiddenCache,
3770
+ Ie as clearColorCaches,
3771
+ oe as clearComputedRoleCache,
3772
+ k as compileDeclarativeRule,
3773
+ Ga as configureRules,
3774
+ Xa as createChunkedAudit,
3731
3775
  b as getAccessibleName,
3732
- w as getAccessibleTextContent,
3733
- le as getActiveRules,
3776
+ y as getAccessibleTextContent,
3777
+ ie as getActiveRules,
3734
3778
  E as getComputedRole,
3735
3779
  l as getHtmlSnippet,
3736
3780
  J as getImplicitRole,
3737
- Ua as getRuleById,
3781
+ Ya as getRuleById,
3738
3782
  c as getSelector,
3739
3783
  m as isAriaHidden,
3740
- me as isValidRole,
3741
- Wa as querySelectorShadowAware,
3742
- oe as rules,
3743
- Va as runAudit,
3744
- _a as validateDeclarativeRule
3784
+ de as isValidRole,
3785
+ ja as querySelectorShadowAware,
3786
+ te as rules,
3787
+ Ka as runAudit,
3788
+ za as validateDeclarativeRule
3745
3789
  };