@accesslint/core 0.3.4 → 0.3.5

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 O = /* @__PURE__ */ new WeakMap();
2
- function fe() {
2
+ function ve() {
3
3
  O = /* @__PURE__ */ new WeakMap();
4
4
  }
5
5
  function ue(t) {
@@ -125,17 +125,17 @@ function C(t) {
125
125
  return O.set(t, i), i;
126
126
  }
127
127
  let W = /* @__PURE__ */ new WeakMap();
128
- function ve() {
128
+ function we() {
129
129
  W = /* @__PURE__ */ new WeakMap();
130
130
  }
131
131
  function v(t) {
132
132
  const a = W.get(t);
133
133
  if (a !== void 0) return a;
134
- const e = we(t);
134
+ const e = ye(t);
135
135
  return W.set(t, e), e;
136
136
  }
137
- function we(t) {
138
- var r, o, s, u, h;
137
+ function ye(t) {
138
+ var r, o, s, d, h;
139
139
  const a = t.getAttribute("aria-labelledby");
140
140
  if (a) {
141
141
  const l = a.split(/\s+/).map((m) => {
@@ -179,9 +179,9 @@ function we(t) {
179
179
  const l = y(t).trim();
180
180
  if (l) return l;
181
181
  }
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()) ?? "" : "";
182
+ return t instanceof HTMLImageElement || t instanceof HTMLAreaElement ? ((d = t.alt) == null ? void 0 : d.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((h = t.alt) == null ? void 0 : h.trim()) ?? "" : "";
183
183
  }
184
- const ye = /* @__PURE__ */ new Set([
184
+ const Ae = /* @__PURE__ */ new Set([
185
185
  "alert",
186
186
  "alertdialog",
187
187
  "application",
@@ -265,12 +265,12 @@ const ye = /* @__PURE__ */ new Set([
265
265
  "treegrid",
266
266
  "treeitem"
267
267
  ]);
268
- function Ae(t) {
268
+ function Se(t) {
269
269
  const a = t.trim().toLowerCase().replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "");
270
- return ye.has(a);
270
+ return Ae.has(a);
271
271
  }
272
272
  let B = /* @__PURE__ */ new WeakMap();
273
- function Se() {
273
+ function xe() {
274
274
  B = /* @__PURE__ */ new WeakMap();
275
275
  }
276
276
  function p(t) {
@@ -279,7 +279,7 @@ function p(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 = p(t.parentElement) : e = !1, B.set(t, e), e;
281
281
  }
282
- function xe(t) {
282
+ function ke(t) {
283
283
  return !!(t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none"));
284
284
  }
285
285
  function y(t) {
@@ -289,43 +289,43 @@ function y(t) {
289
289
  if (s.nodeType === 3)
290
290
  a += s.textContent ?? "";
291
291
  else if (s.nodeType === 1) {
292
- const u = s;
293
- if (!xe(u)) {
294
- const h = (e = u.tagName) == null ? void 0 : e.toLowerCase();
292
+ const d = s;
293
+ if (!ke(d)) {
294
+ const h = (e = d.tagName) == null ? void 0 : e.toLowerCase();
295
295
  if (h === "img" || h === "area") {
296
- const l = u.getAttribute("aria-labelledby");
296
+ const l = d.getAttribute("aria-labelledby");
297
297
  if (l) {
298
298
  const m = l.split(/\s+/).map((g) => {
299
299
  var b, f;
300
- return ((f = (b = u.ownerDocument.getElementById(g)) == null ? void 0 : b.textContent) == null ? void 0 : f.trim()) ?? "";
300
+ return ((f = (b = d.ownerDocument.getElementById(g)) == null ? void 0 : b.textContent) == null ? void 0 : f.trim()) ?? "";
301
301
  }).filter(Boolean);
302
302
  if (m.length) {
303
303
  a += m.join(" ");
304
304
  continue;
305
305
  }
306
306
  }
307
- a += ((i = u.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? u.getAttribute("alt") ?? ((n = u.getAttribute("title")) == null ? void 0 : n.trim()) ?? "";
307
+ a += ((i = d.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? d.getAttribute("alt") ?? ((n = d.getAttribute("title")) == null ? void 0 : n.trim()) ?? "";
308
308
  } else if (h === "svg") {
309
- const l = (r = u.getAttribute("aria-label")) == null ? void 0 : r.trim();
309
+ const l = (r = d.getAttribute("aria-label")) == null ? void 0 : r.trim();
310
310
  if (l)
311
311
  a += l;
312
312
  else {
313
- const m = u.querySelector("title");
313
+ const m = d.querySelector("title");
314
314
  m && (a += m.textContent ?? "");
315
315
  }
316
- } else (o = u.getAttribute("aria-label")) != null && o.trim() ? a += u.getAttribute("aria-label").trim() : a += y(u);
316
+ } else (o = d.getAttribute("aria-label")) != null && o.trim() ? a += d.getAttribute("aria-label").trim() : a += y(d);
317
317
  }
318
318
  }
319
319
  return a;
320
320
  }
321
- let _ = /* @__PURE__ */ new WeakMap();
322
- function ke() {
323
- _ = /* @__PURE__ */ new WeakMap();
321
+ let F = /* @__PURE__ */ new WeakMap();
322
+ function Ie() {
323
+ F = /* @__PURE__ */ new WeakMap();
324
324
  }
325
- function Ie(t) {
325
+ function Ee(t) {
326
326
  return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
327
327
  }
328
- const Ee = [
328
+ const Te = [
329
329
  "data-testid",
330
330
  "data-test-id",
331
331
  "data-cy",
@@ -335,12 +335,12 @@ const Ee = [
335
335
  "for",
336
336
  "aria-label"
337
337
  ];
338
- function Te(t) {
338
+ function Le(t) {
339
339
  const a = t.tagName.toLowerCase();
340
- for (const i of Ee) {
340
+ for (const i of Te) {
341
341
  const n = t.getAttribute(i);
342
342
  if (n != null && n.length > 0 && n.length < 100)
343
- return `${a}[${i}="${Ie(n)}"]`;
343
+ return `${a}[${i}="${Ee(n)}"]`;
344
344
  }
345
345
  const e = t.parentElement;
346
346
  if (e) {
@@ -361,7 +361,7 @@ function $(t) {
361
361
  i.unshift(`#${CSS.escape(n.id)}`);
362
362
  break;
363
363
  }
364
- if (i.unshift(Te(n)), i.length >= 2) {
364
+ if (i.unshift(Le(n)), i.length >= 2) {
365
365
  const r = i.join(" > ");
366
366
  try {
367
367
  const o = a.querySelectorAll(r);
@@ -373,9 +373,9 @@ function $(t) {
373
373
  }
374
374
  return i.join(" > ");
375
375
  }
376
- function d(t) {
376
+ function u(t) {
377
377
  var r;
378
- const a = _.get(t);
378
+ const a = F.get(t);
379
379
  if (a !== void 0) return a;
380
380
  const e = [];
381
381
  let i = t;
@@ -394,9 +394,9 @@ function d(t) {
394
394
  }
395
395
  }
396
396
  const n = e.map((o, s) => (s === 0 ? "" : o.delimiter) + o.selector).join("");
397
- return _.set(t, n), n;
397
+ return F.set(t, n), n;
398
398
  }
399
- function wi(t) {
399
+ function yi(t) {
400
400
  const a = [], e = [];
401
401
  let i = t;
402
402
  for (; i; ) {
@@ -433,7 +433,7 @@ function c(t) {
433
433
  const a = t.outerHTML;
434
434
  return a.length > 200 ? a.slice(0, 200) + "..." : a;
435
435
  }
436
- const Le = /* @__PURE__ */ new Set([
436
+ const Ce = /* @__PURE__ */ new Set([
437
437
  "aria-activedescendant",
438
438
  "aria-atomic",
439
439
  "aria-autocomplete",
@@ -498,7 +498,7 @@ const Le = /* @__PURE__ */ new Set([
498
498
  "aria-multiselectable",
499
499
  "aria-readonly",
500
500
  "aria-required"
501
- ]), X = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), Ce = /* @__PURE__ */ new Set([
501
+ ]), X = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), qe = /* @__PURE__ */ new Set([
502
502
  "aria-colcount",
503
503
  "aria-colindex",
504
504
  "aria-colspan",
@@ -508,7 +508,7 @@ const Le = /* @__PURE__ */ new Set([
508
508
  "aria-rowindex",
509
509
  "aria-rowspan",
510
510
  "aria-setsize"
511
- ]), qe = /* @__PURE__ */ new Set([
511
+ ]), Re = /* @__PURE__ */ new Set([
512
512
  "aria-valuemax",
513
513
  "aria-valuemin",
514
514
  "aria-valuenow"
@@ -540,7 +540,7 @@ const Le = /* @__PURE__ */ new Set([
540
540
  "suggestion",
541
541
  "term",
542
542
  "time"
543
- ]), Re = {
543
+ ]), Ne = {
544
544
  abbr: !0,
545
545
  bdi: !0,
546
546
  bdo: !0,
@@ -568,7 +568,7 @@ const Le = /* @__PURE__ */ new Set([
568
568
  u: !0,
569
569
  var: !0,
570
570
  wbr: !0
571
- }, Ne = {
571
+ }, Me = {
572
572
  alert: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
573
573
  article: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
574
574
  banner: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
@@ -602,7 +602,7 @@ const Le = /* @__PURE__ */ new Set([
602
602
  tooltip: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"])
603
603
  };
604
604
  let T = null, L = null;
605
- function Me() {
605
+ function $e() {
606
606
  T = null, L = null;
607
607
  }
608
608
  function z(t) {
@@ -617,10 +617,10 @@ function z(t) {
617
617
  break;
618
618
  }
619
619
  if (!o) continue;
620
- let s, u;
621
- const h = () => (s === void 0 && (s = d(r), u = c(r)), { selector: s, html: u });
620
+ let s, d;
621
+ const h = () => (s === void 0 && (s = u(r), d = c(r)), { selector: s, html: d });
622
622
  for (const l of r.attributes)
623
- if (l.name.startsWith("aria-") && !Le.has(l.name)) {
623
+ if (l.name.startsWith("aria-") && !Ce.has(l.name)) {
624
624
  const m = h();
625
625
  a.push({
626
626
  ruleId: "aria-valid-attr",
@@ -657,7 +657,7 @@ function z(t) {
657
657
  message: `${l.name} must be "true", "false", or "mixed", got "${m}".`
658
658
  });
659
659
  }
660
- } else if (Ce.has(l.name)) {
660
+ } else if (qe.has(l.name)) {
661
661
  if (m === "" || !/^-?\d+$/.test(m)) {
662
662
  const g = h();
663
663
  e.push({
@@ -668,7 +668,7 @@ function z(t) {
668
668
  message: `${l.name} must be an integer, got "${m}".`
669
669
  });
670
670
  }
671
- } else if (qe.has(l.name)) {
671
+ } else if (Re.has(l.name)) {
672
672
  if (m === "" || isNaN(Number(m))) {
673
673
  const g = h();
674
674
  e.push({
@@ -698,7 +698,7 @@ function z(t) {
698
698
  }
699
699
  if (!p(r)) {
700
700
  const l = (n = r.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase(), m = r.tagName.toLowerCase();
701
- if (!l && Re[m]) {
701
+ if (!l && Ne[m]) {
702
702
  const g = r.hasAttribute("aria-label"), b = r.hasAttribute("aria-labelledby");
703
703
  if (g || b) {
704
704
  const f = h();
@@ -724,7 +724,7 @@ function z(t) {
724
724
  });
725
725
  }
726
726
  }
727
- const g = Ne[l];
727
+ const g = Me[l];
728
728
  if (g) {
729
729
  for (const b of r.attributes)
730
730
  if (b.name.startsWith("aria-") && g.has(b.name)) {
@@ -745,13 +745,13 @@ function z(t) {
745
745
  }
746
746
  return T = new WeakRef(t), L = { validAttr: a, validAttrValue: e, prohibitedAttr: i }, L;
747
747
  }
748
- let F = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
749
- function $e() {
750
- F = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
748
+ let _ = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
749
+ function He() {
750
+ _ = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
751
751
  }
752
752
  function A(t) {
753
- let a = F.get(t);
754
- return a || (a = getComputedStyle(t), F.set(t, a), a);
753
+ let a = _.get(t);
754
+ return a || (a = getComputedStyle(t), _.set(t, a), a);
755
755
  }
756
756
  function q(t, a, e) {
757
757
  const [i, n, r] = [t, a, e].map((o) => {
@@ -803,13 +803,13 @@ function R(t) {
803
803
  );
804
804
  return r ? [parseInt(r[1]), parseInt(r[2]), parseInt(r[3])] : null;
805
805
  }
806
- function He(t) {
806
+ function De(t) {
807
807
  const a = j.get(t);
808
808
  if (a !== void 0) return a;
809
- const e = De(t);
809
+ const e = Oe(t);
810
810
  return j.set(t, e), e;
811
811
  }
812
- function De(t) {
812
+ function Oe(t) {
813
813
  let a = t;
814
814
  for (; a; ) {
815
815
  const e = A(a), i = e.backgroundImage;
@@ -828,20 +828,20 @@ function De(t) {
828
828
  }
829
829
  return [255, 255, 255];
830
830
  }
831
- const Oe = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
832
- function We(t) {
831
+ const We = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
832
+ function Be(t) {
833
833
  const a = P.get(t);
834
834
  if (a !== void 0) return a;
835
- const e = Be(t);
835
+ const e = Fe(t);
836
836
  return P.set(t, e), e;
837
837
  }
838
- function Be(t) {
838
+ function Fe(t) {
839
839
  let a = t, e = !1;
840
840
  for (; a; ) {
841
841
  const i = A(a).position;
842
842
  if ((i === "absolute" || i === "fixed") && (e = !0), a !== t && i !== "static") {
843
843
  for (const n of a.children)
844
- if (!(n === t || n.contains(t)) && Oe.has(n.tagName)) {
844
+ if (!(n === t || n.contains(t)) && We.has(n.tagName)) {
845
845
  if (e) return !0;
846
846
  const r = A(n).position;
847
847
  if (r === "absolute" || r === "fixed") return !0;
@@ -856,7 +856,7 @@ function _e(t) {
856
856
  const a = parseFloat(t);
857
857
  return t.endsWith("pt") ? a * (4 / 3) : a;
858
858
  }
859
- function Fe(t) {
859
+ function je(t) {
860
860
  const a = A(t), e = _e(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
861
861
  return e >= 23.5 || e >= 18.5 && i >= 700;
862
862
  }
@@ -874,8 +874,8 @@ function H(t) {
874
874
  }
875
875
  const n = t.parentElement;
876
876
  if (n && n !== e) {
877
- const s = t instanceof HTMLImageElement && t.alt || "", u = (o = n.textContent) == null ? void 0 : o.replace(s, "").trim().slice(0, 100);
878
- u && a.push(`Adjacent text: ${u}`);
877
+ const s = t instanceof HTMLImageElement && t.alt || "", d = (o = n.textContent) == null ? void 0 : o.replace(s, "").trim().slice(0, 100);
878
+ d && a.push(`Adjacent text: ${d}`);
879
879
  }
880
880
  return a.length > 0 ? a.join(`
881
881
  `) : void 0;
@@ -888,7 +888,7 @@ function J(t) {
888
888
  }
889
889
  return !1;
890
890
  }
891
- const je = {
891
+ const Pe = {
892
892
  id: "img-alt",
893
893
  wcag: ["1.1.1"],
894
894
  level: "A",
@@ -908,7 +908,7 @@ const je = {
908
908
  if (n !== null && n.trim() === "" && n !== "") {
909
909
  a.push({
910
910
  ruleId: "img-alt",
911
- selector: d(e),
911
+ selector: u(e),
912
912
  html: c(e),
913
913
  impact: "critical",
914
914
  message: 'Image has whitespace-only alt text. Use alt="" for decorative images or provide descriptive text.',
@@ -918,7 +918,7 @@ const je = {
918
918
  }
919
919
  !e.hasAttribute("alt") && !v(e) && a.push({
920
920
  ruleId: "img-alt",
921
- selector: d(e),
921
+ selector: u(e),
922
922
  html: c(e),
923
923
  impact: "critical",
924
924
  message: "Image element missing alt attribute.",
@@ -928,7 +928,7 @@ const je = {
928
928
  for (const e of t.querySelectorAll('[role="img"]:not(img):not(svg)'))
929
929
  p(e) || J(e) || v(e) || a.push({
930
930
  ruleId: "img-alt",
931
- selector: d(e),
931
+ selector: u(e),
932
932
  html: c(e),
933
933
  impact: "critical",
934
934
  message: 'Element with role="img" has no accessible name. Add aria-label or aria-labelledby.',
@@ -937,15 +937,15 @@ const je = {
937
937
  return a;
938
938
  }
939
939
  };
940
- function Pe(t) {
940
+ function Ve(t) {
941
941
  var r, o, s;
942
942
  const a = t.getAttribute("aria-labelledby");
943
943
  if (a) {
944
- const u = a.split(/\s+/).map((h) => {
944
+ const d = a.split(/\s+/).map((h) => {
945
945
  var l, m;
946
946
  return ((m = (l = t.ownerDocument.getElementById(h)) == null ? void 0 : l.textContent) == null ? void 0 : m.trim()) ?? "";
947
947
  }).filter(Boolean);
948
- if (u.length) return u.join(" ");
948
+ if (d.length) return d.join(" ");
949
949
  }
950
950
  const e = (r = t.getAttribute("aria-label")) == null ? void 0 : r.trim();
951
951
  if (e) return e;
@@ -954,7 +954,7 @@ function Pe(t) {
954
954
  const n = (s = t.getAttribute("title")) == null ? void 0 : s.trim();
955
955
  return n || "";
956
956
  }
957
- const Ve = {
957
+ const ze = {
958
958
  id: "svg-img-alt",
959
959
  wcag: ["1.1.1"],
960
960
  level: "A",
@@ -965,11 +965,11 @@ const Ve = {
965
965
  const a = [], e = 'svg[role="img"], [role="graphics-document"], [role="graphics-symbol"]';
966
966
  for (const i of t.querySelectorAll(e)) {
967
967
  if (p(i)) continue;
968
- if (!Pe(i)) {
968
+ if (!Ve(i)) {
969
969
  const r = i.getAttribute("role");
970
970
  a.push({
971
971
  ruleId: "svg-img-alt",
972
- selector: d(i),
972
+ selector: u(i),
973
973
  html: c(i),
974
974
  impact: "serious",
975
975
  message: `${i.tagName.toLowerCase()} with role='${r}' has no accessible name.`
@@ -978,7 +978,7 @@ const Ve = {
978
978
  }
979
979
  return a;
980
980
  }
981
- }, ze = {
981
+ }, Ue = {
982
982
  id: "input-image-alt",
983
983
  wcag: ["1.1.1", "4.1.2"],
984
984
  level: "A",
@@ -990,14 +990,14 @@ const Ve = {
990
990
  for (const e of t.querySelectorAll('input[type="image"]'))
991
991
  p(e) || v(e) || a.push({
992
992
  ruleId: "input-image-alt",
993
- selector: d(e),
993
+ selector: u(e),
994
994
  html: c(e),
995
995
  impact: "critical",
996
996
  message: "Image input missing alt text."
997
997
  });
998
998
  return a;
999
999
  }
1000
- }, Ue = {
1000
+ }, Ge = {
1001
1001
  id: "image-redundant-alt",
1002
1002
  wcag: [],
1003
1003
  level: "A",
@@ -1016,7 +1016,7 @@ const Ve = {
1016
1016
  const o = ((e = r.textContent) == null ? void 0 : e.trim().toLowerCase()) || "";
1017
1017
  o && o === n && a.push({
1018
1018
  ruleId: "image-redundant-alt",
1019
- selector: d(i),
1019
+ selector: u(i),
1020
1020
  html: c(i),
1021
1021
  impact: "minor",
1022
1022
  message: `Alt text "${i.getAttribute("alt")}" duplicates surrounding ${r.tagName.toLowerCase()} text.`
@@ -1025,7 +1025,7 @@ const Ve = {
1025
1025
  }
1026
1026
  return a;
1027
1027
  }
1028
- }, Ge = ["image", "picture", "photo", "graphic", "icon", "img"], Xe = {
1028
+ }, Xe = ["image", "picture", "photo", "graphic", "icon", "img"], Ye = {
1029
1029
  id: "image-alt-redundant-words",
1030
1030
  wcag: [],
1031
1031
  level: "A",
@@ -1037,9 +1037,9 @@ const Ve = {
1037
1037
  const a = [];
1038
1038
  for (const e of t.querySelectorAll("img[alt]")) {
1039
1039
  const i = e.getAttribute("alt").toLowerCase();
1040
- i && Ge.some((n) => i.split(/\s+/).includes(n)) && a.push({
1040
+ i && Xe.some((n) => i.split(/\s+/).includes(n)) && a.push({
1041
1041
  ruleId: "image-alt-redundant-words",
1042
- selector: d(e),
1042
+ selector: u(e),
1043
1043
  html: c(e),
1044
1044
  impact: "minor",
1045
1045
  message: `Alt text "${e.getAttribute("alt")}" contains redundant word(s).`
@@ -1047,7 +1047,7 @@ const Ve = {
1047
1047
  }
1048
1048
  return a;
1049
1049
  }
1050
- }, Ye = {
1050
+ }, Ke = {
1051
1051
  id: "area-alt",
1052
1052
  wcag: ["1.1.1", "4.1.2"],
1053
1053
  level: "A",
@@ -1060,7 +1060,7 @@ const Ve = {
1060
1060
  if (p(e)) continue;
1061
1061
  v(e) || a.push({
1062
1062
  ruleId: "area-alt",
1063
- selector: d(e),
1063
+ selector: u(e),
1064
1064
  html: c(e),
1065
1065
  impact: "critical",
1066
1066
  message: "Image map <area> element is missing alternative text."
@@ -1069,13 +1069,13 @@ const Ve = {
1069
1069
  return a;
1070
1070
  }
1071
1071
  };
1072
- function Ke(t) {
1072
+ function Qe(t) {
1073
1073
  var n, r;
1074
1074
  const a = t.getAttribute("aria-labelledby");
1075
1075
  if (a) {
1076
1076
  const o = a.split(/\s+/).map((s) => {
1077
- var u, h;
1078
- return ((h = (u = t.ownerDocument.getElementById(s)) == null ? void 0 : u.textContent) == null ? void 0 : h.trim()) ?? "";
1077
+ var d, h;
1078
+ return ((h = (d = t.ownerDocument.getElementById(s)) == null ? void 0 : d.textContent) == null ? void 0 : h.trim()) ?? "";
1079
1079
  }).filter(Boolean);
1080
1080
  if (o.length) return o.join(" ");
1081
1081
  }
@@ -1084,7 +1084,7 @@ function Ke(t) {
1084
1084
  const i = (r = t.getAttribute("title")) == null ? void 0 : r.trim();
1085
1085
  return i || "";
1086
1086
  }
1087
- const Qe = {
1087
+ const Je = {
1088
1088
  id: "object-alt",
1089
1089
  wcag: ["1.1.1"],
1090
1090
  level: "A",
@@ -1104,7 +1104,7 @@ const Qe = {
1104
1104
  }
1105
1105
  n = n.parentElement;
1106
1106
  }
1107
- if (r || i.getAttribute("role") === "presentation" || i.getAttribute("role") === "none" || Ke(i)) continue;
1107
+ if (r || i.getAttribute("role") === "presentation" || i.getAttribute("role") === "none" || Qe(i)) continue;
1108
1108
  const o = i.getAttribute("data") || "";
1109
1109
  if (!((i.getAttribute("type") || "").startsWith("image/") || /\.(png|jpg|jpeg|gif|svg|webp|bmp|ico)$/i.test(o))) {
1110
1110
  const h = i.querySelector("img[alt]");
@@ -1112,7 +1112,7 @@ const Qe = {
1112
1112
  }
1113
1113
  a.push({
1114
1114
  ruleId: "object-alt",
1115
- selector: d(i),
1115
+ selector: u(i),
1116
1116
  html: c(i),
1117
1117
  impact: "serious",
1118
1118
  message: "<object> element is missing alternative text. Add aria-label, aria-labelledby, or a title attribute."
@@ -1120,7 +1120,7 @@ const Qe = {
1120
1120
  }
1121
1121
  return a;
1122
1122
  }
1123
- }, Je = {
1123
+ }, Ze = {
1124
1124
  id: "role-img-alt",
1125
1125
  wcag: ["1.1.1"],
1126
1126
  level: "A",
@@ -1133,7 +1133,7 @@ const Qe = {
1133
1133
  if (p(e) || e.tagName.toLowerCase() === "svg" || e.tagName.toLowerCase() === "img") continue;
1134
1134
  v(e) || a.push({
1135
1135
  ruleId: "role-img-alt",
1136
- selector: d(e),
1136
+ selector: u(e),
1137
1137
  html: c(e),
1138
1138
  impact: "serious",
1139
1139
  message: "Element with role='img' has no accessible name. Add aria-label or aria-labelledby."
@@ -1142,7 +1142,7 @@ const Qe = {
1142
1142
  return a;
1143
1143
  }
1144
1144
  };
1145
- function yi(t) {
1145
+ function Ai(t) {
1146
1146
  if (typeof t != "object" || t === null)
1147
1147
  return "Rule spec must be an object";
1148
1148
  const a = t;
@@ -1172,10 +1172,10 @@ function yi(t) {
1172
1172
  return "Rule must have a wcag array";
1173
1173
  if (typeof a.level != "string" || !["A", "AA"].includes(a.level))
1174
1174
  return "Rule must have level A or AA";
1175
- const n = Ze(e);
1175
+ const n = et(e);
1176
1176
  return n || null;
1177
1177
  }
1178
- function Ze(t) {
1178
+ function et(t) {
1179
1179
  switch (t.type) {
1180
1180
  case "selector-exists":
1181
1181
  return null;
@@ -1218,7 +1218,7 @@ function k(t) {
1218
1218
  for (const n of e.querySelectorAll(t.selector))
1219
1219
  a && p(n) || i.push({
1220
1220
  ruleId: t.id,
1221
- selector: d(n),
1221
+ selector: u(n),
1222
1222
  html: c(n),
1223
1223
  impact: t.impact,
1224
1224
  message: x(t.message, n, t.check),
@@ -1230,10 +1230,10 @@ function k(t) {
1230
1230
  const { attribute: n, operator: r, value: o } = t.check;
1231
1231
  for (const s of e.querySelectorAll(t.selector)) {
1232
1232
  if (a && p(s)) continue;
1233
- const u = s.getAttribute(n);
1234
- u !== null && et(u, r, o) && i.push({
1233
+ const d = s.getAttribute(n);
1234
+ d !== null && tt(d, r, o) && i.push({
1235
1235
  ruleId: t.id,
1236
- selector: d(s),
1236
+ selector: u(s),
1237
1237
  html: c(s),
1238
1238
  impact: t.impact,
1239
1239
  message: x(t.message, s, t.check),
@@ -1247,7 +1247,7 @@ function k(t) {
1247
1247
  for (const r of e.querySelectorAll(t.selector))
1248
1248
  a && p(r) || r.hasAttribute(n) || i.push({
1249
1249
  ruleId: t.id,
1250
- selector: d(r),
1250
+ selector: u(r),
1251
1251
  html: c(r),
1252
1252
  impact: t.impact,
1253
1253
  message: x(t.message, r, t.check),
@@ -1257,9 +1257,9 @@ function k(t) {
1257
1257
  }
1258
1258
  case "attribute-regex": {
1259
1259
  const { attribute: n, pattern: r, flags: o, shouldMatch: s } = t.check;
1260
- let u;
1260
+ let d;
1261
1261
  try {
1262
- u = new RegExp(r, o);
1262
+ d = new RegExp(r, o);
1263
1263
  } catch {
1264
1264
  break;
1265
1265
  }
@@ -1267,17 +1267,17 @@ function k(t) {
1267
1267
  if (a && p(h)) continue;
1268
1268
  const l = h.getAttribute(n);
1269
1269
  if (l === null) continue;
1270
- const m = u.test(l);
1270
+ const m = d.test(l);
1271
1271
  s && !m ? i.push({
1272
1272
  ruleId: t.id,
1273
- selector: d(h),
1273
+ selector: u(h),
1274
1274
  html: c(h),
1275
1275
  impact: t.impact,
1276
1276
  message: x(t.message, h, t.check),
1277
1277
  element: h
1278
1278
  }) : !s && m && i.push({
1279
1279
  ruleId: t.id,
1280
- selector: d(h),
1280
+ selector: u(h),
1281
1281
  html: c(h),
1282
1282
  impact: t.impact,
1283
1283
  message: x(t.message, h, t.check),
@@ -1291,7 +1291,7 @@ function k(t) {
1291
1291
  for (const r of e.querySelectorAll(t.selector))
1292
1292
  a && p(r) || r.querySelector(n) || i.push({
1293
1293
  ruleId: t.id,
1294
- selector: d(r),
1294
+ selector: u(r),
1295
1295
  html: c(r),
1296
1296
  impact: t.impact,
1297
1297
  message: x(t.message, r, t.check),
@@ -1309,7 +1309,7 @@ function k(t) {
1309
1309
  if (!n.has(o.tagName.toLowerCase())) {
1310
1310
  i.push({
1311
1311
  ruleId: t.id,
1312
- selector: d(o),
1312
+ selector: u(o),
1313
1313
  html: c(o),
1314
1314
  impact: t.impact,
1315
1315
  message: x(t.message, o, t.check),
@@ -1325,7 +1325,7 @@ function k(t) {
1325
1325
  }
1326
1326
  };
1327
1327
  }
1328
- function et(t, a, e) {
1328
+ function tt(t, a, e) {
1329
1329
  switch (a) {
1330
1330
  case ">":
1331
1331
  return parseFloat(t) > e;
@@ -1343,7 +1343,7 @@ function et(t, a, e) {
1343
1343
  return !1;
1344
1344
  }
1345
1345
  }
1346
- const tt = {
1346
+ const at = {
1347
1347
  id: "server-side-image-map",
1348
1348
  selector: "img[ismap], input[type='image'][ismap]",
1349
1349
  check: { type: "selector-exists" },
@@ -1354,7 +1354,7 @@ const tt = {
1354
1354
  level: "A",
1355
1355
  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.",
1356
1356
  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."
1357
- }, at = k(tt), it = [
1357
+ }, it = k(at), nt = [
1358
1358
  '[role="checkbox"]',
1359
1359
  '[role="combobox"]',
1360
1360
  '[role="listbox"]',
@@ -1366,13 +1366,13 @@ const tt = {
1366
1366
  '[role="spinbutton"]',
1367
1367
  '[role="switch"]',
1368
1368
  '[role="textbox"]'
1369
- ].join(", "), nt = /* @__PURE__ */ new Set([
1369
+ ].join(", "), rt = /* @__PURE__ */ new Set([
1370
1370
  "checkbox",
1371
1371
  "menuitemcheckbox",
1372
1372
  "menuitemradio",
1373
1373
  "radio",
1374
1374
  "switch"
1375
- ]), rt = /* @__PURE__ */ new Set([
1375
+ ]), ot = /* @__PURE__ */ new Set([
1376
1376
  "combobox",
1377
1377
  "listbox",
1378
1378
  "searchbox",
@@ -1380,10 +1380,10 @@ const tt = {
1380
1380
  "spinbutton",
1381
1381
  "textbox"
1382
1382
  ]);
1383
- function ot(t) {
1384
- var o, s, u, h;
1383
+ function st(t) {
1384
+ var o, s, d, h;
1385
1385
  const a = (o = t.getAttribute("role")) == null ? void 0 : o.trim().toLowerCase();
1386
- if (a && nt.has(a) || (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && !(a && rt.has(a)))
1386
+ if (a && rt.has(a) || (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && !(a && ot.has(a)))
1387
1387
  return v(t);
1388
1388
  const i = t.getAttribute("aria-labelledby");
1389
1389
  if (i) {
@@ -1409,7 +1409,7 @@ function ot(t) {
1409
1409
  if (m) return m;
1410
1410
  }
1411
1411
  }
1412
- const r = (u = t.getAttribute("title")) == null ? void 0 : u.trim();
1412
+ const r = (d = t.getAttribute("title")) == null ? void 0 : d.trim();
1413
1413
  if (r) return r;
1414
1414
  if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) {
1415
1415
  const l = (h = t.getAttribute("placeholder")) == null ? void 0 : h.trim();
@@ -1417,7 +1417,7 @@ function ot(t) {
1417
1417
  }
1418
1418
  return "";
1419
1419
  }
1420
- const st = {
1420
+ const lt = {
1421
1421
  id: "label",
1422
1422
  wcag: ["4.1.2"],
1423
1423
  level: "A",
@@ -1426,14 +1426,14 @@ const st = {
1426
1426
  prompt: "Based on the input type, name attribute, or placeholder, suggest a label element with appropriate text, or an aria-label.",
1427
1427
  run(t) {
1428
1428
  var n;
1429
- const a = [], i = t.querySelectorAll(`input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, ${it}`);
1429
+ const a = [], i = t.querySelectorAll(`input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, ${nt}`);
1430
1430
  for (const r of i) {
1431
1431
  if (p(r) || r instanceof HTMLElement && (r.hidden || r.style.display === "none")) continue;
1432
1432
  const o = (n = r.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase();
1433
1433
  if (o === "presentation" || o === "none") continue;
1434
- ot(r) || a.push({
1434
+ st(r) || a.push({
1435
1435
  ruleId: "label",
1436
- selector: d(r),
1436
+ selector: u(r),
1437
1437
  html: c(r),
1438
1438
  impact: "critical",
1439
1439
  message: "Form element has no accessible label."
@@ -1441,7 +1441,7 @@ const st = {
1441
1441
  }
1442
1442
  return a;
1443
1443
  }
1444
- }, lt = {
1444
+ }, ct = {
1445
1445
  id: "form-field-multiple-labels",
1446
1446
  wcag: [],
1447
1447
  level: "A",
@@ -1465,7 +1465,7 @@ const st = {
1465
1465
  const s = n.length + r;
1466
1466
  s > 1 && a.push({
1467
1467
  ruleId: "form-field-multiple-labels",
1468
- selector: d(i),
1468
+ selector: u(i),
1469
1469
  html: c(i),
1470
1470
  impact: "moderate",
1471
1471
  message: `Form field has ${s} labels. Use a single label element.`
@@ -1473,7 +1473,7 @@ const st = {
1473
1473
  }
1474
1474
  return a;
1475
1475
  }
1476
- }, ct = {
1476
+ }, ut = {
1477
1477
  id: "select-name",
1478
1478
  wcag: ["4.1.2"],
1479
1479
  level: "A",
@@ -1485,14 +1485,14 @@ const st = {
1485
1485
  for (const e of t.querySelectorAll("select"))
1486
1486
  p(e) || v(e) || a.push({
1487
1487
  ruleId: "select-name",
1488
- selector: d(e),
1488
+ selector: u(e),
1489
1489
  html: c(e),
1490
1490
  impact: "critical",
1491
1491
  message: "Select element has no accessible name."
1492
1492
  });
1493
1493
  return a;
1494
1494
  }
1495
- }, ut = {
1495
+ }, dt = {
1496
1496
  id: "input-button-name",
1497
1497
  wcag: ["4.1.2"],
1498
1498
  level: "A",
@@ -1509,7 +1509,7 @@ const st = {
1509
1509
  const r = (e = n.getAttribute("value")) == null ? void 0 : e.trim(), o = (i = n.getAttribute("type")) == null ? void 0 : i.toLowerCase(), s = (o === "submit" || o === "reset") && !n.hasAttribute("value");
1510
1510
  !r && !s && !v(n) && a.push({
1511
1511
  ruleId: "input-button-name",
1512
- selector: d(n),
1512
+ selector: u(n),
1513
1513
  html: c(n),
1514
1514
  impact: "critical",
1515
1515
  message: "Input button has no discernible text."
@@ -1517,7 +1517,7 @@ const st = {
1517
1517
  }
1518
1518
  return a;
1519
1519
  }
1520
- }, dt = /* @__PURE__ */ new Set([
1520
+ }, mt = /* @__PURE__ */ new Set([
1521
1521
  "off",
1522
1522
  "on",
1523
1523
  "name",
@@ -1572,7 +1572,7 @@ const st = {
1572
1572
  "impp",
1573
1573
  "url",
1574
1574
  "photo"
1575
- ]), mt = /* @__PURE__ */ new Set([
1575
+ ]), ht = /* @__PURE__ */ new Set([
1576
1576
  "tel",
1577
1577
  "tel-country-code",
1578
1578
  "tel-national",
@@ -1581,18 +1581,18 @@ const st = {
1581
1581
  "tel-extension",
1582
1582
  "email",
1583
1583
  "impp"
1584
- ]), ht = /* @__PURE__ */ new Set(["home", "work", "mobile", "fax", "pager"]), pt = /* @__PURE__ */ new Set(["shipping", "billing"]), gt = /* @__PURE__ */ new Set(["webauthn"]);
1585
- function bt(t) {
1584
+ ]), pt = /* @__PURE__ */ new Set(["home", "work", "mobile", "fax", "pager"]), gt = /* @__PURE__ */ new Set(["shipping", "billing"]), bt = /* @__PURE__ */ new Set(["webauthn"]);
1585
+ function ft(t) {
1586
1586
  const a = t.toLowerCase().split(/\s+/).filter(Boolean);
1587
1587
  if (a.length === 0) return !0;
1588
1588
  let e = 0;
1589
- a[e].startsWith("section-") && e++, e < a.length && pt.has(a[e]) && e++;
1589
+ a[e].startsWith("section-") && e++, e < a.length && gt.has(a[e]) && e++;
1590
1590
  let i = !1;
1591
- if (e < a.length && ht.has(a[e]) && (i = !0, e++), e >= a.length) return !1;
1591
+ if (e < a.length && pt.has(a[e]) && (i = !0, e++), e >= a.length) return !1;
1592
1592
  const n = a[e];
1593
- return !dt.has(n) || i && !mt.has(n) ? !1 : (e++, e < a.length && gt.has(a[e]) && e++, e === a.length);
1593
+ return !mt.has(n) || i && !ht.has(n) ? !1 : (e++, e < a.length && bt.has(a[e]) && e++, e === a.length);
1594
1594
  }
1595
- const ft = {
1595
+ const vt = {
1596
1596
  id: "autocomplete-valid",
1597
1597
  wcag: ["1.3.5"],
1598
1598
  level: "AA",
@@ -1604,9 +1604,9 @@ const ft = {
1604
1604
  for (const e of t.querySelectorAll("[autocomplete]")) {
1605
1605
  if (p(e) || e instanceof HTMLElement && e.style.display === "none" || e.disabled || e.getAttribute("aria-disabled") === "true") continue;
1606
1606
  const i = e.getAttribute("autocomplete").trim();
1607
- i && (bt(i) || a.push({
1607
+ i && (ft(i) || a.push({
1608
1608
  ruleId: "autocomplete-valid",
1609
- selector: d(e),
1609
+ selector: u(e),
1610
1610
  html: c(e),
1611
1611
  impact: "serious",
1612
1612
  message: `Invalid autocomplete value "${i}".`
@@ -1638,7 +1638,7 @@ function V(t) {
1638
1638
  }
1639
1639
  return a;
1640
1640
  }
1641
- const vt = {
1641
+ const wt = {
1642
1642
  id: "label-content-name-mismatch",
1643
1643
  wcag: ["2.5.3"],
1644
1644
  level: "A",
@@ -1658,7 +1658,7 @@ const vt = {
1658
1658
  const o = e.hasAttribute("aria-label"), s = e.hasAttribute("aria-labelledby");
1659
1659
  !o && !s || ee(i, n) || a.push({
1660
1660
  ruleId: "label-content-name-mismatch",
1661
- selector: d(e),
1661
+ selector: u(e),
1662
1662
  html: c(e),
1663
1663
  impact: "serious",
1664
1664
  message: `Accessible name "${i}" does not contain visible text "${n.trim()}".`
@@ -1676,7 +1676,7 @@ const vt = {
1676
1676
  }
1677
1677
  o.trim() && (ee(i, o) || a.push({
1678
1678
  ruleId: "label-content-name-mismatch",
1679
- selector: d(e),
1679
+ selector: u(e),
1680
1680
  html: c(e),
1681
1681
  impact: "serious",
1682
1682
  message: `Accessible name "${i}" does not contain visible label "${o.trim()}".`
@@ -1684,7 +1684,7 @@ const vt = {
1684
1684
  }
1685
1685
  return a;
1686
1686
  }
1687
- }, wt = {
1687
+ }, yt = {
1688
1688
  id: "label-title-only",
1689
1689
  wcag: [],
1690
1690
  level: "A",
@@ -1699,7 +1699,7 @@ const vt = {
1699
1699
  );
1700
1700
  for (const s of e) {
1701
1701
  if (p(s)) continue;
1702
- const u = s.hasAttribute("title") && ((i = s.getAttribute("title")) == null ? void 0 : i.trim()), h = s.hasAttribute("aria-label") && ((n = s.getAttribute("aria-label")) == null ? void 0 : n.trim()), l = s.hasAttribute("aria-labelledby");
1702
+ const d = s.hasAttribute("title") && ((i = s.getAttribute("title")) == null ? void 0 : i.trim()), h = s.hasAttribute("aria-label") && ((n = s.getAttribute("aria-label")) == null ? void 0 : n.trim()), l = s.hasAttribute("aria-labelledby");
1703
1703
  let m = !1;
1704
1704
  const g = s.id;
1705
1705
  if (g) {
@@ -1707,9 +1707,9 @@ const vt = {
1707
1707
  (r = f == null ? void 0 : f.textContent) != null && r.trim() && (m = !0);
1708
1708
  }
1709
1709
  const b = s.closest("label");
1710
- (o = b == null ? void 0 : b.textContent) != null && o.trim() && (m = !0), u && !h && !l && !m && a.push({
1710
+ (o = b == null ? void 0 : b.textContent) != null && o.trim() && (m = !0), d && !h && !l && !m && a.push({
1711
1711
  ruleId: "label-title-only",
1712
- selector: d(s),
1712
+ selector: u(s),
1713
1713
  html: c(s),
1714
1714
  impact: "serious",
1715
1715
  message: "Form element uses title attribute as only label. Use <label>, aria-label, or aria-labelledby instead."
@@ -1717,7 +1717,7 @@ const vt = {
1717
1717
  }
1718
1718
  return a;
1719
1719
  }
1720
- }, yt = {
1720
+ }, At = {
1721
1721
  id: "tabindex",
1722
1722
  selector: "[tabindex]",
1723
1723
  check: { type: "attribute-value", attribute: "tabindex", operator: ">", value: 0 },
@@ -1729,7 +1729,7 @@ const vt = {
1729
1729
  tags: ["best-practice"],
1730
1730
  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.",
1731
1731
  prompt: "Change the positive tabindex value to tabindex='0' and rely on DOM order for tab sequence instead."
1732
- }, At = k(yt), St = /* @__PURE__ */ new Set([
1732
+ }, St = k(At), xt = /* @__PURE__ */ new Set([
1733
1733
  "div",
1734
1734
  "span",
1735
1735
  "p",
@@ -1756,7 +1756,7 @@ const vt = {
1756
1756
  "tr",
1757
1757
  "td",
1758
1758
  "th"
1759
- ]), xt = {
1759
+ ]), kt = {
1760
1760
  id: "focus-order-semantics",
1761
1761
  wcag: [],
1762
1762
  tags: ["best-practice"],
@@ -1768,10 +1768,10 @@ const vt = {
1768
1768
  const a = [];
1769
1769
  for (const e of t.querySelectorAll('[tabindex="0"]')) {
1770
1770
  const i = e.tagName.toLowerCase();
1771
- if (!St.has(i)) continue;
1771
+ if (!xt.has(i)) continue;
1772
1772
  e.getAttribute("role") || a.push({
1773
1773
  ruleId: "focus-order-semantics",
1774
- selector: d(e),
1774
+ selector: u(e),
1775
1775
  html: c(e),
1776
1776
  impact: "moderate",
1777
1777
  message: `Non-interactive <${i}> with tabindex="0" has no interactive role.`
@@ -1779,7 +1779,7 @@ const vt = {
1779
1779
  }
1780
1780
  return a;
1781
1781
  }
1782
- }, kt = /* @__PURE__ */ new Set([
1782
+ }, It = /* @__PURE__ */ new Set([
1783
1783
  "a",
1784
1784
  "audio",
1785
1785
  "button",
@@ -1788,7 +1788,7 @@ const vt = {
1788
1788
  "select",
1789
1789
  "textarea",
1790
1790
  "video"
1791
- ]), It = /* @__PURE__ */ new Set([
1791
+ ]), Et = /* @__PURE__ */ new Set([
1792
1792
  "button",
1793
1793
  "checkbox",
1794
1794
  "combobox",
@@ -1812,7 +1812,7 @@ const vt = {
1812
1812
  "tabpanel",
1813
1813
  "textbox",
1814
1814
  "treeitem"
1815
- ]), Et = {
1815
+ ]), Tt = {
1816
1816
  grid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader"]),
1817
1817
  listbox: /* @__PURE__ */ new Set(["option"]),
1818
1818
  menu: /* @__PURE__ */ new Set(["menuitem", "menuitemcheckbox", "menuitemradio"]),
@@ -1822,26 +1822,26 @@ const vt = {
1822
1822
  tree: /* @__PURE__ */ new Set(["treeitem"]),
1823
1823
  treegrid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader", "treeitem"])
1824
1824
  };
1825
- function Tt(t, a) {
1825
+ function Lt(t, a) {
1826
1826
  var n, r, o;
1827
1827
  const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase(), i = (r = a.getAttribute("role")) == null ? void 0 : r.toLowerCase();
1828
- return !e || !i ? !1 : ((o = Et[e]) == null ? void 0 : o.has(i)) ?? !1;
1828
+ return !e || !i ? !1 : ((o = Tt[e]) == null ? void 0 : o.has(i)) ?? !1;
1829
1829
  }
1830
- function Lt(t) {
1830
+ function Ct(t) {
1831
1831
  var n;
1832
1832
  const a = t.tagName.toLowerCase();
1833
- if (kt.has(a))
1833
+ if (It.has(a))
1834
1834
  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);
1835
1835
  const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase();
1836
- if (e && It.has(e)) return !0;
1836
+ if (e && Et.has(e)) return !0;
1837
1837
  const i = t.getAttribute("tabindex");
1838
1838
  return i !== null && i !== "-1" || t.getAttribute("contenteditable") === "true";
1839
1839
  }
1840
- function Ct(t) {
1840
+ function qt(t) {
1841
1841
  const a = t.tagName.toLowerCase();
1842
1842
  return !!(a === "a" && t.hasAttribute("href") || a === "button" && !t.disabled);
1843
1843
  }
1844
- const qt = {
1844
+ const Rt = {
1845
1845
  id: "nested-interactive",
1846
1846
  wcag: ["4.1.2"],
1847
1847
  level: "A",
@@ -1856,24 +1856,24 @@ const qt = {
1856
1856
  for (; o; ) {
1857
1857
  for (; r.length > 0 && !r[r.length - 1].contains(o); )
1858
1858
  r.pop();
1859
- if (!p(o) && Lt(o)) {
1859
+ if (!p(o) && Ct(o)) {
1860
1860
  if (r.length > 0) {
1861
1861
  const s = r[r.length - 1];
1862
- Tt(s, o) || a.push({
1862
+ Lt(s, o) || a.push({
1863
1863
  ruleId: "nested-interactive",
1864
- selector: d(o),
1864
+ selector: u(o),
1865
1865
  html: c(o),
1866
1866
  impact: "serious",
1867
1867
  message: `Interactive element <${o.tagName.toLowerCase()}> is nested inside <${s.tagName.toLowerCase()}>.`
1868
1868
  });
1869
1869
  }
1870
- Ct(o) && r.push(o);
1870
+ qt(o) && r.push(o);
1871
1871
  }
1872
1872
  o = n.nextNode();
1873
1873
  }
1874
1874
  return a;
1875
1875
  }
1876
- }, Rt = {
1876
+ }, Nt = {
1877
1877
  id: "scrollable-region-focusable",
1878
1878
  wcag: ["2.1.1"],
1879
1879
  level: "A",
@@ -1892,12 +1892,12 @@ const qt = {
1892
1892
  const l = i.height !== "" || i.maxHeight !== "", m = e.textContent != null && e.textContent.trim().length > 0;
1893
1893
  if (!l || !m) continue;
1894
1894
  }
1895
- const u = e.getAttribute("tabindex");
1896
- u !== null && u !== "-1" || e.querySelector(
1895
+ const d = e.getAttribute("tabindex");
1896
+ d !== null && d !== "-1" || e.querySelector(
1897
1897
  'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
1898
1898
  ) || a.push({
1899
1899
  ruleId: "scrollable-region-focusable",
1900
- selector: d(e),
1900
+ selector: u(e),
1901
1901
  html: c(e),
1902
1902
  impact: "serious",
1903
1903
  message: "Scrollable region is not keyboard accessible. Add tabindex='0' or include focusable elements."
@@ -1905,7 +1905,7 @@ const qt = {
1905
1905
  }
1906
1906
  return a;
1907
1907
  }
1908
- }, Nt = {
1908
+ }, Mt = {
1909
1909
  id: "accesskeys",
1910
1910
  wcag: [],
1911
1911
  level: "A",
@@ -1928,14 +1928,14 @@ const qt = {
1928
1928
  for (const o of r.slice(1))
1929
1929
  a.push({
1930
1930
  ruleId: "accesskeys",
1931
- selector: d(o),
1931
+ selector: u(o),
1932
1932
  html: c(o),
1933
1933
  impact: "serious",
1934
1934
  message: `Duplicate accesskey "${n}". Each accesskey must be unique.`
1935
1935
  });
1936
1936
  return a;
1937
1937
  }
1938
- }, Mt = {
1938
+ }, $t = {
1939
1939
  id: "heading-order",
1940
1940
  wcag: [],
1941
1941
  level: "A",
@@ -1951,7 +1951,7 @@ const qt = {
1951
1951
  let o;
1952
1952
  r.hasAttribute("aria-level") ? o = parseInt(r.getAttribute("aria-level"), 10) : o = parseInt(r.tagName[1], 10), i > 0 && o > i + 1 && a.push({
1953
1953
  ruleId: "heading-order",
1954
- selector: d(r),
1954
+ selector: u(r),
1955
1955
  html: c(r),
1956
1956
  impact: "moderate",
1957
1957
  message: `Heading level ${o} skipped from level ${i}.`,
@@ -1960,7 +1960,7 @@ const qt = {
1960
1960
  }
1961
1961
  return a;
1962
1962
  }
1963
- }, N = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', te = '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"]', $t = {
1963
+ }, N = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', te = '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"]', Ht = {
1964
1964
  id: "landmark-one-main",
1965
1965
  wcag: [],
1966
1966
  level: "A",
@@ -1978,13 +1978,13 @@ const qt = {
1978
1978
  message: "Page has no main landmark."
1979
1979
  }] : a.length > 1 ? Array.from(a).slice(1).map((e) => ({
1980
1980
  ruleId: "landmark-one-main",
1981
- selector: d(e),
1981
+ selector: u(e),
1982
1982
  html: c(e),
1983
1983
  impact: "moderate",
1984
1984
  message: "Page has multiple main landmarks."
1985
1985
  })) : [];
1986
1986
  }
1987
- }, Ht = {
1987
+ }, Dt = {
1988
1988
  id: "landmark-no-duplicate-banner",
1989
1989
  wcag: [],
1990
1990
  level: "A",
@@ -1997,14 +1997,14 @@ const qt = {
1997
1997
  return i.length > 1 && i.slice(1).forEach(
1998
1998
  (n) => a.push({
1999
1999
  ruleId: "landmark-no-duplicate-banner",
2000
- selector: d(n),
2000
+ selector: u(n),
2001
2001
  html: c(n),
2002
2002
  impact: "moderate",
2003
2003
  message: "Page has multiple banner landmarks."
2004
2004
  })
2005
2005
  ), a;
2006
2006
  }
2007
- }, Dt = {
2007
+ }, Ot = {
2008
2008
  id: "landmark-no-duplicate-contentinfo",
2009
2009
  wcag: [],
2010
2010
  level: "A",
@@ -2017,14 +2017,14 @@ const qt = {
2017
2017
  return i.length > 1 && i.slice(1).forEach(
2018
2018
  (n) => a.push({
2019
2019
  ruleId: "landmark-no-duplicate-contentinfo",
2020
- selector: d(n),
2020
+ selector: u(n),
2021
2021
  html: c(n),
2022
2022
  impact: "moderate",
2023
2023
  message: "Page has multiple contentinfo landmarks."
2024
2024
  })
2025
2025
  ), a;
2026
2026
  }
2027
- }, Ot = {
2027
+ }, Wt = {
2028
2028
  id: "landmark-no-duplicate-main",
2029
2029
  wcag: [],
2030
2030
  level: "A",
@@ -2037,14 +2037,14 @@ const qt = {
2037
2037
  return e.length > 1 && Array.from(e).slice(1).forEach(
2038
2038
  (i) => a.push({
2039
2039
  ruleId: "landmark-no-duplicate-main",
2040
- selector: d(i),
2040
+ selector: u(i),
2041
2041
  html: c(i),
2042
2042
  impact: "moderate",
2043
2043
  message: "Page has multiple main landmarks."
2044
2044
  })
2045
2045
  ), a;
2046
2046
  }
2047
- }, Wt = {
2047
+ }, Bt = {
2048
2048
  id: "landmark-banner-is-top-level",
2049
2049
  wcag: [],
2050
2050
  level: "A",
@@ -2057,14 +2057,14 @@ const qt = {
2057
2057
  for (const i of e)
2058
2058
  i.closest(N) && a.push({
2059
2059
  ruleId: "landmark-banner-is-top-level",
2060
- selector: d(i),
2060
+ selector: u(i),
2061
2061
  html: c(i),
2062
2062
  impact: "moderate",
2063
2063
  message: "Banner landmark is nested within another landmark."
2064
2064
  });
2065
2065
  return a;
2066
2066
  }
2067
- }, Bt = {
2067
+ }, Ft = {
2068
2068
  id: "landmark-contentinfo-is-top-level",
2069
2069
  wcag: [],
2070
2070
  level: "A",
@@ -2077,7 +2077,7 @@ const qt = {
2077
2077
  for (const i of e)
2078
2078
  i.closest(N) && a.push({
2079
2079
  ruleId: "landmark-contentinfo-is-top-level",
2080
- selector: d(i),
2080
+ selector: u(i),
2081
2081
  html: c(i),
2082
2082
  impact: "moderate",
2083
2083
  message: "Contentinfo landmark is nested within another landmark."
@@ -2098,7 +2098,7 @@ const qt = {
2098
2098
  const n = i.parentElement;
2099
2099
  n != null && n.closest('article, aside, nav, section, [role="article"], [role="complementary"], [role="navigation"], [role="region"]') && a.push({
2100
2100
  ruleId: "landmark-main-is-top-level",
2101
- selector: d(i),
2101
+ selector: u(i),
2102
2102
  html: c(i),
2103
2103
  impact: "moderate",
2104
2104
  message: "Main landmark is nested within another landmark."
@@ -2106,7 +2106,7 @@ const qt = {
2106
2106
  }
2107
2107
  return a;
2108
2108
  }
2109
- }, Ft = {
2109
+ }, jt = {
2110
2110
  id: "landmark-complementary-is-top-level",
2111
2111
  wcag: [],
2112
2112
  level: "A",
@@ -2120,7 +2120,7 @@ const qt = {
2120
2120
  const n = i.parentElement;
2121
2121
  n && !n.matches('body, main, [role="main"]') && i.closest('article, nav, section, [role="article"], [role="navigation"], [role="region"]') && a.push({
2122
2122
  ruleId: "landmark-complementary-is-top-level",
2123
- selector: d(i),
2123
+ selector: u(i),
2124
2124
  html: c(i),
2125
2125
  impact: "moderate",
2126
2126
  message: "Complementary landmark should be top-level."
@@ -2128,7 +2128,7 @@ const qt = {
2128
2128
  }
2129
2129
  return a;
2130
2130
  }
2131
- }, jt = {
2131
+ }, Pt = {
2132
2132
  id: "landmark-unique",
2133
2133
  wcag: [],
2134
2134
  level: "A",
@@ -2148,15 +2148,15 @@ const qt = {
2148
2148
  if (r.length <= 1) continue;
2149
2149
  const o = /* @__PURE__ */ new Map();
2150
2150
  for (const s of r) {
2151
- const u = v(s).toLowerCase() || "", h = o.get(u) || [];
2152
- h.push(s), o.set(u, h);
2151
+ const d = v(s).toLowerCase() || "", h = o.get(d) || [];
2152
+ h.push(s), o.set(d, h);
2153
2153
  }
2154
- for (const [s, u] of o)
2155
- if (u.length > 1)
2156
- for (const h of u.slice(1))
2154
+ for (const [s, d] of o)
2155
+ if (d.length > 1)
2156
+ for (const h of d.slice(1))
2157
2157
  a.push({
2158
2158
  ruleId: "landmark-unique",
2159
- selector: d(h),
2159
+ selector: u(h),
2160
2160
  html: c(h),
2161
2161
  impact: "moderate",
2162
2162
  message: s ? `Multiple ${n} landmarks have the same label "${s}".` : `Multiple ${n} landmarks have no label. Add unique aria-label attributes.`
@@ -2164,7 +2164,7 @@ const qt = {
2164
2164
  }
2165
2165
  return a;
2166
2166
  }
2167
- }, Pt = {
2167
+ }, Vt = {
2168
2168
  id: "region",
2169
2169
  wcag: [],
2170
2170
  level: "A",
@@ -2181,7 +2181,7 @@ const qt = {
2181
2181
  const r = n.matches(te), o = (i = n.textContent) == null ? void 0 : i.trim();
2182
2182
  !r && o && (n.querySelector(te) || a.push({
2183
2183
  ruleId: "region",
2184
- selector: d(n),
2184
+ selector: u(n),
2185
2185
  html: c(n),
2186
2186
  impact: "moderate",
2187
2187
  message: "Content is not contained within a landmark region."
@@ -2189,7 +2189,7 @@ const qt = {
2189
2189
  }
2190
2190
  return a;
2191
2191
  }
2192
- }, Vt = {
2192
+ }, zt = {
2193
2193
  id: "list",
2194
2194
  selector: "ul, ol",
2195
2195
  check: { type: "child-invalid", allowedChildren: ["li", "script", "template"] },
@@ -2200,7 +2200,7 @@ const qt = {
2200
2200
  level: "A",
2201
2201
  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.",
2202
2202
  prompt: "Explain how to restructure this element within the list properly."
2203
- }, zt = k(Vt), Ut = {
2203
+ }, Ut = k(zt), Gt = {
2204
2204
  id: "dlitem",
2205
2205
  wcag: ["1.3.1"],
2206
2206
  level: "A",
@@ -2212,14 +2212,14 @@ const qt = {
2212
2212
  for (const e of t.querySelectorAll("dt, dd"))
2213
2213
  (!e.parentElement || e.parentElement.tagName.toLowerCase() !== "dl") && a.push({
2214
2214
  ruleId: "dlitem",
2215
- selector: d(e),
2215
+ selector: u(e),
2216
2216
  html: c(e),
2217
2217
  impact: "serious",
2218
2218
  message: `<${e.tagName.toLowerCase()}> is not contained in a <dl>.`
2219
2219
  });
2220
2220
  return a;
2221
2221
  }
2222
- }, Gt = {
2222
+ }, Xt = {
2223
2223
  id: "definition-list",
2224
2224
  selector: "dl",
2225
2225
  check: { type: "child-invalid", allowedChildren: ["dt", "dd", "div", "script", "template"] },
@@ -2230,7 +2230,7 @@ const qt = {
2230
2230
  level: "A",
2231
2231
  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.",
2232
2232
  prompt: "Explain whether to move this element outside the <dl> or convert it to dt/dd."
2233
- }, Xt = k(Gt), Yt = {
2233
+ }, Yt = k(Xt), Kt = {
2234
2234
  id: "document-title",
2235
2235
  wcag: ["2.4.2"],
2236
2236
  level: "A",
@@ -2248,7 +2248,7 @@ const qt = {
2248
2248
  message: a ? "Document <title> element is empty." : "Document is missing a <title> element."
2249
2249
  }] : [];
2250
2250
  }
2251
- }, Kt = {
2251
+ }, Qt = {
2252
2252
  id: "bypass",
2253
2253
  wcag: ["2.4.1"],
2254
2254
  level: "A",
@@ -2275,7 +2275,7 @@ const qt = {
2275
2275
  message: "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link."
2276
2276
  }];
2277
2277
  }
2278
- }, Qt = {
2278
+ }, Jt = {
2279
2279
  id: "page-has-heading-one",
2280
2280
  wcag: [],
2281
2281
  level: "A",
@@ -2297,7 +2297,14 @@ const qt = {
2297
2297
  message: "Page does not contain a level-one heading."
2298
2298
  }];
2299
2299
  }
2300
- }, Jt = {
2300
+ };
2301
+ function me(t) {
2302
+ if (!(t instanceof HTMLElement)) return !1;
2303
+ if (t.style.display === "none" || t.style.visibility === "hidden") return !0;
2304
+ const a = t.getAttribute("width"), e = t.getAttribute("height");
2305
+ return (a === "0" || a === "1") && (e === "0" || e === "1");
2306
+ }
2307
+ const Zt = {
2301
2308
  id: "frame-title",
2302
2309
  wcag: ["4.1.2"],
2303
2310
  level: "A",
@@ -2307,10 +2314,10 @@ const qt = {
2307
2314
  run(t) {
2308
2315
  const a = [];
2309
2316
  for (const e of t.querySelectorAll("iframe, frame")) {
2310
- if (p(e)) continue;
2317
+ if (p(e) || me(e)) continue;
2311
2318
  v(e) || a.push({
2312
2319
  ruleId: "frame-title",
2313
- selector: d(e),
2320
+ selector: u(e),
2314
2321
  html: c(e),
2315
2322
  impact: "serious",
2316
2323
  message: "Frame is missing an accessible name. Add a title attribute."
@@ -2318,7 +2325,7 @@ const qt = {
2318
2325
  }
2319
2326
  return a;
2320
2327
  }
2321
- }, Zt = {
2328
+ }, ea = {
2322
2329
  id: "frame-title-unique",
2323
2330
  wcag: ["4.1.2"],
2324
2331
  level: "A",
@@ -2330,13 +2337,11 @@ const qt = {
2330
2337
  var n;
2331
2338
  const a = [], e = Array.from(t.querySelectorAll("iframe[title], frame[title]")), i = /* @__PURE__ */ new Map();
2332
2339
  for (const r of e) {
2333
- if (p(r)) continue;
2334
- const o = r.getAttribute("width"), s = r.getAttribute("height");
2335
- if (o === "0" || s === "0" || r instanceof HTMLElement && r.style.display === "none" || r instanceof HTMLElement && r.style.visibility === "hidden") continue;
2336
- const u = (n = r.getAttribute("title")) == null ? void 0 : n.trim().toLowerCase();
2337
- if (u) {
2338
- const h = i.get(u) || [];
2339
- h.push(r), i.set(u, h);
2340
+ if (p(r) || me(r)) continue;
2341
+ const o = (n = r.getAttribute("title")) == null ? void 0 : n.trim().toLowerCase();
2342
+ if (o) {
2343
+ const s = i.get(o) || [];
2344
+ s.push(r), i.set(o, s);
2340
2345
  }
2341
2346
  }
2342
2347
  for (const [, r] of i)
@@ -2344,14 +2349,14 @@ const qt = {
2344
2349
  for (const o of r.slice(1))
2345
2350
  a.push({
2346
2351
  ruleId: "frame-title-unique",
2347
- selector: d(o),
2352
+ selector: u(o),
2348
2353
  html: c(o),
2349
2354
  impact: "moderate",
2350
2355
  message: "Frame title is not unique. Use a distinct title for each frame."
2351
2356
  });
2352
2357
  return a;
2353
2358
  }
2354
- }, ea = {
2359
+ }, ta = {
2355
2360
  id: "empty-heading",
2356
2361
  wcag: [],
2357
2362
  level: "A",
@@ -2364,14 +2369,14 @@ const qt = {
2364
2369
  for (const i of e)
2365
2370
  p(i) || v(i) || a.push({
2366
2371
  ruleId: "empty-heading",
2367
- selector: d(i),
2372
+ selector: u(i),
2368
2373
  html: c(i),
2369
2374
  impact: "minor",
2370
2375
  message: "Heading is empty. Add text content or remove the heading element."
2371
2376
  });
2372
2377
  return a;
2373
2378
  }
2374
- }, ta = {
2379
+ }, aa = {
2375
2380
  id: "meta-viewport",
2376
2381
  wcag: ["1.4.4"],
2377
2382
  level: "AA",
@@ -2385,7 +2390,7 @@ const qt = {
2385
2390
  const i = ((r = e.getAttribute("content")) == null ? void 0 : r.toLowerCase()) || "";
2386
2391
  (/user-scalable\s*=\s*no/i.test(i) || /user-scalable\s*=\s*0/i.test(i)) && a.push({
2387
2392
  ruleId: "meta-viewport",
2388
- selector: d(e),
2393
+ selector: u(e),
2389
2394
  html: c(e),
2390
2395
  impact: "critical",
2391
2396
  message: "Viewport disables user scaling. Remove user-scalable=no."
@@ -2395,7 +2400,7 @@ const qt = {
2395
2400
  const o = n[1], s = o.toLowerCase() === "yes" ? 1 : parseFloat(o);
2396
2401
  s < 2 && a.push({
2397
2402
  ruleId: "meta-viewport",
2398
- selector: d(e),
2403
+ selector: u(e),
2399
2404
  html: c(e),
2400
2405
  impact: "critical",
2401
2406
  message: `Viewport maximum-scale=${s} restricts zooming. Set to at least 2 or remove.`
@@ -2403,7 +2408,7 @@ const qt = {
2403
2408
  }
2404
2409
  return a;
2405
2410
  }
2406
- }, aa = {
2411
+ }, ia = {
2407
2412
  id: "meta-refresh",
2408
2413
  wcag: ["2.2.1", "2.2.4", "3.2.5"],
2409
2414
  level: "A",
@@ -2418,7 +2423,7 @@ const qt = {
2418
2423
  if (/^\d+\s*[;,]\s*url\s*=/i.test(e) || /^\d+\s*[;,]\s*['"]?\s*https?:/i.test(e))
2419
2424
  return n > 0 && n <= 72e3 ? [{
2420
2425
  ruleId: "meta-refresh",
2421
- selector: d(a),
2426
+ selector: u(a),
2422
2427
  html: c(a),
2423
2428
  impact: "critical",
2424
2429
  message: `Page redirects after ${n} seconds without warning. Use server-side redirect.`
@@ -2426,7 +2431,7 @@ const qt = {
2426
2431
  if (n > 0 && n <= 72e3)
2427
2432
  return [{
2428
2433
  ruleId: "meta-refresh",
2429
- selector: d(a),
2434
+ selector: u(a),
2430
2435
  html: c(a),
2431
2436
  impact: "critical",
2432
2437
  message: `Page auto-refreshes after ${n} seconds. Provide user control over refresh.`
@@ -2434,7 +2439,7 @@ const qt = {
2434
2439
  }
2435
2440
  return [];
2436
2441
  }
2437
- }, ia = {
2442
+ }, na = {
2438
2443
  id: "blink",
2439
2444
  selector: "blink",
2440
2445
  check: { type: "selector-exists" },
@@ -2445,7 +2450,7 @@ const qt = {
2445
2450
  level: "A",
2446
2451
  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.",
2447
2452
  prompt: "Suggest static alternatives to the blinking effect."
2448
- }, na = k(ia), ra = {
2453
+ }, ra = k(na), oa = {
2449
2454
  id: "marquee",
2450
2455
  selector: "marquee",
2451
2456
  check: { type: "selector-exists" },
@@ -2456,7 +2461,7 @@ const qt = {
2456
2461
  level: "A",
2457
2462
  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.",
2458
2463
  prompt: "Suggest static alternatives or accessible carousel patterns."
2459
- }, oa = k(ra), sa = {
2464
+ }, sa = k(oa), la = {
2460
2465
  id: "p-as-heading",
2461
2466
  wcag: [],
2462
2467
  level: "A",
@@ -2469,12 +2474,12 @@ const qt = {
2469
2474
  const a = [];
2470
2475
  for (const n of t.querySelectorAll("p")) {
2471
2476
  if (p(n)) continue;
2472
- 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), l = ((i = n.textContent) == null ? void 0 : i.trim()) || "", m = l.length > 0 && l.length < 50, g = !l.match(/[.!?,;:]$/);
2477
+ 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), d = ((e = n.className) == null ? void 0 : e.toLowerCase()) || "", h = /\bh[1-6]\b|\bheading\b/.test(d), l = ((i = n.textContent) == null ? void 0 : i.trim()) || "", m = l.length > 0 && l.length < 50, g = !l.match(/[.!?,;:]$/);
2473
2478
  if ((o && s || o && h) && m && g) {
2474
2479
  const w = n.nextElementSibling;
2475
2480
  w && (w.tagName === "P" || w.tagName === "DIV" || w.tagName === "UL") && a.push({
2476
2481
  ruleId: "p-as-heading",
2477
- selector: d(n),
2482
+ selector: u(n),
2478
2483
  html: c(n),
2479
2484
  impact: "serious",
2480
2485
  message: "Paragraph appears to be styled as a heading. Use an h1-h6 element instead."
@@ -2483,7 +2488,7 @@ const qt = {
2483
2488
  }
2484
2489
  return a;
2485
2490
  }
2486
- }, la = {
2491
+ }, ca = {
2487
2492
  id: "aria-roles",
2488
2493
  wcag: ["4.1.2"],
2489
2494
  level: "A",
@@ -2494,9 +2499,9 @@ const qt = {
2494
2499
  const a = [];
2495
2500
  for (const e of t.querySelectorAll("[role]")) {
2496
2501
  const r = e.getAttribute("role").replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "").split(/\s+/).filter(Boolean);
2497
- !r.some((s) => Ae(s)) && r.length > 0 && a.push({
2502
+ !r.some((s) => Se(s)) && r.length > 0 && a.push({
2498
2503
  ruleId: "aria-roles",
2499
- selector: d(e),
2504
+ selector: u(e),
2500
2505
  html: c(e),
2501
2506
  impact: "critical",
2502
2507
  message: `Invalid ARIA role "${r[0]}".`
@@ -2504,7 +2509,7 @@ const qt = {
2504
2509
  }
2505
2510
  return a;
2506
2511
  }
2507
- }, ca = {
2512
+ }, ua = {
2508
2513
  id: "aria-valid-attr",
2509
2514
  wcag: ["4.1.2"],
2510
2515
  level: "A",
@@ -2514,7 +2519,7 @@ const qt = {
2514
2519
  run(t) {
2515
2520
  return z(t).validAttr;
2516
2521
  }
2517
- }, ua = {
2522
+ }, da = {
2518
2523
  id: "aria-valid-attr-value",
2519
2524
  wcag: ["4.1.2"],
2520
2525
  level: "A",
@@ -2524,7 +2529,7 @@ const qt = {
2524
2529
  run(t) {
2525
2530
  return z(t).validAttrValue;
2526
2531
  }
2527
- }, da = {
2532
+ }, ma = {
2528
2533
  checkbox: ["aria-checked"],
2529
2534
  combobox: ["aria-expanded"],
2530
2535
  heading: ["aria-level"],
@@ -2538,7 +2543,7 @@ const qt = {
2538
2543
  slider: ["aria-valuenow"],
2539
2544
  spinbutton: ["aria-valuenow"],
2540
2545
  switch: ["aria-checked"]
2541
- }, ma = {
2546
+ }, ha = {
2542
2547
  id: "aria-required-attr",
2543
2548
  wcag: ["4.1.2"],
2544
2549
  level: "A",
@@ -2549,7 +2554,7 @@ const qt = {
2549
2554
  const a = [];
2550
2555
  for (const e of t.querySelectorAll("[role]")) {
2551
2556
  if (p(e) || e instanceof HTMLElement && e.style.display === "none") continue;
2552
- const i = e.getAttribute("role").trim().toLowerCase(), n = da[i];
2557
+ const i = e.getAttribute("role").trim().toLowerCase(), n = ma[i];
2553
2558
  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))) {
2554
2559
  if (i === "separator") {
2555
2560
  const r = e.getAttribute("tabindex");
@@ -2560,7 +2565,7 @@ const qt = {
2560
2565
  if (!e.hasAttribute(r)) {
2561
2566
  a.push({
2562
2567
  ruleId: "aria-required-attr",
2563
- selector: d(e),
2568
+ selector: u(e),
2564
2569
  html: c(e),
2565
2570
  impact: "critical",
2566
2571
  message: `Role "${i}" requires attribute "${r}".`
@@ -2573,24 +2578,24 @@ const qt = {
2573
2578
  return a;
2574
2579
  }
2575
2580
  };
2576
- function ha(t) {
2581
+ function pa(t) {
2577
2582
  var r, o, s;
2578
2583
  const a = [], e = t.className;
2579
2584
  e && typeof e == "string" && e.trim() && a.push(`Classes: ${e.trim().slice(0, 100)}`);
2580
2585
  const i = t.closest("form");
2581
2586
  if (i) {
2582
- const u = i.getAttribute("aria-label") || ((o = (r = i.querySelector("legend")) == null ? void 0 : r.textContent) == null ? void 0 : o.trim());
2583
- u && a.push(`Form: ${u.slice(0, 60)}`);
2587
+ const d = i.getAttribute("aria-label") || ((o = (r = i.querySelector("legend")) == null ? void 0 : r.textContent) == null ? void 0 : o.trim());
2588
+ d && a.push(`Form: ${d.slice(0, 60)}`);
2584
2589
  }
2585
2590
  const n = t.parentElement;
2586
2591
  if (n) {
2587
- const u = n.closest("h1, h2, h3, h4, h5, h6") || n.querySelector("h1, h2, h3, h4, h5, h6");
2588
- (s = u == null ? void 0 : u.textContent) != null && s.trim() && a.push(`Nearby heading: ${u.textContent.trim().slice(0, 60)}`);
2592
+ const d = n.closest("h1, h2, h3, h4, h5, h6") || n.querySelector("h1, h2, h3, h4, h5, h6");
2593
+ (s = d == null ? void 0 : d.textContent) != null && s.trim() && a.push(`Nearby heading: ${d.textContent.trim().slice(0, 60)}`);
2589
2594
  }
2590
2595
  return a.length > 0 ? a.join(`
2591
2596
  `) : void 0;
2592
2597
  }
2593
- const pa = {
2598
+ const ga = {
2594
2599
  id: "button-name",
2595
2600
  wcag: ["4.1.2"],
2596
2601
  level: "A",
@@ -2605,16 +2610,16 @@ const pa = {
2605
2610
  if ((i === "none" || i === "presentation") && !(e.matches('button:not([disabled]), [tabindex]:not([tabindex="-1"])') || e.tagName.toLowerCase() === "button" && !e.disabled) || e.getRootNode() instanceof ShadowRoot) continue;
2606
2611
  v(e) || a.push({
2607
2612
  ruleId: "button-name",
2608
- selector: d(e),
2613
+ selector: u(e),
2609
2614
  html: c(e),
2610
2615
  impact: "critical",
2611
2616
  message: "Button has no discernible text.",
2612
- context: ha(e)
2617
+ context: pa(e)
2613
2618
  });
2614
2619
  }
2615
2620
  return a;
2616
2621
  }
2617
- }, ga = {
2622
+ }, ba = {
2618
2623
  alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
2619
2624
  alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
2620
2625
  application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
@@ -2686,7 +2691,7 @@ const pa = {
2686
2691
  tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
2687
2692
  treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
2688
2693
  treeitem: /* @__PURE__ */ new Set(["aria-checked", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"])
2689
- }, ba = /* @__PURE__ */ new Set([
2694
+ }, fa = /* @__PURE__ */ new Set([
2690
2695
  "aria-atomic",
2691
2696
  "aria-busy",
2692
2697
  "aria-controls",
@@ -2710,7 +2715,7 @@ const pa = {
2710
2715
  "aria-roledescription",
2711
2716
  "aria-braillelabel",
2712
2717
  "aria-brailleroledescription"
2713
- ]), fa = {
2718
+ ]), va = {
2714
2719
  id: "aria-allowed-attr",
2715
2720
  wcag: ["4.1.2"],
2716
2721
  level: "A",
@@ -2723,12 +2728,12 @@ const pa = {
2723
2728
  if (p(e)) continue;
2724
2729
  const i = C(e);
2725
2730
  if (!i) continue;
2726
- const n = ga[i];
2731
+ const n = ba[i];
2727
2732
  if (n)
2728
2733
  for (const r of e.attributes)
2729
- r.name.startsWith("aria-") && (ba.has(r.name) || n.has(r.name) || a.push({
2734
+ r.name.startsWith("aria-") && (fa.has(r.name) || n.has(r.name) || a.push({
2730
2735
  ruleId: "aria-allowed-attr",
2731
- selector: d(e),
2736
+ selector: u(e),
2732
2737
  html: c(e),
2733
2738
  impact: "critical",
2734
2739
  message: `ARIA attribute "${r.name}" is not allowed on role "${i}".`
@@ -2736,7 +2741,7 @@ const pa = {
2736
2741
  }
2737
2742
  return a;
2738
2743
  }
2739
- }, va = /* @__PURE__ */ new Set([
2744
+ }, wa = /* @__PURE__ */ new Set([
2740
2745
  "base",
2741
2746
  "col",
2742
2747
  "colgroup",
@@ -2858,10 +2863,10 @@ const pa = {
2858
2863
  video: /* @__PURE__ */ new Set(["application"]),
2859
2864
  wbr: /* @__PURE__ */ new Set(["none", "presentation"])
2860
2865
  };
2861
- function wa(t) {
2866
+ function ya(t) {
2862
2867
  var e;
2863
2868
  const a = t.tagName.toLowerCase();
2864
- if (va.has(a))
2869
+ if (wa.has(a))
2865
2870
  return "none";
2866
2871
  if (a === "a" && t.hasAttribute("href"))
2867
2872
  return E["a[href]"];
@@ -2873,7 +2878,7 @@ function wa(t) {
2873
2878
  }
2874
2879
  return E[a] || "any";
2875
2880
  }
2876
- const ya = {
2881
+ const Aa = {
2877
2882
  id: "aria-allowed-role",
2878
2883
  wcag: ["4.1.2"],
2879
2884
  level: "A",
@@ -2889,16 +2894,16 @@ const ya = {
2889
2894
  if (!n) continue;
2890
2895
  const r = ue(i);
2891
2896
  if (r && n === r) continue;
2892
- const o = wa(i);
2897
+ const o = ya(i);
2893
2898
  o === "none" ? a.push({
2894
2899
  ruleId: "aria-allowed-role",
2895
- selector: d(i),
2900
+ selector: u(i),
2896
2901
  html: c(i),
2897
2902
  impact: "minor",
2898
2903
  message: `Element <${i.tagName.toLowerCase()}> should not have an explicit role.`
2899
2904
  }) : o !== "any" && !o.has(n) && a.push({
2900
2905
  ruleId: "aria-allowed-role",
2901
- selector: d(i),
2906
+ selector: u(i),
2902
2907
  html: c(i),
2903
2908
  impact: "minor",
2904
2909
  message: `Role "${n}" is not allowed on element <${i.tagName.toLowerCase()}>.`
@@ -2937,7 +2942,7 @@ const ya = {
2937
2942
  tab: ["tablist"],
2938
2943
  treeitem: ["tree", "group"]
2939
2944
  };
2940
- function Aa(t, a) {
2945
+ function Sa(t, a) {
2941
2946
  var r;
2942
2947
  const e = ((r = t.getAttribute("aria-owns")) == null ? void 0 : r.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
2943
2948
  for (const o of t.querySelectorAll("*")) {
@@ -2947,15 +2952,15 @@ function Aa(t, a) {
2947
2952
  for (const o of e) {
2948
2953
  const s = i.getElementById(o);
2949
2954
  if (s) {
2950
- const u = C(s);
2951
- u && !p(s) && n.add(u);
2955
+ const d = C(s);
2956
+ d && !p(s) && n.add(d);
2952
2957
  }
2953
2958
  }
2954
2959
  for (const o of a)
2955
- if (!o.some((u) => n.has(u))) return !1;
2960
+ if (!o.some((d) => n.has(d))) return !1;
2956
2961
  return !0;
2957
2962
  }
2958
- const Sa = {
2963
+ const xa = {
2959
2964
  id: "aria-required-children",
2960
2965
  wcag: ["4.1.2"],
2961
2966
  level: "A",
@@ -2970,11 +2975,11 @@ const Sa = {
2970
2975
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2971
2976
  if (!n || !(n in ae)) continue;
2972
2977
  const r = ae[n];
2973
- if (!Aa(i, r)) {
2978
+ if (!Sa(i, r)) {
2974
2979
  const o = r.map((s) => s.join(" or ")).join(", ");
2975
2980
  a.push({
2976
2981
  ruleId: "aria-required-children",
2977
- selector: d(i),
2982
+ selector: u(i),
2978
2983
  html: c(i),
2979
2984
  impact: "critical",
2980
2985
  message: `Role "${n}" requires children with role: ${o}.`
@@ -2983,7 +2988,7 @@ const Sa = {
2983
2988
  }
2984
2989
  return a;
2985
2990
  }
2986
- }, xa = {
2991
+ }, ka = {
2987
2992
  id: "aria-required-parent",
2988
2993
  wcag: ["4.1.2"],
2989
2994
  level: "A",
@@ -3000,8 +3005,8 @@ const Sa = {
3000
3005
  const r = ie[n];
3001
3006
  let o = i.parentElement, s = !1;
3002
3007
  for (; o && o !== t.documentElement; ) {
3003
- const u = C(o);
3004
- if (u && r.includes(u)) {
3008
+ const d = C(o);
3009
+ if (d && r.includes(d)) {
3005
3010
  s = !0;
3006
3011
  break;
3007
3012
  }
@@ -3009,7 +3014,7 @@ const Sa = {
3009
3014
  }
3010
3015
  s || a.push({
3011
3016
  ruleId: "aria-required-parent",
3012
- selector: d(i),
3017
+ selector: u(i),
3013
3018
  html: c(i),
3014
3019
  impact: "critical",
3015
3020
  message: `Role "${n}" must be contained within: ${r.join(", ")}.`
@@ -3033,7 +3038,7 @@ const Sa = {
3033
3038
  "embed",
3034
3039
  "area[href]"
3035
3040
  ].join(", ");
3036
- function ka(t) {
3041
+ function Ia(t) {
3037
3042
  let a = t;
3038
3043
  const e = t.ownerDocument, i = e.defaultView;
3039
3044
  for (; a && a !== e.body; ) {
@@ -3046,7 +3051,7 @@ function ka(t) {
3046
3051
  }
3047
3052
  return !0;
3048
3053
  }
3049
- const Ia = {
3054
+ const Ea = {
3050
3055
  id: "aria-hidden-body",
3051
3056
  selector: 'body[aria-hidden="true"]',
3052
3057
  check: { type: "selector-exists" },
@@ -3058,7 +3063,7 @@ const Ia = {
3058
3063
  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.",
3059
3064
  prompt: "Instruct to remove aria-hidden='true' from the body element.",
3060
3065
  skipAriaHidden: !1
3061
- }, Ea = k(Ia), Ta = {
3066
+ }, Ta = k(Ea), La = {
3062
3067
  id: "aria-hidden-focus",
3063
3068
  wcag: ["4.1.2"],
3064
3069
  level: "A",
@@ -3073,10 +3078,10 @@ const Ia = {
3073
3078
  e.matches(ne) && i.push(e);
3074
3079
  for (const n of i)
3075
3080
  if (n instanceof HTMLElement) {
3076
- if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !ka(n)) continue;
3081
+ if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Ia(n)) continue;
3077
3082
  a.push({
3078
3083
  ruleId: "aria-hidden-focus",
3079
- selector: d(n),
3084
+ selector: u(n),
3080
3085
  html: c(n),
3081
3086
  impact: "serious",
3082
3087
  message: "Focusable element is inside an aria-hidden region."
@@ -3085,7 +3090,7 @@ const Ia = {
3085
3090
  }
3086
3091
  return a;
3087
3092
  }
3088
- }, La = {
3093
+ }, Ca = {
3089
3094
  id: "aria-command-name",
3090
3095
  wcag: ["4.1.2"],
3091
3096
  level: "A",
@@ -3102,7 +3107,7 @@ const Ia = {
3102
3107
  if ((e = r == null ? void 0 : r.getAttribute("alt")) != null && e.trim()) continue;
3103
3108
  a.push({
3104
3109
  ruleId: "aria-command-name",
3105
- selector: d(i),
3110
+ selector: u(i),
3106
3111
  html: c(i),
3107
3112
  impact: "serious",
3108
3113
  message: "ARIA command has no accessible name."
@@ -3111,7 +3116,7 @@ const Ia = {
3111
3116
  }
3112
3117
  return a;
3113
3118
  }
3114
- }, Ca = {
3119
+ }, qa = {
3115
3120
  id: "aria-input-field-name",
3116
3121
  wcag: ["4.1.2"],
3117
3122
  level: "A",
@@ -3124,7 +3129,7 @@ const Ia = {
3124
3129
  if (p(i) || i.matches("input, select, textarea")) continue;
3125
3130
  v(i) || a.push({
3126
3131
  ruleId: "aria-input-field-name",
3127
- selector: d(i),
3132
+ selector: u(i),
3128
3133
  html: c(i),
3129
3134
  impact: "serious",
3130
3135
  message: "ARIA input field has no accessible name."
@@ -3132,7 +3137,7 @@ const Ia = {
3132
3137
  }
3133
3138
  return a;
3134
3139
  }
3135
- }, qa = {
3140
+ }, Ra = {
3136
3141
  id: "aria-toggle-field-name",
3137
3142
  wcag: ["4.1.2"],
3138
3143
  level: "A",
@@ -3145,7 +3150,7 @@ const Ia = {
3145
3150
  if (p(i) || i.matches('input[type="checkbox"], input[type="radio"]')) continue;
3146
3151
  v(i) || a.push({
3147
3152
  ruleId: "aria-toggle-field-name",
3148
- selector: d(i),
3153
+ selector: u(i),
3149
3154
  html: c(i),
3150
3155
  impact: "serious",
3151
3156
  message: "ARIA toggle field has no accessible name."
@@ -3153,7 +3158,7 @@ const Ia = {
3153
3158
  }
3154
3159
  return a;
3155
3160
  }
3156
- }, Ra = {
3161
+ }, Na = {
3157
3162
  id: "aria-meter-name",
3158
3163
  wcag: ["4.1.2"],
3159
3164
  level: "A",
@@ -3166,7 +3171,7 @@ const Ia = {
3166
3171
  if (p(e)) continue;
3167
3172
  v(e) || a.push({
3168
3173
  ruleId: "aria-meter-name",
3169
- selector: d(e),
3174
+ selector: u(e),
3170
3175
  html: c(e),
3171
3176
  impact: "serious",
3172
3177
  message: "Meter has no accessible name."
@@ -3174,7 +3179,7 @@ const Ia = {
3174
3179
  }
3175
3180
  return a;
3176
3181
  }
3177
- }, Na = {
3182
+ }, Ma = {
3178
3183
  id: "aria-progressbar-name",
3179
3184
  wcag: ["4.1.2"],
3180
3185
  level: "A",
@@ -3187,7 +3192,7 @@ const Ia = {
3187
3192
  if (p(e)) continue;
3188
3193
  v(e) || a.push({
3189
3194
  ruleId: "aria-progressbar-name",
3190
- selector: d(e),
3195
+ selector: u(e),
3191
3196
  html: c(e),
3192
3197
  impact: "serious",
3193
3198
  message: "Progressbar has no accessible name."
@@ -3195,7 +3200,7 @@ const Ia = {
3195
3200
  }
3196
3201
  return a;
3197
3202
  }
3198
- }, Ma = {
3203
+ }, $a = {
3199
3204
  id: "aria-dialog-name",
3200
3205
  wcag: ["4.1.2"],
3201
3206
  level: "A",
@@ -3208,7 +3213,7 @@ const Ia = {
3208
3213
  if (p(e)) continue;
3209
3214
  v(e) || a.push({
3210
3215
  ruleId: "aria-dialog-name",
3211
- selector: d(e),
3216
+ selector: u(e),
3212
3217
  html: c(e),
3213
3218
  impact: "serious",
3214
3219
  message: "Dialog has no accessible name."
@@ -3216,7 +3221,7 @@ const Ia = {
3216
3221
  }
3217
3222
  return a;
3218
3223
  }
3219
- }, $a = {
3224
+ }, Ha = {
3220
3225
  id: "aria-tooltip-name",
3221
3226
  wcag: ["4.1.2"],
3222
3227
  level: "A",
@@ -3229,7 +3234,7 @@ const Ia = {
3229
3234
  if (p(e)) continue;
3230
3235
  v(e) || a.push({
3231
3236
  ruleId: "aria-tooltip-name",
3232
- selector: d(e),
3237
+ selector: u(e),
3233
3238
  html: c(e),
3234
3239
  impact: "serious",
3235
3240
  message: "Tooltip has no accessible name."
@@ -3237,7 +3242,7 @@ const Ia = {
3237
3242
  }
3238
3243
  return a;
3239
3244
  }
3240
- }, Ha = {
3245
+ }, Da = {
3241
3246
  id: "aria-treeitem-name",
3242
3247
  wcag: ["4.1.2"],
3243
3248
  level: "A",
@@ -3250,7 +3255,7 @@ const Ia = {
3250
3255
  if (p(e)) continue;
3251
3256
  v(e) || a.push({
3252
3257
  ruleId: "aria-treeitem-name",
3253
- selector: d(e),
3258
+ selector: u(e),
3254
3259
  html: c(e),
3255
3260
  impact: "serious",
3256
3261
  message: "Treeitem has no accessible name."
@@ -3258,7 +3263,7 @@ const Ia = {
3258
3263
  }
3259
3264
  return a;
3260
3265
  }
3261
- }, Da = {
3266
+ }, Oa = {
3262
3267
  id: "aria-prohibited-attr",
3263
3268
  wcag: ["4.1.2"],
3264
3269
  level: "A",
@@ -3268,14 +3273,14 @@ const Ia = {
3268
3273
  run(t) {
3269
3274
  return z(t).prohibitedAttr;
3270
3275
  }
3271
- }, Oa = [
3276
+ }, Wa = [
3272
3277
  "a[href]",
3273
3278
  "button:not([disabled])",
3274
3279
  'input:not([disabled]):not([type="hidden"])',
3275
3280
  "select:not([disabled])",
3276
3281
  "textarea:not([disabled])",
3277
3282
  '[tabindex]:not([tabindex="-1"])'
3278
- ].join(", "), Wa = [
3283
+ ].join(", "), Ba = [
3279
3284
  "aria-atomic",
3280
3285
  "aria-busy",
3281
3286
  "aria-controls",
@@ -3292,15 +3297,15 @@ const Ia = {
3292
3297
  ];
3293
3298
  function re(t) {
3294
3299
  const a = [];
3295
- t.matches(Oa) && a.push("element is focusable");
3296
- for (const e of Wa)
3300
+ t.matches(Wa) && a.push("element is focusable");
3301
+ for (const e of Ba)
3297
3302
  if (t.hasAttribute(e)) {
3298
3303
  a.push(`has ${e}`);
3299
3304
  break;
3300
3305
  }
3301
3306
  return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
3302
3307
  }
3303
- const Ba = {
3308
+ const Fa = {
3304
3309
  id: "presentation-role-conflict",
3305
3310
  wcag: ["4.1.2"],
3306
3311
  level: "A",
@@ -3314,7 +3319,7 @@ const Ba = {
3314
3319
  const i = re(e);
3315
3320
  i.length > 0 && a.push({
3316
3321
  ruleId: "presentation-role-conflict",
3317
- selector: d(e),
3322
+ selector: u(e),
3318
3323
  html: c(e),
3319
3324
  impact: "serious",
3320
3325
  message: `Presentation role conflicts with: ${i.join(", ")}. The role will be ignored.`
@@ -3325,7 +3330,7 @@ const Ba = {
3325
3330
  const i = re(e);
3326
3331
  i.length > 0 && a.push({
3327
3332
  ruleId: "presentation-role-conflict",
3328
- selector: d(e),
3333
+ selector: u(e),
3329
3334
  html: c(e),
3330
3335
  impact: "serious",
3331
3336
  message: `Element with implicit presentation role (alt="") conflicts with: ${i.join(", ")}. The decorative role will be ignored.`
@@ -3346,7 +3351,7 @@ const Ba = {
3346
3351
  if (p(e)) continue;
3347
3352
  v(e) || a.push({
3348
3353
  ruleId: "summary-name",
3349
- selector: d(e),
3354
+ selector: u(e),
3350
3355
  html: c(e),
3351
3356
  impact: "serious",
3352
3357
  message: "<summary> element has no accessible name. Add descriptive text."
@@ -3355,7 +3360,7 @@ const Ba = {
3355
3360
  return a;
3356
3361
  }
3357
3362
  };
3358
- function Fa(t) {
3363
+ function ja(t) {
3359
3364
  var n, r;
3360
3365
  const a = [], e = t.getAttribute("href");
3361
3366
  e && a.push(`href: ${e}`);
@@ -3372,7 +3377,7 @@ function Fa(t) {
3372
3377
  return a.length > 0 ? a.join(`
3373
3378
  `) : void 0;
3374
3379
  }
3375
- const ja = {
3380
+ const Pa = {
3376
3381
  id: "link-name",
3377
3382
  wcag: ["2.4.4", "4.1.2"],
3378
3383
  level: "A",
@@ -3385,16 +3390,16 @@ const ja = {
3385
3390
  if (p(e)) continue;
3386
3391
  v(e) || a.push({
3387
3392
  ruleId: "link-name",
3388
- selector: d(e),
3393
+ selector: u(e),
3389
3394
  html: c(e),
3390
3395
  impact: "serious",
3391
3396
  message: "Link has no discernible text.",
3392
- context: Fa(e)
3397
+ context: ja(e)
3393
3398
  });
3394
3399
  }
3395
3400
  return a;
3396
3401
  }
3397
- }, Pa = {
3402
+ }, Va = {
3398
3403
  id: "skip-link",
3399
3404
  wcag: ["2.4.1"],
3400
3405
  level: "A",
@@ -3412,7 +3417,7 @@ const ja = {
3412
3417
  const s = n.slice(1);
3413
3418
  t.getElementById(s) || a.push({
3414
3419
  ruleId: "skip-link",
3415
- selector: d(i),
3420
+ selector: u(i),
3416
3421
  html: c(i),
3417
3422
  impact: "moderate",
3418
3423
  message: `Skip link points to "#${s}" which does not exist on the page.`
@@ -3420,7 +3425,7 @@ const ja = {
3420
3425
  }
3421
3426
  return a;
3422
3427
  }
3423
- }, Va = /* @__PURE__ */ new Set([
3428
+ }, za = /* @__PURE__ */ new Set([
3424
3429
  "block",
3425
3430
  "flex",
3426
3431
  "grid",
@@ -3428,23 +3433,23 @@ const ja = {
3428
3433
  "table-cell",
3429
3434
  "list-item",
3430
3435
  "flow-root"
3431
- ]), za = /* @__PURE__ */ new Set([
3436
+ ]), Ua = /* @__PURE__ */ new Set([
3432
3437
  "inline",
3433
3438
  "inline-block",
3434
3439
  "inline-flex",
3435
3440
  "inline-grid"
3436
3441
  ]);
3437
- function Ua(t) {
3442
+ function Ga(t) {
3438
3443
  let a = t.parentElement;
3439
3444
  for (; a; ) {
3440
3445
  const e = A(a).display;
3441
- if (Va.has(e) && Ga(a))
3442
- return a;
3446
+ if (za.has(e))
3447
+ return Xa(a) ? a : null;
3443
3448
  a = a.parentElement;
3444
3449
  }
3445
3450
  return null;
3446
3451
  }
3447
- function Ga(t) {
3452
+ function Xa(t) {
3448
3453
  const a = t.ownerDocument.createTreeWalker(
3449
3454
  t,
3450
3455
  NodeFilter.SHOW_TEXT
@@ -3464,7 +3469,7 @@ function Ga(t) {
3464
3469
  }
3465
3470
  return !1;
3466
3471
  }
3467
- function Xa(t, a) {
3472
+ function Ya(t, a) {
3468
3473
  const e = t.ownerDocument.createTreeWalker(
3469
3474
  t,
3470
3475
  NodeFilter.SHOW_TEXT
@@ -3485,7 +3490,7 @@ function Xa(t, a) {
3485
3490
  }
3486
3491
  return null;
3487
3492
  }
3488
- function Ya(t, a) {
3493
+ function Ka(t, a) {
3489
3494
  const e = t.textDecorationLine || t.textDecoration || "", i = a.textDecorationLine || a.textDecoration || "";
3490
3495
  if ((e.includes("underline") || e.includes("line-through")) && e !== i)
3491
3496
  return !0;
@@ -3495,8 +3500,8 @@ function Ya(t, a) {
3495
3500
  const o = parseFloat(t.outlineWidth) || 0, s = t.outlineStyle || "";
3496
3501
  if (o > 0 && s !== "none")
3497
3502
  return !0;
3498
- const u = t.backgroundImage || "";
3499
- if (u && u !== "none" && u !== "initial")
3503
+ const d = t.backgroundImage || "";
3504
+ if (d && d !== "none" && d !== "initial")
3500
3505
  return !0;
3501
3506
  const h = oe(t.fontWeight), l = oe(a.fontWeight);
3502
3507
  if (Math.abs(h - l) >= 300 || t.fontStyle !== a.fontStyle)
@@ -3510,7 +3515,7 @@ function oe(t) {
3510
3515
  function se(t, a, e) {
3511
3516
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3512
3517
  }
3513
- const Ka = {
3518
+ const Qa = {
3514
3519
  id: "link-in-text-block",
3515
3520
  wcag: ["1.4.1"],
3516
3521
  level: "A",
@@ -3520,21 +3525,21 @@ const Ka = {
3520
3525
  run(t) {
3521
3526
  const a = [];
3522
3527
  for (const e of t.querySelectorAll("a[href]")) {
3523
- if (p(e) || !y(e).trim()) continue;
3528
+ if (p(e) || !y(e).trim() || e.closest('nav, [role="navigation"], [role="banner"], [role="contentinfo"]')) continue;
3524
3529
  const i = A(e), n = i.display || "inline";
3525
- if (!za.has(n)) continue;
3526
- const r = Ua(e);
3530
+ if (!Ua.has(n)) continue;
3531
+ const r = Ga(e);
3527
3532
  if (!r) continue;
3528
3533
  const o = A(r);
3529
- if (Ya(i, o)) continue;
3530
- const s = R(i.color), u = Xa(r);
3531
- if (!s || !u) continue;
3532
- const h = q(...s), l = q(...u), m = de(h, l);
3534
+ if (Ka(i, o)) continue;
3535
+ const s = R(i.color), d = Ya(r);
3536
+ if (!s || !d) continue;
3537
+ const h = q(...s), l = q(...d), m = de(h, l);
3533
3538
  if (m >= 3) continue;
3534
- const g = se(...s), b = se(...u), f = `link color: ${g} rgb(${s.join(", ")}), surrounding text: ${b} rgb(${u.join(", ")}), ratio: ${m.toFixed(2)}:1`;
3539
+ const g = se(...s), b = se(...d), f = `link color: ${g} rgb(${s.join(", ")}), surrounding text: ${b} rgb(${d.join(", ")}), ratio: ${m.toFixed(2)}:1`;
3535
3540
  a.push({
3536
3541
  ruleId: "link-in-text-block",
3537
- selector: d(e),
3542
+ selector: u(e),
3538
3543
  html: c(e),
3539
3544
  impact: "serious",
3540
3545
  message: "Link in text block is not visually distinguishable from surrounding text. Add an underline, border, or ensure 3:1 color contrast with surrounding text.",
@@ -3543,7 +3548,7 @@ const Ka = {
3543
3548
  }
3544
3549
  return a;
3545
3550
  }
3546
- }, Qa = {
3551
+ }, Ja = {
3547
3552
  id: "html-has-lang",
3548
3553
  wcag: ["3.1.1"],
3549
3554
  level: "A",
@@ -3562,23 +3567,23 @@ const Ka = {
3562
3567
  }
3563
3568
  return (e = a.getAttribute("lang")) != null && e.trim() ? [] : [{
3564
3569
  ruleId: "html-has-lang",
3565
- selector: d(a),
3570
+ selector: u(a),
3566
3571
  html: c(a),
3567
3572
  impact: "serious",
3568
3573
  message: "<html> element missing lang attribute."
3569
3574
  }];
3570
3575
  }
3571
- }, Ja = new Set(
3576
+ }, Za = new Set(
3572
3577
  "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(" ")
3573
- ), Za = new Set(
3578
+ ), ei = new Set(
3574
3579
  "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(" ")
3575
- ), ei = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
3576
- function me(t) {
3577
- if (!ei.test(t)) return !1;
3580
+ ), ti = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
3581
+ function he(t) {
3582
+ if (!ti.test(t)) return !1;
3578
3583
  const a = t.split("-")[0].toLowerCase();
3579
- return a.length === 2 ? Ja.has(a) : a.length === 3 ? !Za.has(a) : !1;
3584
+ return a.length === 2 ? Za.has(a) : a.length === 3 ? !ei.has(a) : !1;
3580
3585
  }
3581
- const ti = {
3586
+ const ai = {
3582
3587
  id: "html-lang-valid",
3583
3588
  wcag: ["3.1.1"],
3584
3589
  level: "A",
@@ -3588,7 +3593,7 @@ const ti = {
3588
3593
  run(t) {
3589
3594
  var e;
3590
3595
  const a = (e = t.documentElement.getAttribute("lang")) == null ? void 0 : e.trim();
3591
- return a && !me(a) ? [{
3596
+ return a && !he(a) ? [{
3592
3597
  ruleId: "html-lang-valid",
3593
3598
  selector: "html",
3594
3599
  html: c(t.documentElement),
@@ -3629,7 +3634,7 @@ function le(t) {
3629
3634
  }
3630
3635
  return !1;
3631
3636
  }
3632
- const ai = {
3637
+ const ii = {
3633
3638
  id: "valid-lang",
3634
3639
  wcag: ["3.1.2"],
3635
3640
  level: "AA",
@@ -3644,16 +3649,16 @@ const ai = {
3644
3649
  if (i && !n) {
3645
3650
  le(e) && a.push({
3646
3651
  ruleId: "valid-lang",
3647
- selector: d(e),
3652
+ selector: u(e),
3648
3653
  html: c(e),
3649
3654
  impact: "serious",
3650
3655
  message: "Empty lang attribute value."
3651
3656
  });
3652
3657
  continue;
3653
3658
  }
3654
- n && le(e) && (me(n) || a.push({
3659
+ n && le(e) && (he(n) || a.push({
3655
3660
  ruleId: "valid-lang",
3656
- selector: d(e),
3661
+ selector: u(e),
3657
3662
  html: c(e),
3658
3663
  impact: "serious",
3659
3664
  message: `Invalid lang attribute value "${n}".`
@@ -3661,7 +3666,7 @@ const ai = {
3661
3666
  }
3662
3667
  return a;
3663
3668
  }
3664
- }, ii = {
3669
+ }, ni = {
3665
3670
  id: "html-xml-lang-mismatch",
3666
3671
  wcag: ["3.1.1"],
3667
3672
  level: "A",
@@ -3684,7 +3689,7 @@ const ai = {
3684
3689
  }
3685
3690
  return [];
3686
3691
  }
3687
- }, ni = {
3692
+ }, ri = {
3688
3693
  id: "td-headers-attr",
3689
3694
  wcag: ["1.3.1"],
3690
3695
  level: "A",
@@ -3702,7 +3707,7 @@ const ai = {
3702
3707
  if (o === n) {
3703
3708
  a.push({
3704
3709
  ruleId: "td-headers-attr",
3705
- selector: d(e),
3710
+ selector: u(e),
3706
3711
  html: c(e),
3707
3712
  impact: "serious",
3708
3713
  message: `Headers attribute references the cell itself ("${o}").`
@@ -3712,7 +3717,7 @@ const ai = {
3712
3717
  if (!i.querySelector(`th#${CSS.escape(o)}, td#${CSS.escape(o)}`)) {
3713
3718
  a.push({
3714
3719
  ruleId: "td-headers-attr",
3715
- selector: d(e),
3720
+ selector: u(e),
3716
3721
  html: c(e),
3717
3722
  impact: "serious",
3718
3723
  message: `Headers attribute references non-existent ID "${o}".`
@@ -3723,7 +3728,7 @@ const ai = {
3723
3728
  }
3724
3729
  return a;
3725
3730
  }
3726
- }, ri = {
3731
+ }, oi = {
3727
3732
  id: "th-has-data-cells",
3728
3733
  wcag: ["1.3.1"],
3729
3734
  level: "A",
@@ -3737,7 +3742,7 @@ const ai = {
3737
3742
  const i = e.querySelectorAll("th"), n = e.querySelectorAll("td");
3738
3743
  i.length > 0 && n.length === 0 && a.push({
3739
3744
  ruleId: "th-has-data-cells",
3740
- selector: d(e),
3745
+ selector: u(e),
3741
3746
  html: c(e),
3742
3747
  impact: "serious",
3743
3748
  message: "Table has header cells but no data cells."
@@ -3745,7 +3750,7 @@ const ai = {
3745
3750
  }
3746
3751
  return a;
3747
3752
  }
3748
- }, oi = {
3753
+ }, si = {
3749
3754
  id: "td-has-header",
3750
3755
  wcag: ["1.3.1"],
3751
3756
  level: "A",
@@ -3767,8 +3772,8 @@ const ai = {
3767
3772
  s = Math.max(s, b);
3768
3773
  }
3769
3774
  if (o <= 3 && s <= 3) continue;
3770
- const u = n.querySelector("th") !== null, h = n.querySelector("th[scope]") !== null, l = n.querySelector("td[headers]") !== null;
3771
- if (u)
3775
+ const d = n.querySelector("th") !== null, h = n.querySelector("th[scope]") !== null, l = n.querySelector("td[headers]") !== null;
3776
+ if (d)
3772
3777
  for (const m of n.querySelectorAll("td")) {
3773
3778
  if (p(m) || m.hasAttribute("headers")) continue;
3774
3779
  const g = m.closest("tr");
@@ -3787,7 +3792,7 @@ const ai = {
3787
3792
  if (!b && !w && !h && !l) {
3788
3793
  a.push({
3789
3794
  ruleId: "td-has-header",
3790
- selector: d(m),
3795
+ selector: u(m),
3791
3796
  html: c(m),
3792
3797
  impact: "serious",
3793
3798
  message: "Data cell has no associated header. Add th elements with scope, or headers attribute."
@@ -3798,7 +3803,7 @@ const ai = {
3798
3803
  }
3799
3804
  return a;
3800
3805
  }
3801
- }, si = {
3806
+ }, li = {
3802
3807
  id: "scope-attr-valid",
3803
3808
  wcag: ["1.3.1"],
3804
3809
  level: "A",
@@ -3813,7 +3818,7 @@ const ai = {
3813
3818
  const r = (i = n.getAttribute("scope")) == null ? void 0 : i.toLowerCase();
3814
3819
  r && !e.has(r) && a.push({
3815
3820
  ruleId: "scope-attr-valid",
3816
- selector: d(n),
3821
+ selector: u(n),
3817
3822
  html: c(n),
3818
3823
  impact: "moderate",
3819
3824
  message: `Invalid scope value "${r}". Use row, col, rowgroup, or colgroup.`
@@ -3821,7 +3826,7 @@ const ai = {
3821
3826
  }
3822
3827
  return a;
3823
3828
  }
3824
- }, li = {
3829
+ }, ci = {
3825
3830
  id: "empty-table-header",
3826
3831
  wcag: [],
3827
3832
  level: "A",
@@ -3836,7 +3841,7 @@ const ai = {
3836
3841
  const i = e.closest("table");
3837
3842
  (i == null ? void 0 : i.getAttribute("role")) === "presentation" || (i == null ? void 0 : i.getAttribute("role")) === "none" || v(e) || a.push({
3838
3843
  ruleId: "empty-table-header",
3839
- selector: d(e),
3844
+ selector: u(e),
3840
3845
  html: c(e),
3841
3846
  impact: "minor",
3842
3847
  message: "Table header cell is empty. Add text or use aria-label."
@@ -3844,7 +3849,7 @@ const ai = {
3844
3849
  }
3845
3850
  return a;
3846
3851
  }
3847
- }, D = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], ci = {
3852
+ }, D = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], ui = {
3848
3853
  id: "duplicate-id-aria",
3849
3854
  wcag: ["4.1.2"],
3850
3855
  level: "A",
@@ -3869,7 +3874,7 @@ const ai = {
3869
3874
  if (r <= 1) continue;
3870
3875
  const o = t.querySelectorAll(`#${CSS.escape(n)}`), s = t.querySelector(
3871
3876
  D.map((l) => `[${l}~="${CSS.escape(n)}"]`).join(", ")
3872
- ), u = t.querySelector(`label[for="${CSS.escape(n)}"]`);
3877
+ ), d = t.querySelector(`label[for="${CSS.escape(n)}"]`);
3873
3878
  let h;
3874
3879
  if (s) {
3875
3880
  const l = D.find(
@@ -3879,10 +3884,10 @@ const ai = {
3879
3884
  }
3880
3885
  );
3881
3886
  l && (h = l);
3882
- } else u && (h = "label[for]");
3887
+ } else d && (h = "label[for]");
3883
3888
  a.push({
3884
3889
  ruleId: "duplicate-id-aria",
3885
- selector: d(o[1]),
3890
+ selector: u(o[1]),
3886
3891
  html: c(o[1]),
3887
3892
  impact: "critical",
3888
3893
  message: `Duplicate ID "${n}" referenced by ${h ?? "an accessibility attribute"}.`,
@@ -3892,7 +3897,7 @@ Referenced by: ${h}` : ""}`
3892
3897
  }
3893
3898
  return a;
3894
3899
  }
3895
- }, ui = {
3900
+ }, di = {
3896
3901
  id: "video-caption",
3897
3902
  wcag: ["1.2.2"],
3898
3903
  level: "A",
@@ -3905,7 +3910,7 @@ Referenced by: ${h}` : ""}`
3905
3910
  if (p(e) || e.hasAttribute("muted") || e.hasAttribute("autoplay")) continue;
3906
3911
  e.querySelector('track[kind="captions"], track[kind="subtitles"]') || a.push({
3907
3912
  ruleId: "video-caption",
3908
- selector: d(e),
3913
+ selector: u(e),
3909
3914
  html: c(e),
3910
3915
  impact: "critical",
3911
3916
  message: "Video element has no captions track."
@@ -3913,7 +3918,7 @@ Referenced by: ${h}` : ""}`
3913
3918
  }
3914
3919
  return a;
3915
3920
  }
3916
- }, di = {
3921
+ }, mi = {
3917
3922
  id: "audio-caption",
3918
3923
  wcag: ["1.2.1"],
3919
3924
  level: "A",
@@ -3927,7 +3932,7 @@ Referenced by: ${h}` : ""}`
3927
3932
  const n = e.parentElement;
3928
3933
  n && n.querySelector('a[href*="transcript"], a[href*="text"]') || a.push({
3929
3934
  ruleId: "audio-caption",
3930
- selector: d(e),
3935
+ selector: u(e),
3931
3936
  html: c(e),
3932
3937
  impact: "critical",
3933
3938
  message: "Audio element has no transcript or text alternative. Add a transcript or track element."
@@ -3935,7 +3940,7 @@ Referenced by: ${h}` : ""}`
3935
3940
  }
3936
3941
  return a;
3937
3942
  }
3938
- }, mi = /* @__PURE__ */ new Set([
3943
+ }, hi = /* @__PURE__ */ new Set([
3939
3944
  "SCRIPT",
3940
3945
  "STYLE",
3941
3946
  "NOSCRIPT",
@@ -3954,10 +3959,10 @@ Referenced by: ${h}` : ""}`
3954
3959
  function ce([t, a, e]) {
3955
3960
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3956
3961
  }
3957
- function hi(t) {
3962
+ function pi(t) {
3958
3963
  return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!(t.closest("fieldset[disabled]") || t.getAttribute("aria-disabled") === "true");
3959
3964
  }
3960
- function pi(t, a) {
3965
+ function gi(t, a) {
3961
3966
  if (t.tagName !== "LABEL") return !1;
3962
3967
  const e = t, i = e.htmlFor;
3963
3968
  if (i) {
@@ -3969,7 +3974,7 @@ function pi(t, a) {
3969
3974
  const r = e.id;
3970
3975
  return !!(r && a.querySelector(`[aria-labelledby~="${r}"][aria-disabled="true"]`));
3971
3976
  }
3972
- function gi(t) {
3977
+ function bi(t) {
3973
3978
  const a = t.clip;
3974
3979
  if (a && a.startsWith("rect(")) {
3975
3980
  const i = a.match(/[\d.]+/g);
@@ -3983,17 +3988,17 @@ function gi(t) {
3983
3988
  }
3984
3989
  return !1;
3985
3990
  }
3986
- function bi(t) {
3991
+ function fi(t) {
3987
3992
  if (p(t)) return !0;
3988
3993
  let a = t;
3989
3994
  for (; a; ) {
3990
3995
  const e = A(a);
3991
- if (e.display === "none" || e.visibility === "hidden" || gi(e)) return !0;
3996
+ if (e.display === "none" || e.visibility === "hidden" || bi(e)) return !0;
3992
3997
  a = a.parentElement;
3993
3998
  }
3994
3999
  return !1;
3995
4000
  }
3996
- const fi = {
4001
+ const vi = {
3997
4002
  id: "color-contrast",
3998
4003
  wcag: ["1.4.3"],
3999
4004
  level: "AA",
@@ -4008,23 +4013,23 @@ const fi = {
4008
4013
  for (; r = i.nextNode(); ) {
4009
4014
  if (!r.textContent || !r.textContent.trim()) continue;
4010
4015
  const o = r.parentElement;
4011
- if (!o || n.has(o) || (n.add(o), mi.has(o.tagName)) || hi(o) || pi(o, t) || bi(o)) continue;
4016
+ if (!o || n.has(o) || (n.add(o), hi.has(o.tagName)) || pi(o) || gi(o, t) || fi(o)) continue;
4012
4017
  const s = A(o);
4013
4018
  if (parseFloat(s.opacity) === 0) continue;
4014
- const u = s.textShadow;
4015
- if (u && u !== "none" && u !== "initial") continue;
4019
+ const d = s.textShadow;
4020
+ if (d && d !== "none" && d !== "initial") continue;
4016
4021
  const h = R(s.color);
4017
4022
  if (!h) continue;
4018
4023
  const l = s.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/) || s.color.match(/rgba?\(.+?\/\s*([\d.]+%?)\s*\)/);
4019
- if (l && (l[1].endsWith("%") ? parseFloat(l[1]) / 100 : parseFloat(l[1])) === 0 || We(o)) continue;
4020
- const m = He(o);
4024
+ if (l && (l[1].endsWith("%") ? parseFloat(l[1]) / 100 : parseFloat(l[1])) === 0 || Be(o)) continue;
4025
+ const m = De(o);
4021
4026
  if (!m) continue;
4022
- const g = q(h[0], h[1], h[2]), b = q(m[0], m[1], m[2]), f = de(g, b), w = Fe(o) ? 3 : 4.5;
4027
+ const g = q(h[0], h[1], h[2]), b = q(m[0], m[1], m[2]), f = de(g, b), w = je(o) ? 3 : 4.5;
4023
4028
  if (f < w) {
4024
4029
  const I = Math.round(f * 100) / 100, S = ce(h), M = ce(m);
4025
4030
  a.push({
4026
4031
  ruleId: "color-contrast",
4027
- selector: d(o),
4032
+ selector: u(o),
4028
4033
  html: c(o),
4029
4034
  impact: "serious",
4030
4035
  message: `Insufficient color contrast ratio of ${I}:1 (required ${w}:1).`,
@@ -4034,68 +4039,67 @@ const fi = {
4034
4039
  }
4035
4040
  return a;
4036
4041
  }
4037
- }, he = [
4042
+ }, pe = [
4038
4043
  // Document Structure
4039
- Yt,
4040
4044
  Kt,
4041
4045
  Qt,
4042
4046
  Jt,
4043
4047
  Zt,
4044
- ta,
4048
+ ea,
4045
4049
  aa,
4046
- na,
4047
- oa,
4050
+ ia,
4051
+ ra,
4052
+ sa,
4048
4053
  // Images
4049
- je,
4050
- Ve,
4054
+ Pe,
4051
4055
  ze,
4052
4056
  Ue,
4053
- Xe,
4057
+ Ge,
4054
4058
  Ye,
4055
- Qe,
4059
+ Ke,
4056
4060
  Je,
4057
- at,
4061
+ Ze,
4062
+ it,
4058
4063
  // Forms
4059
- st,
4060
4064
  lt,
4061
4065
  ct,
4062
4066
  ut,
4063
- ft,
4067
+ dt,
4064
4068
  vt,
4065
4069
  wt,
4070
+ yt,
4066
4071
  // Keyboard
4067
- At,
4068
- xt,
4069
- qt,
4072
+ St,
4073
+ kt,
4070
4074
  Rt,
4071
4075
  Nt,
4072
- // Structure
4073
4076
  Mt,
4074
- ea,
4075
- sa,
4077
+ // Structure
4076
4078
  $t,
4079
+ ta,
4080
+ la,
4077
4081
  Ht,
4078
4082
  Dt,
4079
4083
  Ot,
4080
4084
  Wt,
4081
4085
  Bt,
4082
- _t,
4083
4086
  Ft,
4087
+ _t,
4084
4088
  jt,
4085
4089
  Pt,
4086
- zt,
4090
+ Vt,
4087
4091
  Ut,
4088
- Xt,
4092
+ Gt,
4093
+ Yt,
4089
4094
  // ARIA
4090
- la,
4091
4095
  ca,
4092
4096
  ua,
4093
- ma,
4094
- fa,
4095
- ya,
4096
- Sa,
4097
+ da,
4098
+ ha,
4099
+ va,
4100
+ Aa,
4097
4101
  xa,
4098
- Ea,
4102
+ ka,
4099
4103
  Ta,
4100
4104
  La,
4101
4105
  Ca,
@@ -4106,42 +4110,43 @@ const fi = {
4106
4110
  $a,
4107
4111
  Ha,
4108
4112
  Da,
4109
- Ba,
4110
- pa,
4113
+ Oa,
4114
+ Fa,
4115
+ ga,
4111
4116
  _a,
4112
4117
  // Links
4113
- ja,
4114
4118
  Pa,
4115
- Ka,
4116
- // Language
4119
+ Va,
4117
4120
  Qa,
4118
- ti,
4121
+ // Language
4122
+ Ja,
4119
4123
  ai,
4120
4124
  ii,
4121
- // Tables
4122
4125
  ni,
4126
+ // Tables
4123
4127
  ri,
4124
4128
  oi,
4125
4129
  si,
4126
4130
  li,
4127
- // Parsing
4128
4131
  ci,
4129
- // Media
4132
+ // Parsing
4130
4133
  ui,
4134
+ // Media
4131
4135
  di,
4136
+ mi,
4132
4137
  // Color
4133
- fi
4138
+ vi
4134
4139
  ];
4135
- let U = [], pe = /* @__PURE__ */ new Set();
4136
- function Ai(t) {
4137
- t.additionalRules && (U = t.additionalRules), t.disabledRules && (pe = new Set(t.disabledRules));
4140
+ let U = [], ge = /* @__PURE__ */ new Set();
4141
+ function Si(t) {
4142
+ t.additionalRules && (U = t.additionalRules), t.disabledRules && (ge = new Set(t.disabledRules));
4138
4143
  }
4139
- function ge() {
4140
- return he.filter((a) => !pe.has(a.id)).concat(U);
4144
+ function be() {
4145
+ return pe.filter((a) => !ge.has(a.id)).concat(U);
4141
4146
  }
4142
- function Si(t) {
4143
- be();
4144
- const a = ge(), e = [];
4147
+ function xi(t) {
4148
+ fe();
4149
+ const a = be(), e = [];
4145
4150
  let i = 0;
4146
4151
  return {
4147
4152
  processChunk(n) {
@@ -4160,13 +4165,13 @@ function Si(t) {
4160
4165
  }
4161
4166
  };
4162
4167
  }
4163
- function be() {
4164
- Se(), fe(), ve(), $e(), Me(), ke();
4168
+ function fe() {
4169
+ xe(), ve(), we(), He(), $e(), Ie();
4165
4170
  }
4166
- function xi(t) {
4171
+ function ki(t) {
4167
4172
  var i;
4168
- be();
4169
- const a = ge(), e = [];
4173
+ fe();
4174
+ const a = be(), e = [];
4170
4175
  for (const n of a)
4171
4176
  try {
4172
4177
  e.push(...n.run(t));
@@ -4179,32 +4184,32 @@ function xi(t) {
4179
4184
  ruleCount: a.length
4180
4185
  };
4181
4186
  }
4182
- const vi = new Map(he.map((t) => [t.id, t]));
4183
- function ki(t) {
4184
- const a = vi.get(t);
4187
+ const wi = new Map(pe.map((t) => [t.id, t]));
4188
+ function Ii(t) {
4189
+ const a = wi.get(t);
4185
4190
  return a || U.find((e) => e.id === t);
4186
4191
  }
4187
4192
  export {
4188
- be as clearAllCaches,
4189
- Me as clearAriaAttrAuditCache,
4190
- Se as clearAriaHiddenCache,
4191
- $e as clearColorCaches,
4192
- fe as clearComputedRoleCache,
4193
+ fe as clearAllCaches,
4194
+ $e as clearAriaAttrAuditCache,
4195
+ xe as clearAriaHiddenCache,
4196
+ He as clearColorCaches,
4197
+ ve as clearComputedRoleCache,
4193
4198
  k as compileDeclarativeRule,
4194
- Ai as configureRules,
4195
- Si as createChunkedAudit,
4199
+ Si as configureRules,
4200
+ xi as createChunkedAudit,
4196
4201
  v as getAccessibleName,
4197
4202
  y as getAccessibleTextContent,
4198
- ge as getActiveRules,
4203
+ be as getActiveRules,
4199
4204
  C as getComputedRole,
4200
4205
  c as getHtmlSnippet,
4201
4206
  ue as getImplicitRole,
4202
- ki as getRuleById,
4203
- d as getSelector,
4207
+ Ii as getRuleById,
4208
+ u as getSelector,
4204
4209
  p as isAriaHidden,
4205
- Ae as isValidRole,
4206
- wi as querySelectorShadowAware,
4207
- he as rules,
4208
- xi as runAudit,
4209
- yi as validateDeclarativeRule
4210
+ Se as isValidRole,
4211
+ yi as querySelectorShadowAware,
4212
+ pe as rules,
4213
+ ki as runAudit,
4214
+ Ai as validateDeclarativeRule
4210
4215
  };