@accesslint/core 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- let D = /* @__PURE__ */ new WeakMap();
2
- function be() {
3
- D = /* @__PURE__ */ new WeakMap();
1
+ let O = /* @__PURE__ */ new WeakMap();
2
+ function fe() {
3
+ O = /* @__PURE__ */ new WeakMap();
4
4
  }
5
- function le(t) {
5
+ function ue(t) {
6
6
  var i;
7
7
  const a = t.tagName.toLowerCase(), e = (i = t.getAttribute("type")) == null ? void 0 : i.toLowerCase();
8
8
  switch (a) {
@@ -119,23 +119,23 @@ function le(t) {
119
119
  }
120
120
  function C(t) {
121
121
  var n;
122
- const a = D.get(t);
122
+ const a = O.get(t);
123
123
  if (a !== void 0) return a;
124
- const i = ((n = t.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase()) || null || le(t);
125
- return D.set(t, i), i;
124
+ const i = ((n = t.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase()) || null || ue(t);
125
+ return O.set(t, i), i;
126
126
  }
127
- let O = /* @__PURE__ */ new WeakMap();
128
- function fe() {
129
- O = /* @__PURE__ */ new WeakMap();
127
+ let W = /* @__PURE__ */ new WeakMap();
128
+ function ve() {
129
+ W = /* @__PURE__ */ new WeakMap();
130
130
  }
131
131
  function v(t) {
132
- const a = O.get(t);
132
+ const a = W.get(t);
133
133
  if (a !== void 0) return a;
134
- const e = ve(t);
135
- return O.set(t, e), e;
134
+ const e = we(t);
135
+ return W.set(t, e), e;
136
136
  }
137
- function ve(t) {
138
- var r, o, s, c, h;
137
+ function we(t) {
138
+ var r, o, s, u, 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 ve(t) {
179
179
  const l = y(t).trim();
180
180
  if (l) return l;
181
181
  }
182
- return t instanceof HTMLImageElement || t instanceof HTMLAreaElement ? ((c = t.alt) == null ? void 0 : c.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((h = t.alt) == null ? void 0 : h.trim()) ?? "" : "";
182
+ return t instanceof HTMLImageElement || t instanceof HTMLAreaElement ? ((u = t.alt) == null ? void 0 : u.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((h = t.alt) == null ? void 0 : h.trim()) ?? "" : "";
183
183
  }
184
- const we = /* @__PURE__ */ new Set([
184
+ const ye = /* @__PURE__ */ new Set([
185
185
  "alert",
186
186
  "alertdialog",
187
187
  "application",
@@ -265,12 +265,12 @@ const we = /* @__PURE__ */ new Set([
265
265
  "treegrid",
266
266
  "treeitem"
267
267
  ]);
268
- function ye(t) {
268
+ function Ae(t) {
269
269
  const a = t.trim().toLowerCase().replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "");
270
- return we.has(a);
270
+ return ye.has(a);
271
271
  }
272
272
  let B = /* @__PURE__ */ new WeakMap();
273
- function Ae() {
273
+ function Se() {
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 Se(t) {
282
+ function xe(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 c = s;
293
- if (!Se(c)) {
294
- const h = (e = c.tagName) == null ? void 0 : e.toLowerCase();
292
+ const u = s;
293
+ if (!xe(u)) {
294
+ const h = (e = u.tagName) == null ? void 0 : e.toLowerCase();
295
295
  if (h === "img" || h === "area") {
296
- const l = c.getAttribute("aria-labelledby");
296
+ const l = u.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 = c.ownerDocument.getElementById(g)) == null ? void 0 : b.textContent) == null ? void 0 : f.trim()) ?? "";
300
+ return ((f = (b = u.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 = c.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? c.getAttribute("alt") ?? ((n = c.getAttribute("title")) == null ? void 0 : n.trim()) ?? "";
307
+ a += ((i = u.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? u.getAttribute("alt") ?? ((n = u.getAttribute("title")) == null ? void 0 : n.trim()) ?? "";
308
308
  } else if (h === "svg") {
309
- const l = (r = c.getAttribute("aria-label")) == null ? void 0 : r.trim();
309
+ const l = (r = u.getAttribute("aria-label")) == null ? void 0 : r.trim();
310
310
  if (l)
311
311
  a += l;
312
312
  else {
313
- const m = c.querySelector("title");
313
+ const m = u.querySelector("title");
314
314
  m && (a += m.textContent ?? "");
315
315
  }
316
- } else (o = c.getAttribute("aria-label")) != null && o.trim() ? a += c.getAttribute("aria-label").trim() : a += y(c);
316
+ } else (o = u.getAttribute("aria-label")) != null && o.trim() ? a += u.getAttribute("aria-label").trim() : a += y(u);
317
317
  }
318
318
  }
319
319
  return a;
320
320
  }
321
- let W = /* @__PURE__ */ new WeakMap();
322
- function xe() {
323
- W = /* @__PURE__ */ new WeakMap();
321
+ let _ = /* @__PURE__ */ new WeakMap();
322
+ function ke() {
323
+ _ = /* @__PURE__ */ new WeakMap();
324
324
  }
325
- function ke(t) {
325
+ function Ie(t) {
326
326
  return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
327
327
  }
328
- const Ie = [
328
+ const Ee = [
329
329
  "data-testid",
330
330
  "data-test-id",
331
331
  "data-cy",
@@ -335,12 +335,12 @@ const Ie = [
335
335
  "for",
336
336
  "aria-label"
337
337
  ];
338
- function Ee(t) {
338
+ function Te(t) {
339
339
  const a = t.tagName.toLowerCase();
340
- for (const i of Ie) {
340
+ for (const i of Ee) {
341
341
  const n = t.getAttribute(i);
342
342
  if (n != null && n.length > 0 && n.length < 100)
343
- return `${a}[${i}="${ke(n)}"]`;
343
+ return `${a}[${i}="${Ie(n)}"]`;
344
344
  }
345
345
  const e = t.parentElement;
346
346
  if (e) {
@@ -352,7 +352,7 @@ function Ee(t) {
352
352
  }
353
353
  return a;
354
354
  }
355
- function M(t) {
355
+ function $(t) {
356
356
  if (t.id) return `#${CSS.escape(t.id)}`;
357
357
  const a = t.getRootNode(), e = a instanceof ShadowRoot ? null : a.documentElement, i = [];
358
358
  let n = t;
@@ -361,7 +361,7 @@ function M(t) {
361
361
  i.unshift(`#${CSS.escape(n.id)}`);
362
362
  break;
363
363
  }
364
- if (i.unshift(Ee(n)), i.length >= 2) {
364
+ if (i.unshift(Te(n)), i.length >= 2) {
365
365
  const r = i.join(" > ");
366
366
  try {
367
367
  const o = a.querySelectorAll(r);
@@ -375,28 +375,28 @@ function M(t) {
375
375
  }
376
376
  function d(t) {
377
377
  var r;
378
- const a = W.get(t);
378
+ const a = _.get(t);
379
379
  if (a !== void 0) return a;
380
380
  const e = [];
381
381
  let i = t;
382
382
  for (; i; ) {
383
383
  const o = i.getRootNode();
384
384
  if (o instanceof ShadowRoot)
385
- e.unshift({ selector: M(i), delimiter: " >>> " }), i = o.host;
385
+ e.unshift({ selector: $(i), delimiter: " >>> " }), i = o.host;
386
386
  else {
387
387
  const s = (r = o.defaultView) == null ? void 0 : r.frameElement;
388
388
  if (s)
389
- e.unshift({ selector: M(i), delimiter: " >>>iframe> " }), i = s;
389
+ e.unshift({ selector: $(i), delimiter: " >>>iframe> " }), i = s;
390
390
  else {
391
- e.unshift({ selector: M(i), delimiter: "" });
391
+ e.unshift({ selector: $(i), delimiter: "" });
392
392
  break;
393
393
  }
394
394
  }
395
395
  }
396
396
  const n = e.map((o, s) => (s === 0 ? "" : o.delimiter) + o.selector).join("");
397
- return W.set(t, n), n;
397
+ return _.set(t, n), n;
398
398
  }
399
- function bi(t) {
399
+ function wi(t) {
400
400
  const a = [], e = [];
401
401
  let i = t;
402
402
  for (; i; ) {
@@ -429,11 +429,11 @@ function bi(t) {
429
429
  }
430
430
  return null;
431
431
  }
432
- function u(t) {
432
+ function c(t) {
433
433
  const a = t.outerHTML;
434
434
  return a.length > 200 ? a.slice(0, 200) + "..." : a;
435
435
  }
436
- const Te = /* @__PURE__ */ new Set([
436
+ const Le = /* @__PURE__ */ new Set([
437
437
  "aria-activedescendant",
438
438
  "aria-atomic",
439
439
  "aria-autocomplete",
@@ -487,7 +487,7 @@ const Te = /* @__PURE__ */ new Set([
487
487
  "aria-valuemin",
488
488
  "aria-valuenow",
489
489
  "aria-valuetext"
490
- ]), U = /* @__PURE__ */ new Set([
490
+ ]), G = /* @__PURE__ */ new Set([
491
491
  "aria-atomic",
492
492
  "aria-busy",
493
493
  "aria-disabled",
@@ -498,7 +498,7 @@ const Te = /* @__PURE__ */ new Set([
498
498
  "aria-multiselectable",
499
499
  "aria-readonly",
500
500
  "aria-required"
501
- ]), G = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), Le = /* @__PURE__ */ new Set([
501
+ ]), X = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), Ce = /* @__PURE__ */ new Set([
502
502
  "aria-colcount",
503
503
  "aria-colindex",
504
504
  "aria-colspan",
@@ -508,11 +508,11 @@ const Te = /* @__PURE__ */ new Set([
508
508
  "aria-rowindex",
509
509
  "aria-rowspan",
510
510
  "aria-setsize"
511
- ]), Ce = /* @__PURE__ */ new Set([
511
+ ]), qe = /* @__PURE__ */ new Set([
512
512
  "aria-valuemax",
513
513
  "aria-valuemin",
514
514
  "aria-valuenow"
515
- ]), X = {
515
+ ]), Y = {
516
516
  "aria-autocomplete": /* @__PURE__ */ new Set(["inline", "list", "both", "none"]),
517
517
  "aria-expanded": /* @__PURE__ */ new Set(["true", "false", "undefined"]),
518
518
  "aria-current": /* @__PURE__ */ new Set(["page", "step", "location", "date", "time", "true", "false"]),
@@ -523,7 +523,7 @@ const Te = /* @__PURE__ */ new Set([
523
523
  "aria-orientation": /* @__PURE__ */ new Set(["horizontal", "vertical", "undefined"]),
524
524
  "aria-relevant": /* @__PURE__ */ new Set(["additions", "all", "removals", "text"]),
525
525
  "aria-sort": /* @__PURE__ */ new Set(["ascending", "descending", "none", "other"])
526
- }, Y = /* @__PURE__ */ new Set([
526
+ }, K = /* @__PURE__ */ new Set([
527
527
  "caption",
528
528
  "code",
529
529
  "deletion",
@@ -540,7 +540,7 @@ const Te = /* @__PURE__ */ new Set([
540
540
  "suggestion",
541
541
  "term",
542
542
  "time"
543
- ]), qe = {
543
+ ]), Re = {
544
544
  abbr: !0,
545
545
  bdi: !0,
546
546
  bdo: !0,
@@ -568,7 +568,7 @@ const Te = /* @__PURE__ */ new Set([
568
568
  u: !0,
569
569
  var: !0,
570
570
  wbr: !0
571
- }, Re = {
571
+ }, Ne = {
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"]),
@@ -601,13 +601,13 @@ const Te = /* @__PURE__ */ new Set([
601
601
  time: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
602
602
  tooltip: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"])
603
603
  };
604
- let E = null, T = null;
605
- function Ne() {
606
- E = null, T = null;
604
+ let T = null, L = null;
605
+ function Me() {
606
+ T = null, L = null;
607
607
  }
608
- function V(t) {
608
+ function z(t) {
609
609
  var n;
610
- if (T && (E == null ? void 0 : E.deref()) === t) return T;
610
+ if (L && (T == null ? void 0 : T.deref()) === t) return L;
611
611
  const a = [], e = [], i = [];
612
612
  for (const r of t.querySelectorAll("*")) {
613
613
  let o = !1;
@@ -617,10 +617,10 @@ function V(t) {
617
617
  break;
618
618
  }
619
619
  if (!o) continue;
620
- let s, c;
621
- const h = () => (s === void 0 && (s = d(r), c = u(r)), { selector: s, html: c });
620
+ let s, u;
621
+ const h = () => (s === void 0 && (s = d(r), u = c(r)), { selector: s, html: u });
622
622
  for (const l of r.attributes)
623
- if (l.name.startsWith("aria-") && !Te.has(l.name)) {
623
+ if (l.name.startsWith("aria-") && !Le.has(l.name)) {
624
624
  const m = h();
625
625
  a.push({
626
626
  ruleId: "aria-valid-attr",
@@ -634,8 +634,8 @@ function V(t) {
634
634
  for (const l of r.attributes) {
635
635
  if (!l.name.startsWith("aria-")) continue;
636
636
  const m = l.value.trim();
637
- if (!(m === "" && !U.has(l.name) && !G.has(l.name))) {
638
- if (U.has(l.name)) {
637
+ if (!(m === "" && !G.has(l.name) && !X.has(l.name))) {
638
+ if (G.has(l.name)) {
639
639
  if (m !== "true" && m !== "false") {
640
640
  const g = h();
641
641
  e.push({
@@ -646,7 +646,7 @@ function V(t) {
646
646
  message: `${l.name} must be "true" or "false", got "${m}".`
647
647
  });
648
648
  }
649
- } else if (G.has(l.name)) {
649
+ } else if (X.has(l.name)) {
650
650
  if (m !== "true" && m !== "false" && m !== "mixed") {
651
651
  const g = h();
652
652
  e.push({
@@ -657,7 +657,7 @@ function V(t) {
657
657
  message: `${l.name} must be "true", "false", or "mixed", got "${m}".`
658
658
  });
659
659
  }
660
- } else if (Le.has(l.name)) {
660
+ } else if (Ce.has(l.name)) {
661
661
  if (m === "" || !/^-?\d+$/.test(m)) {
662
662
  const g = h();
663
663
  e.push({
@@ -668,7 +668,7 @@ function V(t) {
668
668
  message: `${l.name} must be an integer, got "${m}".`
669
669
  });
670
670
  }
671
- } else if (Ce.has(l.name)) {
671
+ } else if (qe.has(l.name)) {
672
672
  if (m === "" || isNaN(Number(m))) {
673
673
  const g = h();
674
674
  e.push({
@@ -679,10 +679,10 @@ function V(t) {
679
679
  message: `${l.name} must be a number, got "${m}".`
680
680
  });
681
681
  }
682
- } else if (X[l.name]) {
682
+ } else if (Y[l.name]) {
683
683
  const g = m.split(/\s+/);
684
684
  for (const b of g)
685
- if (!X[l.name].has(b)) {
685
+ if (!Y[l.name].has(b)) {
686
686
  const f = h();
687
687
  e.push({
688
688
  ruleId: "aria-valid-attr-value",
@@ -698,7 +698,7 @@ function V(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 && qe[m]) {
701
+ if (!l && Re[m]) {
702
702
  const g = r.hasAttribute("aria-label"), b = r.hasAttribute("aria-labelledby");
703
703
  if (g || b) {
704
704
  const f = h();
@@ -711,7 +711,7 @@ function V(t) {
711
711
  });
712
712
  }
713
713
  } else if (l) {
714
- if (Y.has(l)) {
714
+ if (K.has(l)) {
715
715
  const b = r.hasAttribute("aria-label"), f = r.hasAttribute("aria-labelledby");
716
716
  if (b || f) {
717
717
  const w = h();
@@ -724,11 +724,11 @@ function V(t) {
724
724
  });
725
725
  }
726
726
  }
727
- const g = Re[l];
727
+ const g = Ne[l];
728
728
  if (g) {
729
729
  for (const b of r.attributes)
730
730
  if (b.name.startsWith("aria-") && g.has(b.name)) {
731
- if ((b.name === "aria-label" || b.name === "aria-labelledby") && Y.has(l))
731
+ if ((b.name === "aria-label" || b.name === "aria-labelledby") && K.has(l))
732
732
  continue;
733
733
  const f = h();
734
734
  i.push({
@@ -743,15 +743,15 @@ function V(t) {
743
743
  }
744
744
  }
745
745
  }
746
- return E = new WeakRef(t), T = { validAttr: a, validAttrValue: e, prohibitedAttr: i }, T;
746
+ return T = new WeakRef(t), L = { validAttr: a, validAttrValue: e, prohibitedAttr: i }, L;
747
747
  }
748
- let _ = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap();
749
- function Me() {
750
- _ = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap();
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();
751
751
  }
752
752
  function A(t) {
753
- let a = _.get(t);
754
- return a || (a = getComputedStyle(t), _.set(t, a), a);
753
+ let a = F.get(t);
754
+ return a || (a = getComputedStyle(t), F.set(t, a), a);
755
755
  }
756
756
  function q(t, a, e) {
757
757
  const [i, n, r] = [t, a, e].map((o) => {
@@ -760,34 +760,67 @@ function q(t, a, e) {
760
760
  });
761
761
  return 0.2126 * i + 0.7152 * n + 0.0722 * r;
762
762
  }
763
- function ce(t, a) {
763
+ function de(t, a) {
764
764
  const e = Math.max(t, a), i = Math.min(t, a);
765
765
  return (e + 0.05) / (i + 0.05);
766
766
  }
767
+ const Q = {
768
+ black: [0, 0, 0],
769
+ white: [255, 255, 255],
770
+ red: [255, 0, 0],
771
+ green: [0, 128, 0],
772
+ blue: [0, 0, 255],
773
+ yellow: [255, 255, 0],
774
+ orange: [255, 165, 0],
775
+ purple: [128, 0, 128],
776
+ gray: [128, 128, 128],
777
+ grey: [128, 128, 128],
778
+ silver: [192, 192, 192],
779
+ maroon: [128, 0, 0],
780
+ navy: [0, 0, 128],
781
+ teal: [0, 128, 128],
782
+ aqua: [0, 255, 255],
783
+ fuchsia: [255, 0, 255],
784
+ lime: [0, 255, 0],
785
+ olive: [128, 128, 0]
786
+ };
767
787
  function R(t) {
768
- const a = t.match(
788
+ const a = t.trim().toLowerCase();
789
+ if (Q[a]) return Q[a];
790
+ const e = a.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/);
791
+ if (e)
792
+ return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)];
793
+ const i = a.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/);
794
+ if (i)
795
+ return [parseInt(i[1], 16), parseInt(i[2], 16), parseInt(i[3], 16)];
796
+ const n = t.match(
769
797
  /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*[\d.]+)?\s*\)/
770
798
  );
771
- return a ? [parseInt(a[1]), parseInt(a[2]), parseInt(a[3])] : null;
799
+ if (n)
800
+ return [parseInt(n[1]), parseInt(n[2]), parseInt(n[3])];
801
+ const r = t.match(
802
+ /rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:\/\s*[\d.]+%?)?\s*\)/
803
+ );
804
+ return r ? [parseInt(r[1]), parseInt(r[2]), parseInt(r[3])] : null;
772
805
  }
773
- function $e(t) {
774
- const a = F.get(t);
806
+ function He(t) {
807
+ const a = j.get(t);
775
808
  if (a !== void 0) return a;
776
- const e = He(t);
777
- return F.set(t, e), e;
809
+ const e = De(t);
810
+ return j.set(t, e), e;
778
811
  }
779
- function He(t) {
812
+ function De(t) {
780
813
  let a = t;
781
814
  for (; a; ) {
782
815
  const e = A(a), i = e.backgroundImage;
783
816
  if (i && i !== "none" && i !== "initial") return null;
784
817
  const n = e.backgroundColor;
785
- if (n === "transparent" || n === "rgba(0, 0, 0, 0)") {
818
+ if (n === "transparent" || n === "rgba(0, 0, 0, 0)" || n === "rgba(0 0 0 / 0)") {
786
819
  a = a.parentElement;
787
820
  continue;
788
821
  }
789
- const r = n.match(/rgba\(.+?,\s*([\d.]+)\s*\)/);
790
- if (r && parseFloat(r[1]) < 0.1) {
822
+ const r = n.match(/rgba\(.+?,\s*([\d.]+)\s*\)/) || n.match(/rgba?\(.+?\/\s*([\d.]+%?)\s*\)/);
823
+ if (r && (r[1].endsWith("%") ? parseFloat(r[1]) / 100 : parseFloat(r[1])) < 0.1) {
791
824
  a = a.parentElement;
792
825
  continue;
793
826
  }
@@ -795,12 +828,12 @@ function He(t) {
795
828
  }
796
829
  return [255, 255, 255];
797
830
  }
798
- const De = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
799
- function Oe(t) {
800
- const a = j.get(t);
831
+ const Oe = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
832
+ function We(t) {
833
+ const a = P.get(t);
801
834
  if (a !== void 0) return a;
802
835
  const e = Be(t);
803
- return j.set(t, e), e;
836
+ return P.set(t, e), e;
804
837
  }
805
838
  function Be(t) {
806
839
  let a = t, e = !1;
@@ -808,7 +841,7 @@ function Be(t) {
808
841
  const i = A(a).position;
809
842
  if ((i === "absolute" || i === "fixed") && (e = !0), a !== t && i !== "static") {
810
843
  for (const n of a.children)
811
- if (!(n === t || n.contains(t)) && De.has(n.tagName)) {
844
+ if (!(n === t || n.contains(t)) && Oe.has(n.tagName)) {
812
845
  if (e) return !0;
813
846
  const r = A(n).position;
814
847
  if (r === "absolute" || r === "fixed") return !0;
@@ -819,11 +852,15 @@ function Be(t) {
819
852
  }
820
853
  return !1;
821
854
  }
822
- function We(t) {
823
- const a = A(t), e = parseFloat(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
824
- return e >= 24 || e >= 18.66 && i >= 700;
855
+ function _e(t) {
856
+ const a = parseFloat(t);
857
+ return t.endsWith("pt") ? a * (4 / 3) : a;
825
858
  }
826
- function $(t) {
859
+ function Fe(t) {
860
+ const a = A(t), e = _e(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
861
+ return e >= 23.5 || e >= 18.5 && i >= 700;
862
+ }
863
+ function H(t) {
827
864
  var r, o;
828
865
  const a = [], e = t.closest("a");
829
866
  if (e) {
@@ -837,13 +874,13 @@ function $(t) {
837
874
  }
838
875
  const n = t.parentElement;
839
876
  if (n && n !== e) {
840
- const s = t instanceof HTMLImageElement && t.alt || "", c = (o = n.textContent) == null ? void 0 : o.replace(s, "").trim().slice(0, 100);
841
- c && a.push(`Adjacent text: ${c}`);
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}`);
842
879
  }
843
880
  return a.length > 0 ? a.join(`
844
881
  `) : void 0;
845
882
  }
846
- function K(t) {
883
+ function J(t) {
847
884
  let a = t;
848
885
  for (; a; ) {
849
886
  if (a instanceof HTMLElement && a.style.visibility === "hidden") return !0;
@@ -851,7 +888,7 @@ function K(t) {
851
888
  }
852
889
  return !1;
853
890
  }
854
- const _e = {
891
+ const je = {
855
892
  id: "img-alt",
856
893
  wcag: ["1.1.1"],
857
894
  level: "A",
@@ -861,7 +898,7 @@ const _e = {
861
898
  run(t) {
862
899
  const a = [];
863
900
  for (const e of t.querySelectorAll("img")) {
864
- if (p(e) || K(e)) continue;
901
+ if (p(e) || J(e)) continue;
865
902
  const i = e.getAttribute("role");
866
903
  if (i === "presentation" || i === "none") {
867
904
  const r = e.getAttribute("tabindex");
@@ -872,43 +909,43 @@ const _e = {
872
909
  a.push({
873
910
  ruleId: "img-alt",
874
911
  selector: d(e),
875
- html: u(e),
912
+ html: c(e),
876
913
  impact: "critical",
877
914
  message: 'Image has whitespace-only alt text. Use alt="" for decorative images or provide descriptive text.',
878
- context: $(e)
915
+ context: H(e)
879
916
  });
880
917
  continue;
881
918
  }
882
919
  !e.hasAttribute("alt") && !v(e) && a.push({
883
920
  ruleId: "img-alt",
884
921
  selector: d(e),
885
- html: u(e),
922
+ html: c(e),
886
923
  impact: "critical",
887
924
  message: "Image element missing alt attribute.",
888
- context: $(e)
925
+ context: H(e)
889
926
  });
890
927
  }
891
928
  for (const e of t.querySelectorAll('[role="img"]:not(img):not(svg)'))
892
- p(e) || K(e) || v(e) || a.push({
929
+ p(e) || J(e) || v(e) || a.push({
893
930
  ruleId: "img-alt",
894
931
  selector: d(e),
895
- html: u(e),
932
+ html: c(e),
896
933
  impact: "critical",
897
934
  message: 'Element with role="img" has no accessible name. Add aria-label or aria-labelledby.',
898
- context: $(e)
935
+ context: H(e)
899
936
  });
900
937
  return a;
901
938
  }
902
939
  };
903
- function Fe(t) {
940
+ function Pe(t) {
904
941
  var r, o, s;
905
942
  const a = t.getAttribute("aria-labelledby");
906
943
  if (a) {
907
- const c = a.split(/\s+/).map((h) => {
944
+ const u = a.split(/\s+/).map((h) => {
908
945
  var l, m;
909
946
  return ((m = (l = t.ownerDocument.getElementById(h)) == null ? void 0 : l.textContent) == null ? void 0 : m.trim()) ?? "";
910
947
  }).filter(Boolean);
911
- if (c.length) return c.join(" ");
948
+ if (u.length) return u.join(" ");
912
949
  }
913
950
  const e = (r = t.getAttribute("aria-label")) == null ? void 0 : r.trim();
914
951
  if (e) return e;
@@ -917,7 +954,7 @@ function Fe(t) {
917
954
  const n = (s = t.getAttribute("title")) == null ? void 0 : s.trim();
918
955
  return n || "";
919
956
  }
920
- const je = {
957
+ const Ve = {
921
958
  id: "svg-img-alt",
922
959
  wcag: ["1.1.1"],
923
960
  level: "A",
@@ -928,12 +965,12 @@ const je = {
928
965
  const a = [], e = 'svg[role="img"], [role="graphics-document"], [role="graphics-symbol"]';
929
966
  for (const i of t.querySelectorAll(e)) {
930
967
  if (p(i)) continue;
931
- if (!Fe(i)) {
968
+ if (!Pe(i)) {
932
969
  const r = i.getAttribute("role");
933
970
  a.push({
934
971
  ruleId: "svg-img-alt",
935
972
  selector: d(i),
936
- html: u(i),
973
+ html: c(i),
937
974
  impact: "serious",
938
975
  message: `${i.tagName.toLowerCase()} with role='${r}' has no accessible name.`
939
976
  });
@@ -941,7 +978,7 @@ const je = {
941
978
  }
942
979
  return a;
943
980
  }
944
- }, Pe = {
981
+ }, ze = {
945
982
  id: "input-image-alt",
946
983
  wcag: ["1.1.1", "4.1.2"],
947
984
  level: "A",
@@ -954,13 +991,13 @@ const je = {
954
991
  p(e) || v(e) || a.push({
955
992
  ruleId: "input-image-alt",
956
993
  selector: d(e),
957
- html: u(e),
994
+ html: c(e),
958
995
  impact: "critical",
959
996
  message: "Image input missing alt text."
960
997
  });
961
998
  return a;
962
999
  }
963
- }, Ve = {
1000
+ }, Ue = {
964
1001
  id: "image-redundant-alt",
965
1002
  wcag: [],
966
1003
  level: "A",
@@ -980,7 +1017,7 @@ const je = {
980
1017
  o && o === n && a.push({
981
1018
  ruleId: "image-redundant-alt",
982
1019
  selector: d(i),
983
- html: u(i),
1020
+ html: c(i),
984
1021
  impact: "minor",
985
1022
  message: `Alt text "${i.getAttribute("alt")}" duplicates surrounding ${r.tagName.toLowerCase()} text.`
986
1023
  });
@@ -988,7 +1025,7 @@ const je = {
988
1025
  }
989
1026
  return a;
990
1027
  }
991
- }, ze = ["image", "picture", "photo", "graphic", "icon", "img"], Ue = {
1028
+ }, Ge = ["image", "picture", "photo", "graphic", "icon", "img"], Xe = {
992
1029
  id: "image-alt-redundant-words",
993
1030
  wcag: [],
994
1031
  level: "A",
@@ -1000,17 +1037,17 @@ const je = {
1000
1037
  const a = [];
1001
1038
  for (const e of t.querySelectorAll("img[alt]")) {
1002
1039
  const i = e.getAttribute("alt").toLowerCase();
1003
- i && ze.some((n) => i.split(/\s+/).includes(n)) && a.push({
1040
+ i && Ge.some((n) => i.split(/\s+/).includes(n)) && a.push({
1004
1041
  ruleId: "image-alt-redundant-words",
1005
1042
  selector: d(e),
1006
- html: u(e),
1043
+ html: c(e),
1007
1044
  impact: "minor",
1008
1045
  message: `Alt text "${e.getAttribute("alt")}" contains redundant word(s).`
1009
1046
  });
1010
1047
  }
1011
1048
  return a;
1012
1049
  }
1013
- }, Ge = {
1050
+ }, Ye = {
1014
1051
  id: "area-alt",
1015
1052
  wcag: ["1.1.1", "4.1.2"],
1016
1053
  level: "A",
@@ -1024,7 +1061,7 @@ const je = {
1024
1061
  v(e) || a.push({
1025
1062
  ruleId: "area-alt",
1026
1063
  selector: d(e),
1027
- html: u(e),
1064
+ html: c(e),
1028
1065
  impact: "critical",
1029
1066
  message: "Image map <area> element is missing alternative text."
1030
1067
  });
@@ -1032,13 +1069,13 @@ const je = {
1032
1069
  return a;
1033
1070
  }
1034
1071
  };
1035
- function Xe(t) {
1072
+ function Ke(t) {
1036
1073
  var n, r;
1037
1074
  const a = t.getAttribute("aria-labelledby");
1038
1075
  if (a) {
1039
1076
  const o = a.split(/\s+/).map((s) => {
1040
- var c, h;
1041
- return ((h = (c = t.ownerDocument.getElementById(s)) == null ? void 0 : c.textContent) == null ? void 0 : h.trim()) ?? "";
1077
+ var u, h;
1078
+ return ((h = (u = t.ownerDocument.getElementById(s)) == null ? void 0 : u.textContent) == null ? void 0 : h.trim()) ?? "";
1042
1079
  }).filter(Boolean);
1043
1080
  if (o.length) return o.join(" ");
1044
1081
  }
@@ -1047,7 +1084,7 @@ function Xe(t) {
1047
1084
  const i = (r = t.getAttribute("title")) == null ? void 0 : r.trim();
1048
1085
  return i || "";
1049
1086
  }
1050
- const Ye = {
1087
+ const Qe = {
1051
1088
  id: "object-alt",
1052
1089
  wcag: ["1.1.1"],
1053
1090
  level: "A",
@@ -1067,7 +1104,7 @@ const Ye = {
1067
1104
  }
1068
1105
  n = n.parentElement;
1069
1106
  }
1070
- if (r || i.getAttribute("role") === "presentation" || i.getAttribute("role") === "none" || Xe(i)) continue;
1107
+ if (r || i.getAttribute("role") === "presentation" || i.getAttribute("role") === "none" || Ke(i)) continue;
1071
1108
  const o = i.getAttribute("data") || "";
1072
1109
  if (!((i.getAttribute("type") || "").startsWith("image/") || /\.(png|jpg|jpeg|gif|svg|webp|bmp|ico)$/i.test(o))) {
1073
1110
  const h = i.querySelector("img[alt]");
@@ -1076,14 +1113,14 @@ const Ye = {
1076
1113
  a.push({
1077
1114
  ruleId: "object-alt",
1078
1115
  selector: d(i),
1079
- html: u(i),
1116
+ html: c(i),
1080
1117
  impact: "serious",
1081
1118
  message: "<object> element is missing alternative text. Add aria-label, aria-labelledby, or a title attribute."
1082
1119
  });
1083
1120
  }
1084
1121
  return a;
1085
1122
  }
1086
- }, Ke = {
1123
+ }, Je = {
1087
1124
  id: "role-img-alt",
1088
1125
  wcag: ["1.1.1"],
1089
1126
  level: "A",
@@ -1097,7 +1134,7 @@ const Ye = {
1097
1134
  v(e) || a.push({
1098
1135
  ruleId: "role-img-alt",
1099
1136
  selector: d(e),
1100
- html: u(e),
1137
+ html: c(e),
1101
1138
  impact: "serious",
1102
1139
  message: "Element with role='img' has no accessible name. Add aria-label or aria-labelledby."
1103
1140
  });
@@ -1105,7 +1142,7 @@ const Ye = {
1105
1142
  return a;
1106
1143
  }
1107
1144
  };
1108
- function fi(t) {
1145
+ function yi(t) {
1109
1146
  if (typeof t != "object" || t === null)
1110
1147
  return "Rule spec must be an object";
1111
1148
  const a = t;
@@ -1135,10 +1172,10 @@ function fi(t) {
1135
1172
  return "Rule must have a wcag array";
1136
1173
  if (typeof a.level != "string" || !["A", "AA"].includes(a.level))
1137
1174
  return "Rule must have level A or AA";
1138
- const n = Qe(e);
1175
+ const n = Ze(e);
1139
1176
  return n || null;
1140
1177
  }
1141
- function Qe(t) {
1178
+ function Ze(t) {
1142
1179
  switch (t.type) {
1143
1180
  case "selector-exists":
1144
1181
  return null;
@@ -1182,7 +1219,7 @@ function k(t) {
1182
1219
  a && p(n) || i.push({
1183
1220
  ruleId: t.id,
1184
1221
  selector: d(n),
1185
- html: u(n),
1222
+ html: c(n),
1186
1223
  impact: t.impact,
1187
1224
  message: x(t.message, n, t.check),
1188
1225
  element: n
@@ -1193,11 +1230,11 @@ function k(t) {
1193
1230
  const { attribute: n, operator: r, value: o } = t.check;
1194
1231
  for (const s of e.querySelectorAll(t.selector)) {
1195
1232
  if (a && p(s)) continue;
1196
- const c = s.getAttribute(n);
1197
- c !== null && Je(c, r, o) && i.push({
1233
+ const u = s.getAttribute(n);
1234
+ u !== null && et(u, r, o) && i.push({
1198
1235
  ruleId: t.id,
1199
1236
  selector: d(s),
1200
- html: u(s),
1237
+ html: c(s),
1201
1238
  impact: t.impact,
1202
1239
  message: x(t.message, s, t.check),
1203
1240
  element: s
@@ -1211,7 +1248,7 @@ function k(t) {
1211
1248
  a && p(r) || r.hasAttribute(n) || i.push({
1212
1249
  ruleId: t.id,
1213
1250
  selector: d(r),
1214
- html: u(r),
1251
+ html: c(r),
1215
1252
  impact: t.impact,
1216
1253
  message: x(t.message, r, t.check),
1217
1254
  element: r
@@ -1220,9 +1257,9 @@ function k(t) {
1220
1257
  }
1221
1258
  case "attribute-regex": {
1222
1259
  const { attribute: n, pattern: r, flags: o, shouldMatch: s } = t.check;
1223
- let c;
1260
+ let u;
1224
1261
  try {
1225
- c = new RegExp(r, o);
1262
+ u = new RegExp(r, o);
1226
1263
  } catch {
1227
1264
  break;
1228
1265
  }
@@ -1230,18 +1267,18 @@ function k(t) {
1230
1267
  if (a && p(h)) continue;
1231
1268
  const l = h.getAttribute(n);
1232
1269
  if (l === null) continue;
1233
- const m = c.test(l);
1270
+ const m = u.test(l);
1234
1271
  s && !m ? i.push({
1235
1272
  ruleId: t.id,
1236
1273
  selector: d(h),
1237
- html: u(h),
1274
+ html: c(h),
1238
1275
  impact: t.impact,
1239
1276
  message: x(t.message, h, t.check),
1240
1277
  element: h
1241
1278
  }) : !s && m && i.push({
1242
1279
  ruleId: t.id,
1243
1280
  selector: d(h),
1244
- html: u(h),
1281
+ html: c(h),
1245
1282
  impact: t.impact,
1246
1283
  message: x(t.message, h, t.check),
1247
1284
  element: h
@@ -1255,7 +1292,7 @@ function k(t) {
1255
1292
  a && p(r) || r.querySelector(n) || i.push({
1256
1293
  ruleId: t.id,
1257
1294
  selector: d(r),
1258
- html: u(r),
1295
+ html: c(r),
1259
1296
  impact: t.impact,
1260
1297
  message: x(t.message, r, t.check),
1261
1298
  element: r
@@ -1273,7 +1310,7 @@ function k(t) {
1273
1310
  i.push({
1274
1311
  ruleId: t.id,
1275
1312
  selector: d(o),
1276
- html: u(o),
1313
+ html: c(o),
1277
1314
  impact: t.impact,
1278
1315
  message: x(t.message, o, t.check),
1279
1316
  element: o
@@ -1288,7 +1325,7 @@ function k(t) {
1288
1325
  }
1289
1326
  };
1290
1327
  }
1291
- function Je(t, a, e) {
1328
+ function et(t, a, e) {
1292
1329
  switch (a) {
1293
1330
  case ">":
1294
1331
  return parseFloat(t) > e;
@@ -1306,7 +1343,7 @@ function Je(t, a, e) {
1306
1343
  return !1;
1307
1344
  }
1308
1345
  }
1309
- const Ze = {
1346
+ const tt = {
1310
1347
  id: "server-side-image-map",
1311
1348
  selector: "img[ismap], input[type='image'][ismap]",
1312
1349
  check: { type: "selector-exists" },
@@ -1317,7 +1354,7 @@ const Ze = {
1317
1354
  level: "A",
1318
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.",
1319
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."
1320
- }, et = k(Ze), tt = [
1357
+ }, at = k(tt), it = [
1321
1358
  '[role="checkbox"]',
1322
1359
  '[role="combobox"]',
1323
1360
  '[role="listbox"]',
@@ -1329,13 +1366,13 @@ const Ze = {
1329
1366
  '[role="spinbutton"]',
1330
1367
  '[role="switch"]',
1331
1368
  '[role="textbox"]'
1332
- ].join(", "), at = /* @__PURE__ */ new Set([
1369
+ ].join(", "), nt = /* @__PURE__ */ new Set([
1333
1370
  "checkbox",
1334
1371
  "menuitemcheckbox",
1335
1372
  "menuitemradio",
1336
1373
  "radio",
1337
1374
  "switch"
1338
- ]), it = /* @__PURE__ */ new Set([
1375
+ ]), rt = /* @__PURE__ */ new Set([
1339
1376
  "combobox",
1340
1377
  "listbox",
1341
1378
  "searchbox",
@@ -1343,10 +1380,10 @@ const Ze = {
1343
1380
  "spinbutton",
1344
1381
  "textbox"
1345
1382
  ]);
1346
- function nt(t) {
1347
- var o, s, c, h;
1383
+ function ot(t) {
1384
+ var o, s, u, h;
1348
1385
  const a = (o = t.getAttribute("role")) == null ? void 0 : o.trim().toLowerCase();
1349
- if (a && at.has(a) || (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && !(a && it.has(a)))
1386
+ if (a && nt.has(a) || (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && !(a && rt.has(a)))
1350
1387
  return v(t);
1351
1388
  const i = t.getAttribute("aria-labelledby");
1352
1389
  if (i) {
@@ -1372,7 +1409,7 @@ function nt(t) {
1372
1409
  if (m) return m;
1373
1410
  }
1374
1411
  }
1375
- const r = (c = t.getAttribute("title")) == null ? void 0 : c.trim();
1412
+ const r = (u = t.getAttribute("title")) == null ? void 0 : u.trim();
1376
1413
  if (r) return r;
1377
1414
  if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) {
1378
1415
  const l = (h = t.getAttribute("placeholder")) == null ? void 0 : h.trim();
@@ -1380,7 +1417,7 @@ function nt(t) {
1380
1417
  }
1381
1418
  return "";
1382
1419
  }
1383
- const rt = {
1420
+ const st = {
1384
1421
  id: "label",
1385
1422
  wcag: ["4.1.2"],
1386
1423
  level: "A",
@@ -1389,22 +1426,22 @@ const rt = {
1389
1426
  prompt: "Based on the input type, name attribute, or placeholder, suggest a label element with appropriate text, or an aria-label.",
1390
1427
  run(t) {
1391
1428
  var n;
1392
- const a = [], i = t.querySelectorAll(`input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, ${tt}`);
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}`);
1393
1430
  for (const r of i) {
1394
1431
  if (p(r) || r instanceof HTMLElement && (r.hidden || r.style.display === "none")) continue;
1395
1432
  const o = (n = r.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase();
1396
1433
  if (o === "presentation" || o === "none") continue;
1397
- nt(r) || a.push({
1434
+ ot(r) || a.push({
1398
1435
  ruleId: "label",
1399
1436
  selector: d(r),
1400
- html: u(r),
1437
+ html: c(r),
1401
1438
  impact: "critical",
1402
1439
  message: "Form element has no accessible label."
1403
1440
  });
1404
1441
  }
1405
1442
  return a;
1406
1443
  }
1407
- }, ot = {
1444
+ }, lt = {
1408
1445
  id: "form-field-multiple-labels",
1409
1446
  wcag: [],
1410
1447
  level: "A",
@@ -1429,14 +1466,14 @@ const rt = {
1429
1466
  s > 1 && a.push({
1430
1467
  ruleId: "form-field-multiple-labels",
1431
1468
  selector: d(i),
1432
- html: u(i),
1469
+ html: c(i),
1433
1470
  impact: "moderate",
1434
1471
  message: `Form field has ${s} labels. Use a single label element.`
1435
1472
  });
1436
1473
  }
1437
1474
  return a;
1438
1475
  }
1439
- }, st = {
1476
+ }, ct = {
1440
1477
  id: "select-name",
1441
1478
  wcag: ["4.1.2"],
1442
1479
  level: "A",
@@ -1449,13 +1486,13 @@ const rt = {
1449
1486
  p(e) || v(e) || a.push({
1450
1487
  ruleId: "select-name",
1451
1488
  selector: d(e),
1452
- html: u(e),
1489
+ html: c(e),
1453
1490
  impact: "critical",
1454
1491
  message: "Select element has no accessible name."
1455
1492
  });
1456
1493
  return a;
1457
1494
  }
1458
- }, lt = {
1495
+ }, ut = {
1459
1496
  id: "input-button-name",
1460
1497
  wcag: ["4.1.2"],
1461
1498
  level: "A",
@@ -1473,14 +1510,14 @@ const rt = {
1473
1510
  !r && !s && !v(n) && a.push({
1474
1511
  ruleId: "input-button-name",
1475
1512
  selector: d(n),
1476
- html: u(n),
1513
+ html: c(n),
1477
1514
  impact: "critical",
1478
1515
  message: "Input button has no discernible text."
1479
1516
  });
1480
1517
  }
1481
1518
  return a;
1482
1519
  }
1483
- }, ct = /* @__PURE__ */ new Set([
1520
+ }, dt = /* @__PURE__ */ new Set([
1484
1521
  "off",
1485
1522
  "on",
1486
1523
  "name",
@@ -1535,7 +1572,7 @@ const rt = {
1535
1572
  "impp",
1536
1573
  "url",
1537
1574
  "photo"
1538
- ]), ut = /* @__PURE__ */ new Set([
1575
+ ]), mt = /* @__PURE__ */ new Set([
1539
1576
  "tel",
1540
1577
  "tel-country-code",
1541
1578
  "tel-national",
@@ -1544,18 +1581,18 @@ const rt = {
1544
1581
  "tel-extension",
1545
1582
  "email",
1546
1583
  "impp"
1547
- ]), dt = /* @__PURE__ */ new Set(["home", "work", "mobile", "fax", "pager"]), mt = /* @__PURE__ */ new Set(["shipping", "billing"]), ht = /* @__PURE__ */ new Set(["webauthn"]);
1548
- function pt(t) {
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) {
1549
1586
  const a = t.toLowerCase().split(/\s+/).filter(Boolean);
1550
1587
  if (a.length === 0) return !0;
1551
1588
  let e = 0;
1552
- a[e].startsWith("section-") && e++, e < a.length && mt.has(a[e]) && e++;
1589
+ a[e].startsWith("section-") && e++, e < a.length && pt.has(a[e]) && e++;
1553
1590
  let i = !1;
1554
- if (e < a.length && dt.has(a[e]) && (i = !0, e++), e >= a.length) return !1;
1591
+ if (e < a.length && ht.has(a[e]) && (i = !0, e++), e >= a.length) return !1;
1555
1592
  const n = a[e];
1556
- return !ct.has(n) || i && !ut.has(n) ? !1 : (e++, e < a.length && ht.has(a[e]) && e++, e === a.length);
1593
+ return !dt.has(n) || i && !mt.has(n) ? !1 : (e++, e < a.length && gt.has(a[e]) && e++, e === a.length);
1557
1594
  }
1558
- const gt = {
1595
+ const ft = {
1559
1596
  id: "autocomplete-valid",
1560
1597
  wcag: ["1.3.5"],
1561
1598
  level: "AA",
@@ -1567,10 +1604,10 @@ const gt = {
1567
1604
  for (const e of t.querySelectorAll("[autocomplete]")) {
1568
1605
  if (p(e) || e instanceof HTMLElement && e.style.display === "none" || e.disabled || e.getAttribute("aria-disabled") === "true") continue;
1569
1606
  const i = e.getAttribute("autocomplete").trim();
1570
- i && (pt(i) || a.push({
1607
+ i && (bt(i) || a.push({
1571
1608
  ruleId: "autocomplete-valid",
1572
1609
  selector: d(e),
1573
- html: u(e),
1610
+ html: c(e),
1574
1611
  impact: "serious",
1575
1612
  message: `Invalid autocomplete value "${i}".`
1576
1613
  }));
@@ -1578,16 +1615,16 @@ const gt = {
1578
1615
  return a;
1579
1616
  }
1580
1617
  };
1581
- function Q(t) {
1618
+ function Z(t) {
1582
1619
  return t.toLowerCase().replace(/\s+/g, " ").trim();
1583
1620
  }
1584
- function J(t, a) {
1585
- const e = Q(t), i = Q(a);
1621
+ function ee(t, a) {
1622
+ const e = Z(t), i = Z(a);
1586
1623
  if (!e || !i || e.includes(i) || i.includes(e)) return !0;
1587
1624
  const n = i.split(/\s+/).map((r) => r.replace(/[.,;:!?\u2026]+$/g, "")).filter((r) => r.length > 2);
1588
1625
  return n.length >= 2 && n.filter((o) => e.includes(o)).length / n.length > 0.5;
1589
1626
  }
1590
- function P(t) {
1627
+ function V(t) {
1591
1628
  let a = "";
1592
1629
  for (const e of t.childNodes)
1593
1630
  if (e.nodeType === 3)
@@ -1597,11 +1634,11 @@ function P(t) {
1597
1634
  if (n === "style" || n === "script" || n === "svg" || i.getAttribute("aria-hidden") === "true" || i instanceof HTMLElement && i.style.display === "none") continue;
1598
1635
  const r = i.getAttribute("role");
1599
1636
  if (r === "img" || r === "presentation" || r === "none") continue;
1600
- a += P(i);
1637
+ a += V(i);
1601
1638
  }
1602
1639
  return a;
1603
1640
  }
1604
- const bt = {
1641
+ const vt = {
1605
1642
  id: "label-content-name-mismatch",
1606
1643
  wcag: ["2.5.3"],
1607
1644
  level: "A",
@@ -1615,14 +1652,14 @@ const bt = {
1615
1652
  const i = v(e);
1616
1653
  if (!i) continue;
1617
1654
  let n = "";
1618
- e instanceof HTMLInputElement ? n = e.value || "" : n = P(e);
1655
+ e instanceof HTMLInputElement ? n = e.value || "" : n = V(e);
1619
1656
  const r = n.trim();
1620
1657
  if (!r || r.length <= 2) continue;
1621
1658
  const o = e.hasAttribute("aria-label"), s = e.hasAttribute("aria-labelledby");
1622
- !o && !s || J(i, n) || a.push({
1659
+ !o && !s || ee(i, n) || a.push({
1623
1660
  ruleId: "label-content-name-mismatch",
1624
1661
  selector: d(e),
1625
- html: u(e),
1662
+ html: c(e),
1626
1663
  impact: "serious",
1627
1664
  message: `Accessible name "${i}" does not contain visible text "${n.trim()}".`
1628
1665
  });
@@ -1635,19 +1672,19 @@ const bt = {
1635
1672
  let o = "";
1636
1673
  if (r) {
1637
1674
  const s = t.querySelector(`label[for="${CSS.escape(r)}"]`);
1638
- s && (o = P(s));
1675
+ s && (o = V(s));
1639
1676
  }
1640
- o.trim() && (J(i, o) || a.push({
1677
+ o.trim() && (ee(i, o) || a.push({
1641
1678
  ruleId: "label-content-name-mismatch",
1642
1679
  selector: d(e),
1643
- html: u(e),
1680
+ html: c(e),
1644
1681
  impact: "serious",
1645
1682
  message: `Accessible name "${i}" does not contain visible label "${o.trim()}".`
1646
1683
  }));
1647
1684
  }
1648
1685
  return a;
1649
1686
  }
1650
- }, ft = {
1687
+ }, wt = {
1651
1688
  id: "label-title-only",
1652
1689
  wcag: [],
1653
1690
  level: "A",
@@ -1662,7 +1699,7 @@ const bt = {
1662
1699
  );
1663
1700
  for (const s of e) {
1664
1701
  if (p(s)) continue;
1665
- const c = 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 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");
1666
1703
  let m = !1;
1667
1704
  const g = s.id;
1668
1705
  if (g) {
@@ -1670,17 +1707,17 @@ const bt = {
1670
1707
  (r = f == null ? void 0 : f.textContent) != null && r.trim() && (m = !0);
1671
1708
  }
1672
1709
  const b = s.closest("label");
1673
- (o = b == null ? void 0 : b.textContent) != null && o.trim() && (m = !0), c && !h && !l && !m && a.push({
1710
+ (o = b == null ? void 0 : b.textContent) != null && o.trim() && (m = !0), u && !h && !l && !m && a.push({
1674
1711
  ruleId: "label-title-only",
1675
1712
  selector: d(s),
1676
- html: u(s),
1713
+ html: c(s),
1677
1714
  impact: "serious",
1678
1715
  message: "Form element uses title attribute as only label. Use <label>, aria-label, or aria-labelledby instead."
1679
1716
  });
1680
1717
  }
1681
1718
  return a;
1682
1719
  }
1683
- }, vt = {
1720
+ }, yt = {
1684
1721
  id: "tabindex",
1685
1722
  selector: "[tabindex]",
1686
1723
  check: { type: "attribute-value", attribute: "tabindex", operator: ">", value: 0 },
@@ -1692,7 +1729,7 @@ const bt = {
1692
1729
  tags: ["best-practice"],
1693
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.",
1694
1731
  prompt: "Change the positive tabindex value to tabindex='0' and rely on DOM order for tab sequence instead."
1695
- }, wt = k(vt), yt = /* @__PURE__ */ new Set([
1732
+ }, At = k(yt), St = /* @__PURE__ */ new Set([
1696
1733
  "div",
1697
1734
  "span",
1698
1735
  "p",
@@ -1719,7 +1756,7 @@ const bt = {
1719
1756
  "tr",
1720
1757
  "td",
1721
1758
  "th"
1722
- ]), At = {
1759
+ ]), xt = {
1723
1760
  id: "focus-order-semantics",
1724
1761
  wcag: [],
1725
1762
  tags: ["best-practice"],
@@ -1731,18 +1768,18 @@ const bt = {
1731
1768
  const a = [];
1732
1769
  for (const e of t.querySelectorAll('[tabindex="0"]')) {
1733
1770
  const i = e.tagName.toLowerCase();
1734
- if (!yt.has(i)) continue;
1771
+ if (!St.has(i)) continue;
1735
1772
  e.getAttribute("role") || a.push({
1736
1773
  ruleId: "focus-order-semantics",
1737
1774
  selector: d(e),
1738
- html: u(e),
1775
+ html: c(e),
1739
1776
  impact: "moderate",
1740
1777
  message: `Non-interactive <${i}> with tabindex="0" has no interactive role.`
1741
1778
  });
1742
1779
  }
1743
1780
  return a;
1744
1781
  }
1745
- }, St = /* @__PURE__ */ new Set([
1782
+ }, kt = /* @__PURE__ */ new Set([
1746
1783
  "a",
1747
1784
  "audio",
1748
1785
  "button",
@@ -1751,7 +1788,7 @@ const bt = {
1751
1788
  "select",
1752
1789
  "textarea",
1753
1790
  "video"
1754
- ]), xt = /* @__PURE__ */ new Set([
1791
+ ]), It = /* @__PURE__ */ new Set([
1755
1792
  "button",
1756
1793
  "checkbox",
1757
1794
  "combobox",
@@ -1775,7 +1812,7 @@ const bt = {
1775
1812
  "tabpanel",
1776
1813
  "textbox",
1777
1814
  "treeitem"
1778
- ]), kt = {
1815
+ ]), Et = {
1779
1816
  grid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader"]),
1780
1817
  listbox: /* @__PURE__ */ new Set(["option"]),
1781
1818
  menu: /* @__PURE__ */ new Set(["menuitem", "menuitemcheckbox", "menuitemradio"]),
@@ -1785,26 +1822,26 @@ const bt = {
1785
1822
  tree: /* @__PURE__ */ new Set(["treeitem"]),
1786
1823
  treegrid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader", "treeitem"])
1787
1824
  };
1788
- function It(t, a) {
1825
+ function Tt(t, a) {
1789
1826
  var n, r, o;
1790
1827
  const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase(), i = (r = a.getAttribute("role")) == null ? void 0 : r.toLowerCase();
1791
- return !e || !i ? !1 : ((o = kt[e]) == null ? void 0 : o.has(i)) ?? !1;
1828
+ return !e || !i ? !1 : ((o = Et[e]) == null ? void 0 : o.has(i)) ?? !1;
1792
1829
  }
1793
- function Et(t) {
1830
+ function Lt(t) {
1794
1831
  var n;
1795
1832
  const a = t.tagName.toLowerCase();
1796
- if (St.has(a))
1833
+ if (kt.has(a))
1797
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);
1798
1835
  const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase();
1799
- if (e && xt.has(e)) return !0;
1836
+ if (e && It.has(e)) return !0;
1800
1837
  const i = t.getAttribute("tabindex");
1801
1838
  return i !== null && i !== "-1" || t.getAttribute("contenteditable") === "true";
1802
1839
  }
1803
- function Tt(t) {
1840
+ function Ct(t) {
1804
1841
  const a = t.tagName.toLowerCase();
1805
1842
  return !!(a === "a" && t.hasAttribute("href") || a === "button" && !t.disabled);
1806
1843
  }
1807
- const Lt = {
1844
+ const qt = {
1808
1845
  id: "nested-interactive",
1809
1846
  wcag: ["4.1.2"],
1810
1847
  level: "A",
@@ -1819,24 +1856,24 @@ const Lt = {
1819
1856
  for (; o; ) {
1820
1857
  for (; r.length > 0 && !r[r.length - 1].contains(o); )
1821
1858
  r.pop();
1822
- if (!p(o) && Et(o)) {
1859
+ if (!p(o) && Lt(o)) {
1823
1860
  if (r.length > 0) {
1824
1861
  const s = r[r.length - 1];
1825
- It(s, o) || a.push({
1862
+ Tt(s, o) || a.push({
1826
1863
  ruleId: "nested-interactive",
1827
1864
  selector: d(o),
1828
- html: u(o),
1865
+ html: c(o),
1829
1866
  impact: "serious",
1830
1867
  message: `Interactive element <${o.tagName.toLowerCase()}> is nested inside <${s.tagName.toLowerCase()}>.`
1831
1868
  });
1832
1869
  }
1833
- Tt(o) && r.push(o);
1870
+ Ct(o) && r.push(o);
1834
1871
  }
1835
1872
  o = n.nextNode();
1836
1873
  }
1837
1874
  return a;
1838
1875
  }
1839
- }, Ct = {
1876
+ }, Rt = {
1840
1877
  id: "scrollable-region-focusable",
1841
1878
  wcag: ["2.1.1"],
1842
1879
  level: "A",
@@ -1848,21 +1885,27 @@ const Lt = {
1848
1885
  for (const e of t.querySelectorAll("*")) {
1849
1886
  if (p(e) || !(e instanceof HTMLElement)) continue;
1850
1887
  const i = A(e), n = i.overflowX, r = i.overflowY;
1851
- if (!(n === "scroll" || n === "auto" || r === "scroll" || r === "auto") || !(e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth)) continue;
1852
- const c = e.getAttribute("tabindex");
1853
- c !== null && c !== "-1" || e.querySelector(
1888
+ if (!(n === "scroll" || n === "auto" || r === "scroll" || r === "auto")) continue;
1889
+ if (e.scrollHeight > 0 || e.clientHeight > 0) {
1890
+ if (e.scrollHeight <= e.clientHeight && e.scrollWidth <= e.clientWidth) continue;
1891
+ } else {
1892
+ const l = i.height !== "" || i.maxHeight !== "", m = e.textContent != null && e.textContent.trim().length > 0;
1893
+ if (!l || !m) continue;
1894
+ }
1895
+ const u = e.getAttribute("tabindex");
1896
+ u !== null && u !== "-1" || e.querySelector(
1854
1897
  'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
1855
1898
  ) || a.push({
1856
1899
  ruleId: "scrollable-region-focusable",
1857
1900
  selector: d(e),
1858
- html: u(e),
1901
+ html: c(e),
1859
1902
  impact: "serious",
1860
1903
  message: "Scrollable region is not keyboard accessible. Add tabindex='0' or include focusable elements."
1861
1904
  });
1862
1905
  }
1863
1906
  return a;
1864
1907
  }
1865
- }, qt = {
1908
+ }, Nt = {
1866
1909
  id: "accesskeys",
1867
1910
  wcag: [],
1868
1911
  level: "A",
@@ -1886,13 +1929,13 @@ const Lt = {
1886
1929
  a.push({
1887
1930
  ruleId: "accesskeys",
1888
1931
  selector: d(o),
1889
- html: u(o),
1932
+ html: c(o),
1890
1933
  impact: "serious",
1891
1934
  message: `Duplicate accesskey "${n}". Each accesskey must be unique.`
1892
1935
  });
1893
1936
  return a;
1894
1937
  }
1895
- }, Rt = {
1938
+ }, Mt = {
1896
1939
  id: "heading-order",
1897
1940
  wcag: [],
1898
1941
  level: "A",
@@ -1909,15 +1952,15 @@ const Lt = {
1909
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({
1910
1953
  ruleId: "heading-order",
1911
1954
  selector: d(r),
1912
- html: u(r),
1955
+ html: c(r),
1913
1956
  impact: "moderate",
1914
1957
  message: `Heading level ${o} skipped from level ${i}.`,
1915
- context: n ? `Previous heading: ${u(n)}` : void 0
1958
+ context: n ? `Previous heading: ${c(n)}` : void 0
1916
1959
  }), i = o, n = r;
1917
1960
  }
1918
1961
  return a;
1919
1962
  }
1920
- }, N = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', Z = '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"]', Nt = {
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 = {
1921
1964
  id: "landmark-one-main",
1922
1965
  wcag: [],
1923
1966
  level: "A",
@@ -1936,12 +1979,12 @@ const Lt = {
1936
1979
  }] : a.length > 1 ? Array.from(a).slice(1).map((e) => ({
1937
1980
  ruleId: "landmark-one-main",
1938
1981
  selector: d(e),
1939
- html: u(e),
1982
+ html: c(e),
1940
1983
  impact: "moderate",
1941
1984
  message: "Page has multiple main landmarks."
1942
1985
  })) : [];
1943
1986
  }
1944
- }, Mt = {
1987
+ }, Ht = {
1945
1988
  id: "landmark-no-duplicate-banner",
1946
1989
  wcag: [],
1947
1990
  level: "A",
@@ -1955,13 +1998,13 @@ const Lt = {
1955
1998
  (n) => a.push({
1956
1999
  ruleId: "landmark-no-duplicate-banner",
1957
2000
  selector: d(n),
1958
- html: u(n),
2001
+ html: c(n),
1959
2002
  impact: "moderate",
1960
2003
  message: "Page has multiple banner landmarks."
1961
2004
  })
1962
2005
  ), a;
1963
2006
  }
1964
- }, $t = {
2007
+ }, Dt = {
1965
2008
  id: "landmark-no-duplicate-contentinfo",
1966
2009
  wcag: [],
1967
2010
  level: "A",
@@ -1975,13 +2018,13 @@ const Lt = {
1975
2018
  (n) => a.push({
1976
2019
  ruleId: "landmark-no-duplicate-contentinfo",
1977
2020
  selector: d(n),
1978
- html: u(n),
2021
+ html: c(n),
1979
2022
  impact: "moderate",
1980
2023
  message: "Page has multiple contentinfo landmarks."
1981
2024
  })
1982
2025
  ), a;
1983
2026
  }
1984
- }, Ht = {
2027
+ }, Ot = {
1985
2028
  id: "landmark-no-duplicate-main",
1986
2029
  wcag: [],
1987
2030
  level: "A",
@@ -1995,13 +2038,13 @@ const Lt = {
1995
2038
  (i) => a.push({
1996
2039
  ruleId: "landmark-no-duplicate-main",
1997
2040
  selector: d(i),
1998
- html: u(i),
2041
+ html: c(i),
1999
2042
  impact: "moderate",
2000
2043
  message: "Page has multiple main landmarks."
2001
2044
  })
2002
2045
  ), a;
2003
2046
  }
2004
- }, Dt = {
2047
+ }, Wt = {
2005
2048
  id: "landmark-banner-is-top-level",
2006
2049
  wcag: [],
2007
2050
  level: "A",
@@ -2015,13 +2058,13 @@ const Lt = {
2015
2058
  i.closest(N) && a.push({
2016
2059
  ruleId: "landmark-banner-is-top-level",
2017
2060
  selector: d(i),
2018
- html: u(i),
2061
+ html: c(i),
2019
2062
  impact: "moderate",
2020
2063
  message: "Banner landmark is nested within another landmark."
2021
2064
  });
2022
2065
  return a;
2023
2066
  }
2024
- }, Ot = {
2067
+ }, Bt = {
2025
2068
  id: "landmark-contentinfo-is-top-level",
2026
2069
  wcag: [],
2027
2070
  level: "A",
@@ -2035,13 +2078,13 @@ const Lt = {
2035
2078
  i.closest(N) && a.push({
2036
2079
  ruleId: "landmark-contentinfo-is-top-level",
2037
2080
  selector: d(i),
2038
- html: u(i),
2081
+ html: c(i),
2039
2082
  impact: "moderate",
2040
2083
  message: "Contentinfo landmark is nested within another landmark."
2041
2084
  });
2042
2085
  return a;
2043
2086
  }
2044
- }, Bt = {
2087
+ }, _t = {
2045
2088
  id: "landmark-main-is-top-level",
2046
2089
  wcag: [],
2047
2090
  level: "A",
@@ -2056,14 +2099,14 @@ const Lt = {
2056
2099
  n != null && n.closest('article, aside, nav, section, [role="article"], [role="complementary"], [role="navigation"], [role="region"]') && a.push({
2057
2100
  ruleId: "landmark-main-is-top-level",
2058
2101
  selector: d(i),
2059
- html: u(i),
2102
+ html: c(i),
2060
2103
  impact: "moderate",
2061
2104
  message: "Main landmark is nested within another landmark."
2062
2105
  });
2063
2106
  }
2064
2107
  return a;
2065
2108
  }
2066
- }, Wt = {
2109
+ }, Ft = {
2067
2110
  id: "landmark-complementary-is-top-level",
2068
2111
  wcag: [],
2069
2112
  level: "A",
@@ -2078,14 +2121,14 @@ const Lt = {
2078
2121
  n && !n.matches('body, main, [role="main"]') && i.closest('article, nav, section, [role="article"], [role="navigation"], [role="region"]') && a.push({
2079
2122
  ruleId: "landmark-complementary-is-top-level",
2080
2123
  selector: d(i),
2081
- html: u(i),
2124
+ html: c(i),
2082
2125
  impact: "moderate",
2083
2126
  message: "Complementary landmark should be top-level."
2084
2127
  });
2085
2128
  }
2086
2129
  return a;
2087
2130
  }
2088
- }, _t = {
2131
+ }, jt = {
2089
2132
  id: "landmark-unique",
2090
2133
  wcag: [],
2091
2134
  level: "A",
@@ -2105,23 +2148,23 @@ const Lt = {
2105
2148
  if (r.length <= 1) continue;
2106
2149
  const o = /* @__PURE__ */ new Map();
2107
2150
  for (const s of r) {
2108
- const c = v(s).toLowerCase() || "", h = o.get(c) || [];
2109
- h.push(s), o.set(c, h);
2151
+ const u = v(s).toLowerCase() || "", h = o.get(u) || [];
2152
+ h.push(s), o.set(u, h);
2110
2153
  }
2111
- for (const [s, c] of o)
2112
- if (c.length > 1)
2113
- for (const h of c.slice(1))
2154
+ for (const [s, u] of o)
2155
+ if (u.length > 1)
2156
+ for (const h of u.slice(1))
2114
2157
  a.push({
2115
2158
  ruleId: "landmark-unique",
2116
2159
  selector: d(h),
2117
- html: u(h),
2160
+ html: c(h),
2118
2161
  impact: "moderate",
2119
2162
  message: s ? `Multiple ${n} landmarks have the same label "${s}".` : `Multiple ${n} landmarks have no label. Add unique aria-label attributes.`
2120
2163
  });
2121
2164
  }
2122
2165
  return a;
2123
2166
  }
2124
- }, Ft = {
2167
+ }, Pt = {
2125
2168
  id: "region",
2126
2169
  wcag: [],
2127
2170
  level: "A",
@@ -2135,18 +2178,18 @@ const Lt = {
2135
2178
  if (!e) return [];
2136
2179
  for (const n of e.children) {
2137
2180
  if (p(n) || n instanceof HTMLScriptElement || n instanceof HTMLStyleElement || n.tagName === "NOSCRIPT" || n instanceof HTMLElement && n.hidden || n.matches('a[href^="#"]')) continue;
2138
- const r = n.matches(Z), o = (i = n.textContent) == null ? void 0 : i.trim();
2139
- !r && o && (n.querySelector(Z) || a.push({
2181
+ const r = n.matches(te), o = (i = n.textContent) == null ? void 0 : i.trim();
2182
+ !r && o && (n.querySelector(te) || a.push({
2140
2183
  ruleId: "region",
2141
2184
  selector: d(n),
2142
- html: u(n),
2185
+ html: c(n),
2143
2186
  impact: "moderate",
2144
2187
  message: "Content is not contained within a landmark region."
2145
2188
  }));
2146
2189
  }
2147
2190
  return a;
2148
2191
  }
2149
- }, jt = {
2192
+ }, Vt = {
2150
2193
  id: "list",
2151
2194
  selector: "ul, ol",
2152
2195
  check: { type: "child-invalid", allowedChildren: ["li", "script", "template"] },
@@ -2157,7 +2200,7 @@ const Lt = {
2157
2200
  level: "A",
2158
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.",
2159
2202
  prompt: "Explain how to restructure this element within the list properly."
2160
- }, Pt = k(jt), Vt = {
2203
+ }, zt = k(Vt), Ut = {
2161
2204
  id: "dlitem",
2162
2205
  wcag: ["1.3.1"],
2163
2206
  level: "A",
@@ -2170,13 +2213,13 @@ const Lt = {
2170
2213
  (!e.parentElement || e.parentElement.tagName.toLowerCase() !== "dl") && a.push({
2171
2214
  ruleId: "dlitem",
2172
2215
  selector: d(e),
2173
- html: u(e),
2216
+ html: c(e),
2174
2217
  impact: "serious",
2175
2218
  message: `<${e.tagName.toLowerCase()}> is not contained in a <dl>.`
2176
2219
  });
2177
2220
  return a;
2178
2221
  }
2179
- }, zt = {
2222
+ }, Gt = {
2180
2223
  id: "definition-list",
2181
2224
  selector: "dl",
2182
2225
  check: { type: "child-invalid", allowedChildren: ["dt", "dd", "div", "script", "template"] },
@@ -2187,7 +2230,7 @@ const Lt = {
2187
2230
  level: "A",
2188
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.",
2189
2232
  prompt: "Explain whether to move this element outside the <dl> or convert it to dt/dd."
2190
- }, Ut = k(zt), Gt = {
2233
+ }, Xt = k(Gt), Yt = {
2191
2234
  id: "document-title",
2192
2235
  wcag: ["2.4.2"],
2193
2236
  level: "A",
@@ -2205,7 +2248,7 @@ const Lt = {
2205
2248
  message: a ? "Document <title> element is empty." : "Document is missing a <title> element."
2206
2249
  }] : [];
2207
2250
  }
2208
- }, Xt = {
2251
+ }, Kt = {
2209
2252
  id: "bypass",
2210
2253
  wcag: ["2.4.1"],
2211
2254
  level: "A",
@@ -2232,7 +2275,7 @@ const Lt = {
2232
2275
  message: "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link."
2233
2276
  }];
2234
2277
  }
2235
- }, Yt = {
2278
+ }, Qt = {
2236
2279
  id: "page-has-heading-one",
2237
2280
  wcag: [],
2238
2281
  level: "A",
@@ -2254,7 +2297,7 @@ const Lt = {
2254
2297
  message: "Page does not contain a level-one heading."
2255
2298
  }];
2256
2299
  }
2257
- }, Kt = {
2300
+ }, Jt = {
2258
2301
  id: "frame-title",
2259
2302
  wcag: ["4.1.2"],
2260
2303
  level: "A",
@@ -2268,14 +2311,14 @@ const Lt = {
2268
2311
  v(e) || a.push({
2269
2312
  ruleId: "frame-title",
2270
2313
  selector: d(e),
2271
- html: u(e),
2314
+ html: c(e),
2272
2315
  impact: "serious",
2273
2316
  message: "Frame is missing an accessible name. Add a title attribute."
2274
2317
  });
2275
2318
  }
2276
2319
  return a;
2277
2320
  }
2278
- }, Qt = {
2321
+ }, Zt = {
2279
2322
  id: "frame-title-unique",
2280
2323
  wcag: ["4.1.2"],
2281
2324
  level: "A",
@@ -2290,10 +2333,10 @@ const Lt = {
2290
2333
  if (p(r)) continue;
2291
2334
  const o = r.getAttribute("width"), s = r.getAttribute("height");
2292
2335
  if (o === "0" || s === "0" || r instanceof HTMLElement && r.style.display === "none" || r instanceof HTMLElement && r.style.visibility === "hidden") continue;
2293
- const c = (n = r.getAttribute("title")) == null ? void 0 : n.trim().toLowerCase();
2294
- if (c) {
2295
- const h = i.get(c) || [];
2296
- h.push(r), i.set(c, h);
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);
2297
2340
  }
2298
2341
  }
2299
2342
  for (const [, r] of i)
@@ -2302,13 +2345,13 @@ const Lt = {
2302
2345
  a.push({
2303
2346
  ruleId: "frame-title-unique",
2304
2347
  selector: d(o),
2305
- html: u(o),
2348
+ html: c(o),
2306
2349
  impact: "moderate",
2307
2350
  message: "Frame title is not unique. Use a distinct title for each frame."
2308
2351
  });
2309
2352
  return a;
2310
2353
  }
2311
- }, Jt = {
2354
+ }, ea = {
2312
2355
  id: "empty-heading",
2313
2356
  wcag: [],
2314
2357
  level: "A",
@@ -2322,13 +2365,13 @@ const Lt = {
2322
2365
  p(i) || v(i) || a.push({
2323
2366
  ruleId: "empty-heading",
2324
2367
  selector: d(i),
2325
- html: u(i),
2368
+ html: c(i),
2326
2369
  impact: "minor",
2327
2370
  message: "Heading is empty. Add text content or remove the heading element."
2328
2371
  });
2329
2372
  return a;
2330
2373
  }
2331
- }, Zt = {
2374
+ }, ta = {
2332
2375
  id: "meta-viewport",
2333
2376
  wcag: ["1.4.4"],
2334
2377
  level: "AA",
@@ -2343,7 +2386,7 @@ const Lt = {
2343
2386
  (/user-scalable\s*=\s*no/i.test(i) || /user-scalable\s*=\s*0/i.test(i)) && a.push({
2344
2387
  ruleId: "meta-viewport",
2345
2388
  selector: d(e),
2346
- html: u(e),
2389
+ html: c(e),
2347
2390
  impact: "critical",
2348
2391
  message: "Viewport disables user scaling. Remove user-scalable=no."
2349
2392
  });
@@ -2353,14 +2396,14 @@ const Lt = {
2353
2396
  s < 2 && a.push({
2354
2397
  ruleId: "meta-viewport",
2355
2398
  selector: d(e),
2356
- html: u(e),
2399
+ html: c(e),
2357
2400
  impact: "critical",
2358
2401
  message: `Viewport maximum-scale=${s} restricts zooming. Set to at least 2 or remove.`
2359
2402
  });
2360
2403
  }
2361
2404
  return a;
2362
2405
  }
2363
- }, ea = {
2406
+ }, aa = {
2364
2407
  id: "meta-refresh",
2365
2408
  wcag: ["2.2.1", "2.2.4", "3.2.5"],
2366
2409
  level: "A",
@@ -2376,7 +2419,7 @@ const Lt = {
2376
2419
  return n > 0 && n <= 72e3 ? [{
2377
2420
  ruleId: "meta-refresh",
2378
2421
  selector: d(a),
2379
- html: u(a),
2422
+ html: c(a),
2380
2423
  impact: "critical",
2381
2424
  message: `Page redirects after ${n} seconds without warning. Use server-side redirect.`
2382
2425
  }] : [];
@@ -2384,14 +2427,14 @@ const Lt = {
2384
2427
  return [{
2385
2428
  ruleId: "meta-refresh",
2386
2429
  selector: d(a),
2387
- html: u(a),
2430
+ html: c(a),
2388
2431
  impact: "critical",
2389
2432
  message: `Page auto-refreshes after ${n} seconds. Provide user control over refresh.`
2390
2433
  }];
2391
2434
  }
2392
2435
  return [];
2393
2436
  }
2394
- }, ta = {
2437
+ }, ia = {
2395
2438
  id: "blink",
2396
2439
  selector: "blink",
2397
2440
  check: { type: "selector-exists" },
@@ -2402,7 +2445,7 @@ const Lt = {
2402
2445
  level: "A",
2403
2446
  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.",
2404
2447
  prompt: "Suggest static alternatives to the blinking effect."
2405
- }, aa = k(ta), ia = {
2448
+ }, na = k(ia), ra = {
2406
2449
  id: "marquee",
2407
2450
  selector: "marquee",
2408
2451
  check: { type: "selector-exists" },
@@ -2413,7 +2456,7 @@ const Lt = {
2413
2456
  level: "A",
2414
2457
  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.",
2415
2458
  prompt: "Suggest static alternatives or accessible carousel patterns."
2416
- }, na = k(ia), ra = {
2459
+ }, oa = k(ra), sa = {
2417
2460
  id: "p-as-heading",
2418
2461
  wcag: [],
2419
2462
  level: "A",
@@ -2426,13 +2469,13 @@ const Lt = {
2426
2469
  const a = [];
2427
2470
  for (const n of t.querySelectorAll("p")) {
2428
2471
  if (p(n)) continue;
2429
- 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), c = ((e = n.className) == null ? void 0 : e.toLowerCase()) || "", h = /\bh[1-6]\b|\bheading\b/.test(c), l = ((i = n.textContent) == null ? void 0 : i.trim()) || "", m = l.length > 0 && l.length < 50, g = !l.match(/[.!?,;:]$/);
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(/[.!?,;:]$/);
2430
2473
  if ((o && s || o && h) && m && g) {
2431
2474
  const w = n.nextElementSibling;
2432
2475
  w && (w.tagName === "P" || w.tagName === "DIV" || w.tagName === "UL") && a.push({
2433
2476
  ruleId: "p-as-heading",
2434
2477
  selector: d(n),
2435
- html: u(n),
2478
+ html: c(n),
2436
2479
  impact: "serious",
2437
2480
  message: "Paragraph appears to be styled as a heading. Use an h1-h6 element instead."
2438
2481
  });
@@ -2440,7 +2483,7 @@ const Lt = {
2440
2483
  }
2441
2484
  return a;
2442
2485
  }
2443
- }, oa = {
2486
+ }, la = {
2444
2487
  id: "aria-roles",
2445
2488
  wcag: ["4.1.2"],
2446
2489
  level: "A",
@@ -2451,17 +2494,17 @@ const Lt = {
2451
2494
  const a = [];
2452
2495
  for (const e of t.querySelectorAll("[role]")) {
2453
2496
  const r = e.getAttribute("role").replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "").split(/\s+/).filter(Boolean);
2454
- !r.some((s) => ye(s)) && r.length > 0 && a.push({
2497
+ !r.some((s) => Ae(s)) && r.length > 0 && a.push({
2455
2498
  ruleId: "aria-roles",
2456
2499
  selector: d(e),
2457
- html: u(e),
2500
+ html: c(e),
2458
2501
  impact: "critical",
2459
2502
  message: `Invalid ARIA role "${r[0]}".`
2460
2503
  });
2461
2504
  }
2462
2505
  return a;
2463
2506
  }
2464
- }, sa = {
2507
+ }, ca = {
2465
2508
  id: "aria-valid-attr",
2466
2509
  wcag: ["4.1.2"],
2467
2510
  level: "A",
@@ -2469,9 +2512,9 @@ const Lt = {
2469
2512
  guidance: "Misspelled ARIA attributes are ignored by assistive technologies. Check the spelling against the WAI-ARIA specification. Common mistakes: aria-labeledby (should be aria-labelledby), aria-role (should be role), aria-description (valid in ARIA 1.3+).",
2470
2513
  prompt: "Identify the misspelled attribute and provide the correct spelling.",
2471
2514
  run(t) {
2472
- return V(t).validAttr;
2515
+ return z(t).validAttr;
2473
2516
  }
2474
- }, la = {
2517
+ }, ua = {
2475
2518
  id: "aria-valid-attr-value",
2476
2519
  wcag: ["4.1.2"],
2477
2520
  level: "A",
@@ -2479,9 +2522,9 @@ const Lt = {
2479
2522
  guidance: "Each ARIA attribute accepts specific value types. Boolean attributes (aria-hidden, aria-disabled) accept only 'true' or 'false'. Tristate attributes (aria-checked, aria-pressed) also accept 'mixed'. Token attributes (aria-live, aria-autocomplete) accept predefined values. ID reference attributes (aria-labelledby, aria-describedby) must reference existing element IDs.",
2480
2523
  prompt: "Show the invalid value and list the valid values for this specific attribute.",
2481
2524
  run(t) {
2482
- return V(t).validAttrValue;
2525
+ return z(t).validAttrValue;
2483
2526
  }
2484
- }, ca = {
2527
+ }, da = {
2485
2528
  checkbox: ["aria-checked"],
2486
2529
  combobox: ["aria-expanded"],
2487
2530
  heading: ["aria-level"],
@@ -2495,7 +2538,7 @@ const Lt = {
2495
2538
  slider: ["aria-valuenow"],
2496
2539
  spinbutton: ["aria-valuenow"],
2497
2540
  switch: ["aria-checked"]
2498
- }, ua = {
2541
+ }, ma = {
2499
2542
  id: "aria-required-attr",
2500
2543
  wcag: ["4.1.2"],
2501
2544
  level: "A",
@@ -2506,7 +2549,7 @@ const Lt = {
2506
2549
  const a = [];
2507
2550
  for (const e of t.querySelectorAll("[role]")) {
2508
2551
  if (p(e) || e instanceof HTMLElement && e.style.display === "none") continue;
2509
- const i = e.getAttribute("role").trim().toLowerCase(), n = ca[i];
2552
+ const i = e.getAttribute("role").trim().toLowerCase(), n = da[i];
2510
2553
  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))) {
2511
2554
  if (i === "separator") {
2512
2555
  const r = e.getAttribute("tabindex");
@@ -2518,7 +2561,7 @@ const Lt = {
2518
2561
  a.push({
2519
2562
  ruleId: "aria-required-attr",
2520
2563
  selector: d(e),
2521
- html: u(e),
2564
+ html: c(e),
2522
2565
  impact: "critical",
2523
2566
  message: `Role "${i}" requires attribute "${r}".`
2524
2567
  });
@@ -2530,24 +2573,24 @@ const Lt = {
2530
2573
  return a;
2531
2574
  }
2532
2575
  };
2533
- function da(t) {
2576
+ function ha(t) {
2534
2577
  var r, o, s;
2535
2578
  const a = [], e = t.className;
2536
2579
  e && typeof e == "string" && e.trim() && a.push(`Classes: ${e.trim().slice(0, 100)}`);
2537
2580
  const i = t.closest("form");
2538
2581
  if (i) {
2539
- const c = i.getAttribute("aria-label") || ((o = (r = i.querySelector("legend")) == null ? void 0 : r.textContent) == null ? void 0 : o.trim());
2540
- c && a.push(`Form: ${c.slice(0, 60)}`);
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)}`);
2541
2584
  }
2542
2585
  const n = t.parentElement;
2543
2586
  if (n) {
2544
- const c = n.closest("h1, h2, h3, h4, h5, h6") || n.querySelector("h1, h2, h3, h4, h5, h6");
2545
- (s = c == null ? void 0 : c.textContent) != null && s.trim() && a.push(`Nearby heading: ${c.textContent.trim().slice(0, 60)}`);
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)}`);
2546
2589
  }
2547
2590
  return a.length > 0 ? a.join(`
2548
2591
  `) : void 0;
2549
2592
  }
2550
- const ma = {
2593
+ const pa = {
2551
2594
  id: "button-name",
2552
2595
  wcag: ["4.1.2"],
2553
2596
  level: "A",
@@ -2563,15 +2606,15 @@ const ma = {
2563
2606
  v(e) || a.push({
2564
2607
  ruleId: "button-name",
2565
2608
  selector: d(e),
2566
- html: u(e),
2609
+ html: c(e),
2567
2610
  impact: "critical",
2568
2611
  message: "Button has no discernible text.",
2569
- context: da(e)
2612
+ context: ha(e)
2570
2613
  });
2571
2614
  }
2572
2615
  return a;
2573
2616
  }
2574
- }, ha = {
2617
+ }, ga = {
2575
2618
  alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
2576
2619
  alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
2577
2620
  application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
@@ -2643,7 +2686,7 @@ const ma = {
2643
2686
  tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
2644
2687
  treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
2645
2688
  treeitem: /* @__PURE__ */ new Set(["aria-checked", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"])
2646
- }, pa = /* @__PURE__ */ new Set([
2689
+ }, ba = /* @__PURE__ */ new Set([
2647
2690
  "aria-atomic",
2648
2691
  "aria-busy",
2649
2692
  "aria-controls",
@@ -2667,7 +2710,7 @@ const ma = {
2667
2710
  "aria-roledescription",
2668
2711
  "aria-braillelabel",
2669
2712
  "aria-brailleroledescription"
2670
- ]), ga = {
2713
+ ]), fa = {
2671
2714
  id: "aria-allowed-attr",
2672
2715
  wcag: ["4.1.2"],
2673
2716
  level: "A",
@@ -2680,20 +2723,20 @@ const ma = {
2680
2723
  if (p(e)) continue;
2681
2724
  const i = C(e);
2682
2725
  if (!i) continue;
2683
- const n = ha[i];
2726
+ const n = ga[i];
2684
2727
  if (n)
2685
2728
  for (const r of e.attributes)
2686
- r.name.startsWith("aria-") && (pa.has(r.name) || n.has(r.name) || a.push({
2729
+ r.name.startsWith("aria-") && (ba.has(r.name) || n.has(r.name) || a.push({
2687
2730
  ruleId: "aria-allowed-attr",
2688
2731
  selector: d(e),
2689
- html: u(e),
2732
+ html: c(e),
2690
2733
  impact: "critical",
2691
2734
  message: `ARIA attribute "${r.name}" is not allowed on role "${i}".`
2692
2735
  }));
2693
2736
  }
2694
2737
  return a;
2695
2738
  }
2696
- }, ba = /* @__PURE__ */ new Set([
2739
+ }, va = /* @__PURE__ */ new Set([
2697
2740
  "base",
2698
2741
  "col",
2699
2742
  "colgroup",
@@ -2708,7 +2751,7 @@ const ma = {
2708
2751
  "template",
2709
2752
  "title",
2710
2753
  "track"
2711
- ]), I = {
2754
+ ]), E = {
2712
2755
  a: /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem", "link"]),
2713
2756
  "a[href]": /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem"]),
2714
2757
  abbr: "any",
@@ -2815,22 +2858,22 @@ const ma = {
2815
2858
  video: /* @__PURE__ */ new Set(["application"]),
2816
2859
  wbr: /* @__PURE__ */ new Set(["none", "presentation"])
2817
2860
  };
2818
- function fa(t) {
2861
+ function wa(t) {
2819
2862
  var e;
2820
2863
  const a = t.tagName.toLowerCase();
2821
- if (ba.has(a))
2864
+ if (va.has(a))
2822
2865
  return "none";
2823
2866
  if (a === "a" && t.hasAttribute("href"))
2824
- return I["a[href]"];
2867
+ return E["a[href]"];
2825
2868
  if (a === "img" && t.getAttribute("alt") === "")
2826
- return I["img[alt='']"];
2869
+ return E["img[alt='']"];
2827
2870
  if (a === "input") {
2828
2871
  const n = `input[type=${((e = t.getAttribute("type")) == null ? void 0 : e.toLowerCase()) || "text"}]`;
2829
- return n in I ? I[n] : "none";
2872
+ return n in E ? E[n] : "none";
2830
2873
  }
2831
- return I[a] || "any";
2874
+ return E[a] || "any";
2832
2875
  }
2833
- const va = {
2876
+ const ya = {
2834
2877
  id: "aria-allowed-role",
2835
2878
  wcag: ["4.1.2"],
2836
2879
  level: "A",
@@ -2844,26 +2887,26 @@ const va = {
2844
2887
  if (p(i)) continue;
2845
2888
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2846
2889
  if (!n) continue;
2847
- const r = le(i);
2890
+ const r = ue(i);
2848
2891
  if (r && n === r) continue;
2849
- const o = fa(i);
2892
+ const o = wa(i);
2850
2893
  o === "none" ? a.push({
2851
2894
  ruleId: "aria-allowed-role",
2852
2895
  selector: d(i),
2853
- html: u(i),
2896
+ html: c(i),
2854
2897
  impact: "minor",
2855
2898
  message: `Element <${i.tagName.toLowerCase()}> should not have an explicit role.`
2856
2899
  }) : o !== "any" && !o.has(n) && a.push({
2857
2900
  ruleId: "aria-allowed-role",
2858
2901
  selector: d(i),
2859
- html: u(i),
2902
+ html: c(i),
2860
2903
  impact: "minor",
2861
2904
  message: `Role "${n}" is not allowed on element <${i.tagName.toLowerCase()}>.`
2862
2905
  });
2863
2906
  }
2864
2907
  return a;
2865
2908
  }
2866
- }, ee = {
2909
+ }, ae = {
2867
2910
  // Each array is an OR group - at least one of each inner array must be present
2868
2911
  combobox: [["listbox", "tree", "grid", "dialog", "textbox"]],
2869
2912
  // Must own/contain one of these
@@ -2880,7 +2923,7 @@ const va = {
2880
2923
  tablist: [["tab"]],
2881
2924
  tree: [["treeitem", "group"]],
2882
2925
  treegrid: [["row", "rowgroup"]]
2883
- }, te = {
2926
+ }, ie = {
2884
2927
  caption: ["figure", "table", "grid", "treegrid"],
2885
2928
  // cell/gridcell/columnheader/rowheader must be in a row
2886
2929
  // but we skip checking native td/th since they're handled by HTML semantics
@@ -2894,7 +2937,7 @@ const va = {
2894
2937
  tab: ["tablist"],
2895
2938
  treeitem: ["tree", "group"]
2896
2939
  };
2897
- function wa(t, a) {
2940
+ function Aa(t, a) {
2898
2941
  var r;
2899
2942
  const e = ((r = t.getAttribute("aria-owns")) == null ? void 0 : r.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
2900
2943
  for (const o of t.querySelectorAll("*")) {
@@ -2904,15 +2947,15 @@ function wa(t, a) {
2904
2947
  for (const o of e) {
2905
2948
  const s = i.getElementById(o);
2906
2949
  if (s) {
2907
- const c = C(s);
2908
- c && !p(s) && n.add(c);
2950
+ const u = C(s);
2951
+ u && !p(s) && n.add(u);
2909
2952
  }
2910
2953
  }
2911
2954
  for (const o of a)
2912
- if (!o.some((c) => n.has(c))) return !1;
2955
+ if (!o.some((u) => n.has(u))) return !1;
2913
2956
  return !0;
2914
2957
  }
2915
- const ya = {
2958
+ const Sa = {
2916
2959
  id: "aria-required-children",
2917
2960
  wcag: ["4.1.2"],
2918
2961
  level: "A",
@@ -2925,14 +2968,14 @@ const ya = {
2925
2968
  for (const i of t.querySelectorAll("[role]")) {
2926
2969
  if (p(i)) continue;
2927
2970
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2928
- if (!n || !(n in ee)) continue;
2929
- const r = ee[n];
2930
- if (!wa(i, r)) {
2971
+ if (!n || !(n in ae)) continue;
2972
+ const r = ae[n];
2973
+ if (!Aa(i, r)) {
2931
2974
  const o = r.map((s) => s.join(" or ")).join(", ");
2932
2975
  a.push({
2933
2976
  ruleId: "aria-required-children",
2934
2977
  selector: d(i),
2935
- html: u(i),
2978
+ html: c(i),
2936
2979
  impact: "critical",
2937
2980
  message: `Role "${n}" requires children with role: ${o}.`
2938
2981
  });
@@ -2940,7 +2983,7 @@ const ya = {
2940
2983
  }
2941
2984
  return a;
2942
2985
  }
2943
- }, Aa = {
2986
+ }, xa = {
2944
2987
  id: "aria-required-parent",
2945
2988
  wcag: ["4.1.2"],
2946
2989
  level: "A",
@@ -2953,12 +2996,12 @@ const ya = {
2953
2996
  for (const i of t.querySelectorAll("[role]")) {
2954
2997
  if (p(i)) continue;
2955
2998
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2956
- if (!n || !(n in te)) continue;
2957
- const r = te[n];
2999
+ if (!n || !(n in ie)) continue;
3000
+ const r = ie[n];
2958
3001
  let o = i.parentElement, s = !1;
2959
3002
  for (; o && o !== t.documentElement; ) {
2960
- const c = C(o);
2961
- if (c && r.includes(c)) {
3003
+ const u = C(o);
3004
+ if (u && r.includes(u)) {
2962
3005
  s = !0;
2963
3006
  break;
2964
3007
  }
@@ -2967,14 +3010,14 @@ const ya = {
2967
3010
  s || a.push({
2968
3011
  ruleId: "aria-required-parent",
2969
3012
  selector: d(i),
2970
- html: u(i),
3013
+ html: c(i),
2971
3014
  impact: "critical",
2972
3015
  message: `Role "${n}" must be contained within: ${r.join(", ")}.`
2973
3016
  });
2974
3017
  }
2975
3018
  return a;
2976
3019
  }
2977
- }, ae = [
3020
+ }, ne = [
2978
3021
  "a[href]",
2979
3022
  "button:not([disabled])",
2980
3023
  'input:not([disabled]):not([type="hidden"])',
@@ -2990,7 +3033,7 @@ const ya = {
2990
3033
  "embed",
2991
3034
  "area[href]"
2992
3035
  ].join(", ");
2993
- function Sa(t) {
3036
+ function ka(t) {
2994
3037
  let a = t;
2995
3038
  const e = t.ownerDocument, i = e.defaultView;
2996
3039
  for (; a && a !== e.body; ) {
@@ -3003,7 +3046,7 @@ function Sa(t) {
3003
3046
  }
3004
3047
  return !0;
3005
3048
  }
3006
- const xa = {
3049
+ const Ia = {
3007
3050
  id: "aria-hidden-body",
3008
3051
  selector: 'body[aria-hidden="true"]',
3009
3052
  check: { type: "selector-exists" },
@@ -3015,7 +3058,7 @@ const xa = {
3015
3058
  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.",
3016
3059
  prompt: "Instruct to remove aria-hidden='true' from the body element.",
3017
3060
  skipAriaHidden: !1
3018
- }, ka = k(xa), Ia = {
3061
+ }, Ea = k(Ia), Ta = {
3019
3062
  id: "aria-hidden-focus",
3020
3063
  wcag: ["4.1.2"],
3021
3064
  level: "A",
@@ -3026,15 +3069,15 @@ const xa = {
3026
3069
  const a = [];
3027
3070
  for (const e of t.querySelectorAll('[aria-hidden="true"]')) {
3028
3071
  if (e === t.body) continue;
3029
- const i = [...e.querySelectorAll(ae)];
3030
- e.matches(ae) && i.push(e);
3072
+ const i = [...e.querySelectorAll(ne)];
3073
+ e.matches(ne) && i.push(e);
3031
3074
  for (const n of i)
3032
3075
  if (n instanceof HTMLElement) {
3033
- if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Sa(n)) continue;
3076
+ if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !ka(n)) continue;
3034
3077
  a.push({
3035
3078
  ruleId: "aria-hidden-focus",
3036
3079
  selector: d(n),
3037
- html: u(n),
3080
+ html: c(n),
3038
3081
  impact: "serious",
3039
3082
  message: "Focusable element is inside an aria-hidden region."
3040
3083
  });
@@ -3042,7 +3085,7 @@ const xa = {
3042
3085
  }
3043
3086
  return a;
3044
3087
  }
3045
- }, Ea = {
3088
+ }, La = {
3046
3089
  id: "aria-command-name",
3047
3090
  wcag: ["4.1.2"],
3048
3091
  level: "A",
@@ -3060,7 +3103,7 @@ const xa = {
3060
3103
  a.push({
3061
3104
  ruleId: "aria-command-name",
3062
3105
  selector: d(i),
3063
- html: u(i),
3106
+ html: c(i),
3064
3107
  impact: "serious",
3065
3108
  message: "ARIA command has no accessible name."
3066
3109
  });
@@ -3068,7 +3111,7 @@ const xa = {
3068
3111
  }
3069
3112
  return a;
3070
3113
  }
3071
- }, Ta = {
3114
+ }, Ca = {
3072
3115
  id: "aria-input-field-name",
3073
3116
  wcag: ["4.1.2"],
3074
3117
  level: "A",
@@ -3082,14 +3125,14 @@ const xa = {
3082
3125
  v(i) || a.push({
3083
3126
  ruleId: "aria-input-field-name",
3084
3127
  selector: d(i),
3085
- html: u(i),
3128
+ html: c(i),
3086
3129
  impact: "serious",
3087
3130
  message: "ARIA input field has no accessible name."
3088
3131
  });
3089
3132
  }
3090
3133
  return a;
3091
3134
  }
3092
- }, La = {
3135
+ }, qa = {
3093
3136
  id: "aria-toggle-field-name",
3094
3137
  wcag: ["4.1.2"],
3095
3138
  level: "A",
@@ -3103,14 +3146,14 @@ const xa = {
3103
3146
  v(i) || a.push({
3104
3147
  ruleId: "aria-toggle-field-name",
3105
3148
  selector: d(i),
3106
- html: u(i),
3149
+ html: c(i),
3107
3150
  impact: "serious",
3108
3151
  message: "ARIA toggle field has no accessible name."
3109
3152
  });
3110
3153
  }
3111
3154
  return a;
3112
3155
  }
3113
- }, Ca = {
3156
+ }, Ra = {
3114
3157
  id: "aria-meter-name",
3115
3158
  wcag: ["4.1.2"],
3116
3159
  level: "A",
@@ -3124,14 +3167,14 @@ const xa = {
3124
3167
  v(e) || a.push({
3125
3168
  ruleId: "aria-meter-name",
3126
3169
  selector: d(e),
3127
- html: u(e),
3170
+ html: c(e),
3128
3171
  impact: "serious",
3129
3172
  message: "Meter has no accessible name."
3130
3173
  });
3131
3174
  }
3132
3175
  return a;
3133
3176
  }
3134
- }, qa = {
3177
+ }, Na = {
3135
3178
  id: "aria-progressbar-name",
3136
3179
  wcag: ["4.1.2"],
3137
3180
  level: "A",
@@ -3145,14 +3188,14 @@ const xa = {
3145
3188
  v(e) || a.push({
3146
3189
  ruleId: "aria-progressbar-name",
3147
3190
  selector: d(e),
3148
- html: u(e),
3191
+ html: c(e),
3149
3192
  impact: "serious",
3150
3193
  message: "Progressbar has no accessible name."
3151
3194
  });
3152
3195
  }
3153
3196
  return a;
3154
3197
  }
3155
- }, Ra = {
3198
+ }, Ma = {
3156
3199
  id: "aria-dialog-name",
3157
3200
  wcag: ["4.1.2"],
3158
3201
  level: "A",
@@ -3166,14 +3209,14 @@ const xa = {
3166
3209
  v(e) || a.push({
3167
3210
  ruleId: "aria-dialog-name",
3168
3211
  selector: d(e),
3169
- html: u(e),
3212
+ html: c(e),
3170
3213
  impact: "serious",
3171
3214
  message: "Dialog has no accessible name."
3172
3215
  });
3173
3216
  }
3174
3217
  return a;
3175
3218
  }
3176
- }, Na = {
3219
+ }, $a = {
3177
3220
  id: "aria-tooltip-name",
3178
3221
  wcag: ["4.1.2"],
3179
3222
  level: "A",
@@ -3187,14 +3230,14 @@ const xa = {
3187
3230
  v(e) || a.push({
3188
3231
  ruleId: "aria-tooltip-name",
3189
3232
  selector: d(e),
3190
- html: u(e),
3233
+ html: c(e),
3191
3234
  impact: "serious",
3192
3235
  message: "Tooltip has no accessible name."
3193
3236
  });
3194
3237
  }
3195
3238
  return a;
3196
3239
  }
3197
- }, Ma = {
3240
+ }, Ha = {
3198
3241
  id: "aria-treeitem-name",
3199
3242
  wcag: ["4.1.2"],
3200
3243
  level: "A",
@@ -3208,14 +3251,14 @@ const xa = {
3208
3251
  v(e) || a.push({
3209
3252
  ruleId: "aria-treeitem-name",
3210
3253
  selector: d(e),
3211
- html: u(e),
3254
+ html: c(e),
3212
3255
  impact: "serious",
3213
3256
  message: "Treeitem has no accessible name."
3214
3257
  });
3215
3258
  }
3216
3259
  return a;
3217
3260
  }
3218
- }, $a = {
3261
+ }, Da = {
3219
3262
  id: "aria-prohibited-attr",
3220
3263
  wcag: ["4.1.2"],
3221
3264
  level: "A",
@@ -3223,16 +3266,16 @@ const xa = {
3223
3266
  guidance: "Some ARIA roles prohibit certain attributes. For example, roles like 'none', 'presentation', 'generic', and text-level roles (code, emphasis, strong) prohibit aria-label and aria-labelledby because naming is not supported for these roles. Remove the prohibited attributes or change the role.",
3224
3267
  prompt: "Identify the prohibited attribute and recommend removing it from this element.",
3225
3268
  run(t) {
3226
- return V(t).prohibitedAttr;
3269
+ return z(t).prohibitedAttr;
3227
3270
  }
3228
- }, Ha = [
3271
+ }, Oa = [
3229
3272
  "a[href]",
3230
3273
  "button:not([disabled])",
3231
3274
  'input:not([disabled]):not([type="hidden"])',
3232
3275
  "select:not([disabled])",
3233
3276
  "textarea:not([disabled])",
3234
3277
  '[tabindex]:not([tabindex="-1"])'
3235
- ].join(", "), Da = [
3278
+ ].join(", "), Wa = [
3236
3279
  "aria-atomic",
3237
3280
  "aria-busy",
3238
3281
  "aria-controls",
@@ -3247,17 +3290,17 @@ const xa = {
3247
3290
  "aria-owns",
3248
3291
  "aria-relevant"
3249
3292
  ];
3250
- function ie(t) {
3293
+ function re(t) {
3251
3294
  const a = [];
3252
- t.matches(Ha) && a.push("element is focusable");
3253
- for (const e of Da)
3295
+ t.matches(Oa) && a.push("element is focusable");
3296
+ for (const e of Wa)
3254
3297
  if (t.hasAttribute(e)) {
3255
3298
  a.push(`has ${e}`);
3256
3299
  break;
3257
3300
  }
3258
3301
  return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
3259
3302
  }
3260
- const Oa = {
3303
+ const Ba = {
3261
3304
  id: "presentation-role-conflict",
3262
3305
  wcag: ["4.1.2"],
3263
3306
  level: "A",
@@ -3268,29 +3311,29 @@ const Oa = {
3268
3311
  const a = [];
3269
3312
  for (const e of t.querySelectorAll('[role="presentation"], [role="none"]')) {
3270
3313
  if (p(e)) continue;
3271
- const i = ie(e);
3314
+ const i = re(e);
3272
3315
  i.length > 0 && a.push({
3273
3316
  ruleId: "presentation-role-conflict",
3274
3317
  selector: d(e),
3275
- html: u(e),
3318
+ html: c(e),
3276
3319
  impact: "serious",
3277
3320
  message: `Presentation role conflicts with: ${i.join(", ")}. The role will be ignored.`
3278
3321
  });
3279
3322
  }
3280
3323
  for (const e of t.querySelectorAll('img[alt=""]')) {
3281
3324
  if (p(e) || e.hasAttribute("role")) continue;
3282
- const i = ie(e);
3325
+ const i = re(e);
3283
3326
  i.length > 0 && a.push({
3284
3327
  ruleId: "presentation-role-conflict",
3285
3328
  selector: d(e),
3286
- html: u(e),
3329
+ html: c(e),
3287
3330
  impact: "serious",
3288
3331
  message: `Element with implicit presentation role (alt="") conflicts with: ${i.join(", ")}. The decorative role will be ignored.`
3289
3332
  });
3290
3333
  }
3291
3334
  return a;
3292
3335
  }
3293
- }, Ba = {
3336
+ }, _a = {
3294
3337
  id: "summary-name",
3295
3338
  wcag: ["4.1.2"],
3296
3339
  level: "A",
@@ -3304,7 +3347,7 @@ const Oa = {
3304
3347
  v(e) || a.push({
3305
3348
  ruleId: "summary-name",
3306
3349
  selector: d(e),
3307
- html: u(e),
3350
+ html: c(e),
3308
3351
  impact: "serious",
3309
3352
  message: "<summary> element has no accessible name. Add descriptive text."
3310
3353
  });
@@ -3312,7 +3355,7 @@ const Oa = {
3312
3355
  return a;
3313
3356
  }
3314
3357
  };
3315
- function Wa(t) {
3358
+ function Fa(t) {
3316
3359
  var n, r;
3317
3360
  const a = [], e = t.getAttribute("href");
3318
3361
  e && a.push(`href: ${e}`);
@@ -3329,7 +3372,7 @@ function Wa(t) {
3329
3372
  return a.length > 0 ? a.join(`
3330
3373
  `) : void 0;
3331
3374
  }
3332
- const _a = {
3375
+ const ja = {
3333
3376
  id: "link-name",
3334
3377
  wcag: ["2.4.4", "4.1.2"],
3335
3378
  level: "A",
@@ -3343,15 +3386,15 @@ const _a = {
3343
3386
  v(e) || a.push({
3344
3387
  ruleId: "link-name",
3345
3388
  selector: d(e),
3346
- html: u(e),
3389
+ html: c(e),
3347
3390
  impact: "serious",
3348
3391
  message: "Link has no discernible text.",
3349
- context: Wa(e)
3392
+ context: Fa(e)
3350
3393
  });
3351
3394
  }
3352
3395
  return a;
3353
3396
  }
3354
- }, Fa = {
3397
+ }, Pa = {
3355
3398
  id: "skip-link",
3356
3399
  wcag: ["2.4.1"],
3357
3400
  level: "A",
@@ -3370,14 +3413,14 @@ const _a = {
3370
3413
  t.getElementById(s) || a.push({
3371
3414
  ruleId: "skip-link",
3372
3415
  selector: d(i),
3373
- html: u(i),
3416
+ html: c(i),
3374
3417
  impact: "moderate",
3375
3418
  message: `Skip link points to "#${s}" which does not exist on the page.`
3376
3419
  });
3377
3420
  }
3378
3421
  return a;
3379
3422
  }
3380
- }, ja = /* @__PURE__ */ new Set([
3423
+ }, Va = /* @__PURE__ */ new Set([
3381
3424
  "block",
3382
3425
  "flex",
3383
3426
  "grid",
@@ -3385,23 +3428,23 @@ const _a = {
3385
3428
  "table-cell",
3386
3429
  "list-item",
3387
3430
  "flow-root"
3388
- ]), Pa = /* @__PURE__ */ new Set([
3431
+ ]), za = /* @__PURE__ */ new Set([
3389
3432
  "inline",
3390
3433
  "inline-block",
3391
3434
  "inline-flex",
3392
3435
  "inline-grid"
3393
3436
  ]);
3394
- function Va(t) {
3437
+ function Ua(t) {
3395
3438
  let a = t.parentElement;
3396
3439
  for (; a; ) {
3397
3440
  const e = A(a).display;
3398
- if (ja.has(e) && za(a))
3441
+ if (Va.has(e) && Ga(a))
3399
3442
  return a;
3400
3443
  a = a.parentElement;
3401
3444
  }
3402
3445
  return null;
3403
3446
  }
3404
- function za(t) {
3447
+ function Ga(t) {
3405
3448
  const a = t.ownerDocument.createTreeWalker(
3406
3449
  t,
3407
3450
  NodeFilter.SHOW_TEXT
@@ -3421,7 +3464,7 @@ function za(t) {
3421
3464
  }
3422
3465
  return !1;
3423
3466
  }
3424
- function Ua(t, a) {
3467
+ function Xa(t, a) {
3425
3468
  const e = t.ownerDocument.createTreeWalker(
3426
3469
  t,
3427
3470
  NodeFilter.SHOW_TEXT
@@ -3442,7 +3485,7 @@ function Ua(t, a) {
3442
3485
  }
3443
3486
  return null;
3444
3487
  }
3445
- function Ga(t, a) {
3488
+ function Ya(t, a) {
3446
3489
  const e = t.textDecorationLine || t.textDecoration || "", i = a.textDecorationLine || a.textDecoration || "";
3447
3490
  if ((e.includes("underline") || e.includes("line-through")) && e !== i)
3448
3491
  return !0;
@@ -3452,22 +3495,22 @@ function Ga(t, a) {
3452
3495
  const o = parseFloat(t.outlineWidth) || 0, s = t.outlineStyle || "";
3453
3496
  if (o > 0 && s !== "none")
3454
3497
  return !0;
3455
- const c = t.backgroundImage || "";
3456
- if (c && c !== "none" && c !== "initial")
3498
+ const u = t.backgroundImage || "";
3499
+ if (u && u !== "none" && u !== "initial")
3457
3500
  return !0;
3458
- const h = ne(t.fontWeight), l = ne(a.fontWeight);
3501
+ const h = oe(t.fontWeight), l = oe(a.fontWeight);
3459
3502
  if (Math.abs(h - l) >= 300 || t.fontStyle !== a.fontStyle)
3460
3503
  return !0;
3461
3504
  const m = parseFloat(t.fontSize) || 16, g = parseFloat(a.fontSize) || 16;
3462
3505
  return g > 0 && m / g >= 1.2;
3463
3506
  }
3464
- function ne(t) {
3507
+ function oe(t) {
3465
3508
  return t === "bold" ? 700 : t === "normal" ? 400 : parseInt(t) || 400;
3466
3509
  }
3467
- function re(t, a, e) {
3510
+ function se(t, a, e) {
3468
3511
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3469
3512
  }
3470
- const Xa = {
3513
+ const Ka = {
3471
3514
  id: "link-in-text-block",
3472
3515
  wcag: ["1.4.1"],
3473
3516
  level: "A",
@@ -3479,20 +3522,20 @@ const Xa = {
3479
3522
  for (const e of t.querySelectorAll("a[href]")) {
3480
3523
  if (p(e) || !y(e).trim()) continue;
3481
3524
  const i = A(e), n = i.display || "inline";
3482
- if (!Pa.has(n)) continue;
3483
- const r = Va(e);
3525
+ if (!za.has(n)) continue;
3526
+ const r = Ua(e);
3484
3527
  if (!r) continue;
3485
3528
  const o = A(r);
3486
- if (Ga(i, o)) continue;
3487
- const s = R(i.color), c = Ua(r);
3488
- if (!s || !c) continue;
3489
- const h = q(...s), l = q(...c), m = ce(h, l);
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);
3490
3533
  if (m >= 3) continue;
3491
- const g = re(...s), b = re(...c), f = `link color: ${g} rgb(${s.join(", ")}), surrounding text: ${b} rgb(${c.join(", ")}), ratio: ${m.toFixed(2)}:1`;
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`;
3492
3535
  a.push({
3493
3536
  ruleId: "link-in-text-block",
3494
3537
  selector: d(e),
3495
- html: u(e),
3538
+ html: c(e),
3496
3539
  impact: "serious",
3497
3540
  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.",
3498
3541
  context: f
@@ -3500,7 +3543,7 @@ const Xa = {
3500
3543
  }
3501
3544
  return a;
3502
3545
  }
3503
- }, Ya = {
3546
+ }, Qa = {
3504
3547
  id: "html-has-lang",
3505
3548
  wcag: ["3.1.1"],
3506
3549
  level: "A",
@@ -3520,22 +3563,22 @@ const Xa = {
3520
3563
  return (e = a.getAttribute("lang")) != null && e.trim() ? [] : [{
3521
3564
  ruleId: "html-has-lang",
3522
3565
  selector: d(a),
3523
- html: u(a),
3566
+ html: c(a),
3524
3567
  impact: "serious",
3525
3568
  message: "<html> element missing lang attribute."
3526
3569
  }];
3527
3570
  }
3528
- }, Ka = new Set(
3571
+ }, Ja = new Set(
3529
3572
  "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(" ")
3530
- ), Qa = new Set(
3573
+ ), Za = new Set(
3531
3574
  "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(" ")
3532
- ), Ja = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
3533
- function ue(t) {
3534
- if (!Ja.test(t)) return !1;
3575
+ ), ei = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
3576
+ function me(t) {
3577
+ if (!ei.test(t)) return !1;
3535
3578
  const a = t.split("-")[0].toLowerCase();
3536
- return a.length === 2 ? Ka.has(a) : a.length === 3 ? !Qa.has(a) : !1;
3579
+ return a.length === 2 ? Ja.has(a) : a.length === 3 ? !Za.has(a) : !1;
3537
3580
  }
3538
- const Za = {
3581
+ const ti = {
3539
3582
  id: "html-lang-valid",
3540
3583
  wcag: ["3.1.1"],
3541
3584
  level: "A",
@@ -3545,16 +3588,16 @@ const Za = {
3545
3588
  run(t) {
3546
3589
  var e;
3547
3590
  const a = (e = t.documentElement.getAttribute("lang")) == null ? void 0 : e.trim();
3548
- return a && !ue(a) ? [{
3591
+ return a && !me(a) ? [{
3549
3592
  ruleId: "html-lang-valid",
3550
3593
  selector: "html",
3551
- html: u(t.documentElement),
3594
+ html: c(t.documentElement),
3552
3595
  impact: "serious",
3553
3596
  message: `Invalid lang attribute value "${a}".`
3554
3597
  }] : [];
3555
3598
  }
3556
3599
  };
3557
- function oe(t) {
3600
+ function le(t) {
3558
3601
  var i;
3559
3602
  const a = t.ownerDocument.createTreeWalker(t, NodeFilter.SHOW_TEXT);
3560
3603
  let e;
@@ -3586,7 +3629,7 @@ function oe(t) {
3586
3629
  }
3587
3630
  return !1;
3588
3631
  }
3589
- const ei = {
3632
+ const ai = {
3590
3633
  id: "valid-lang",
3591
3634
  wcag: ["3.1.2"],
3592
3635
  level: "AA",
@@ -3599,26 +3642,26 @@ const ei = {
3599
3642
  if (p(e) || e === t.documentElement) continue;
3600
3643
  const i = e.getAttribute("lang"), n = i == null ? void 0 : i.trim();
3601
3644
  if (i && !n) {
3602
- oe(e) && a.push({
3645
+ le(e) && a.push({
3603
3646
  ruleId: "valid-lang",
3604
3647
  selector: d(e),
3605
- html: u(e),
3648
+ html: c(e),
3606
3649
  impact: "serious",
3607
3650
  message: "Empty lang attribute value."
3608
3651
  });
3609
3652
  continue;
3610
3653
  }
3611
- n && oe(e) && (ue(n) || a.push({
3654
+ n && le(e) && (me(n) || a.push({
3612
3655
  ruleId: "valid-lang",
3613
3656
  selector: d(e),
3614
- html: u(e),
3657
+ html: c(e),
3615
3658
  impact: "serious",
3616
3659
  message: `Invalid lang attribute value "${n}".`
3617
3660
  }));
3618
3661
  }
3619
3662
  return a;
3620
3663
  }
3621
- }, ti = {
3664
+ }, ii = {
3622
3665
  id: "html-xml-lang-mismatch",
3623
3666
  wcag: ["3.1.1"],
3624
3667
  level: "A",
@@ -3634,14 +3677,14 @@ const ei = {
3634
3677
  return [{
3635
3678
  ruleId: "html-xml-lang-mismatch",
3636
3679
  selector: "html",
3637
- html: u(a),
3680
+ html: c(a),
3638
3681
  impact: "moderate",
3639
3682
  message: `lang="${e}" and xml:lang="${i}" do not match.`
3640
3683
  }];
3641
3684
  }
3642
3685
  return [];
3643
3686
  }
3644
- }, ai = {
3687
+ }, ni = {
3645
3688
  id: "td-headers-attr",
3646
3689
  wcag: ["1.3.1"],
3647
3690
  level: "A",
@@ -3660,7 +3703,7 @@ const ei = {
3660
3703
  a.push({
3661
3704
  ruleId: "td-headers-attr",
3662
3705
  selector: d(e),
3663
- html: u(e),
3706
+ html: c(e),
3664
3707
  impact: "serious",
3665
3708
  message: `Headers attribute references the cell itself ("${o}").`
3666
3709
  });
@@ -3670,7 +3713,7 @@ const ei = {
3670
3713
  a.push({
3671
3714
  ruleId: "td-headers-attr",
3672
3715
  selector: d(e),
3673
- html: u(e),
3716
+ html: c(e),
3674
3717
  impact: "serious",
3675
3718
  message: `Headers attribute references non-existent ID "${o}".`
3676
3719
  });
@@ -3680,7 +3723,7 @@ const ei = {
3680
3723
  }
3681
3724
  return a;
3682
3725
  }
3683
- }, ii = {
3726
+ }, ri = {
3684
3727
  id: "th-has-data-cells",
3685
3728
  wcag: ["1.3.1"],
3686
3729
  level: "A",
@@ -3695,14 +3738,14 @@ const ei = {
3695
3738
  i.length > 0 && n.length === 0 && a.push({
3696
3739
  ruleId: "th-has-data-cells",
3697
3740
  selector: d(e),
3698
- html: u(e),
3741
+ html: c(e),
3699
3742
  impact: "serious",
3700
3743
  message: "Table has header cells but no data cells."
3701
3744
  });
3702
3745
  }
3703
3746
  return a;
3704
3747
  }
3705
- }, ni = {
3748
+ }, oi = {
3706
3749
  id: "td-has-header",
3707
3750
  wcag: ["1.3.1"],
3708
3751
  level: "A",
@@ -3724,17 +3767,17 @@ const ei = {
3724
3767
  s = Math.max(s, b);
3725
3768
  }
3726
3769
  if (o <= 3 && s <= 3) continue;
3727
- const c = n.querySelector("th") !== null, h = n.querySelector("th[scope]") !== null, l = n.querySelector("td[headers]") !== null;
3728
- if (c)
3770
+ const u = n.querySelector("th") !== null, h = n.querySelector("th[scope]") !== null, l = n.querySelector("td[headers]") !== null;
3771
+ if (u)
3729
3772
  for (const m of n.querySelectorAll("td")) {
3730
3773
  if (p(m) || m.hasAttribute("headers")) continue;
3731
3774
  const g = m.closest("tr");
3732
3775
  if (!g) continue;
3733
3776
  const b = g.querySelector("th") !== null, f = Array.from(g.children).indexOf(m);
3734
3777
  let w = !1;
3735
- const L = n.querySelector("thead");
3736
- if (L) {
3737
- const S = L.querySelector("tr");
3778
+ const I = n.querySelector("thead");
3779
+ if (I) {
3780
+ const S = I.querySelector("tr");
3738
3781
  S && ((e = S.querySelectorAll("th, td")[f]) == null ? void 0 : e.tagName.toLowerCase()) === "th" && (w = !0);
3739
3782
  }
3740
3783
  if (!w) {
@@ -3745,7 +3788,7 @@ const ei = {
3745
3788
  a.push({
3746
3789
  ruleId: "td-has-header",
3747
3790
  selector: d(m),
3748
- html: u(m),
3791
+ html: c(m),
3749
3792
  impact: "serious",
3750
3793
  message: "Data cell has no associated header. Add th elements with scope, or headers attribute."
3751
3794
  });
@@ -3755,7 +3798,7 @@ const ei = {
3755
3798
  }
3756
3799
  return a;
3757
3800
  }
3758
- }, ri = {
3801
+ }, si = {
3759
3802
  id: "scope-attr-valid",
3760
3803
  wcag: ["1.3.1"],
3761
3804
  level: "A",
@@ -3771,14 +3814,14 @@ const ei = {
3771
3814
  r && !e.has(r) && a.push({
3772
3815
  ruleId: "scope-attr-valid",
3773
3816
  selector: d(n),
3774
- html: u(n),
3817
+ html: c(n),
3775
3818
  impact: "moderate",
3776
3819
  message: `Invalid scope value "${r}". Use row, col, rowgroup, or colgroup.`
3777
3820
  });
3778
3821
  }
3779
3822
  return a;
3780
3823
  }
3781
- }, oi = {
3824
+ }, li = {
3782
3825
  id: "empty-table-header",
3783
3826
  wcag: [],
3784
3827
  level: "A",
@@ -3794,14 +3837,14 @@ const ei = {
3794
3837
  (i == null ? void 0 : i.getAttribute("role")) === "presentation" || (i == null ? void 0 : i.getAttribute("role")) === "none" || v(e) || a.push({
3795
3838
  ruleId: "empty-table-header",
3796
3839
  selector: d(e),
3797
- html: u(e),
3840
+ html: c(e),
3798
3841
  impact: "minor",
3799
3842
  message: "Table header cell is empty. Add text or use aria-label."
3800
3843
  });
3801
3844
  }
3802
3845
  return a;
3803
3846
  }
3804
- }, H = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], si = {
3847
+ }, D = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], ci = {
3805
3848
  id: "duplicate-id-aria",
3806
3849
  wcag: ["4.1.2"],
3807
3850
  level: "A",
@@ -3811,7 +3854,7 @@ const ei = {
3811
3854
  run(t) {
3812
3855
  const a = [], e = /* @__PURE__ */ new Set();
3813
3856
  for (const n of t.querySelectorAll("[aria-labelledby], [aria-describedby], [aria-controls], [aria-owns], [aria-flowto]"))
3814
- for (const r of H) {
3857
+ for (const r of D) {
3815
3858
  const o = n.getAttribute(r);
3816
3859
  o && o.split(/\s+/).forEach((s) => e.add(s));
3817
3860
  }
@@ -3825,31 +3868,31 @@ const ei = {
3825
3868
  for (const [n, r] of i) {
3826
3869
  if (r <= 1) continue;
3827
3870
  const o = t.querySelectorAll(`#${CSS.escape(n)}`), s = t.querySelector(
3828
- H.map((l) => `[${l}~="${CSS.escape(n)}"]`).join(", ")
3829
- ), c = t.querySelector(`label[for="${CSS.escape(n)}"]`);
3871
+ D.map((l) => `[${l}~="${CSS.escape(n)}"]`).join(", ")
3872
+ ), u = t.querySelector(`label[for="${CSS.escape(n)}"]`);
3830
3873
  let h;
3831
3874
  if (s) {
3832
- const l = H.find(
3875
+ const l = D.find(
3833
3876
  (m) => {
3834
3877
  var g;
3835
3878
  return (g = s.getAttribute(m)) == null ? void 0 : g.split(/\s+/).includes(n);
3836
3879
  }
3837
3880
  );
3838
3881
  l && (h = l);
3839
- } else c && (h = "label[for]");
3882
+ } else u && (h = "label[for]");
3840
3883
  a.push({
3841
3884
  ruleId: "duplicate-id-aria",
3842
3885
  selector: d(o[1]),
3843
- html: u(o[1]),
3886
+ html: c(o[1]),
3844
3887
  impact: "critical",
3845
3888
  message: `Duplicate ID "${n}" referenced by ${h ?? "an accessibility attribute"}.`,
3846
- context: `First element: ${u(o[0])}${h ? `
3889
+ context: `First element: ${c(o[0])}${h ? `
3847
3890
  Referenced by: ${h}` : ""}`
3848
3891
  });
3849
3892
  }
3850
3893
  return a;
3851
3894
  }
3852
- }, li = {
3895
+ }, ui = {
3853
3896
  id: "video-caption",
3854
3897
  wcag: ["1.2.2"],
3855
3898
  level: "A",
@@ -3863,14 +3906,14 @@ Referenced by: ${h}` : ""}`
3863
3906
  e.querySelector('track[kind="captions"], track[kind="subtitles"]') || a.push({
3864
3907
  ruleId: "video-caption",
3865
3908
  selector: d(e),
3866
- html: u(e),
3909
+ html: c(e),
3867
3910
  impact: "critical",
3868
3911
  message: "Video element has no captions track."
3869
3912
  });
3870
3913
  }
3871
3914
  return a;
3872
3915
  }
3873
- }, ci = {
3916
+ }, di = {
3874
3917
  id: "audio-caption",
3875
3918
  wcag: ["1.2.1"],
3876
3919
  level: "A",
@@ -3885,14 +3928,14 @@ Referenced by: ${h}` : ""}`
3885
3928
  n && n.querySelector('a[href*="transcript"], a[href*="text"]') || a.push({
3886
3929
  ruleId: "audio-caption",
3887
3930
  selector: d(e),
3888
- html: u(e),
3931
+ html: c(e),
3889
3932
  impact: "critical",
3890
3933
  message: "Audio element has no transcript or text alternative. Add a transcript or track element."
3891
3934
  });
3892
3935
  }
3893
3936
  return a;
3894
3937
  }
3895
- }, ui = /* @__PURE__ */ new Set([
3938
+ }, mi = /* @__PURE__ */ new Set([
3896
3939
  "SCRIPT",
3897
3940
  "STYLE",
3898
3941
  "NOSCRIPT",
@@ -3908,13 +3951,25 @@ Referenced by: ${h}` : ""}`
3908
3951
  "BR",
3909
3952
  "HR"
3910
3953
  ]);
3911
- function se([t, a, e]) {
3954
+ function ce([t, a, e]) {
3912
3955
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3913
3956
  }
3914
- function di(t) {
3915
- return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!t.closest("fieldset[disabled]");
3957
+ function hi(t) {
3958
+ 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
+ }
3960
+ function pi(t, a) {
3961
+ if (t.tagName !== "LABEL") return !1;
3962
+ const e = t, i = e.htmlFor;
3963
+ if (i) {
3964
+ const o = a.getElementById(i);
3965
+ if (o && (o.disabled || o.getAttribute("aria-disabled") === "true")) return !0;
3966
+ }
3967
+ const n = e.querySelector("input, select, textarea, button");
3968
+ if (n && (n.disabled || n.getAttribute("aria-disabled") === "true")) return !0;
3969
+ const r = e.id;
3970
+ return !!(r && a.querySelector(`[aria-labelledby~="${r}"][aria-disabled="true"]`));
3916
3971
  }
3917
- function mi(t) {
3972
+ function gi(t) {
3918
3973
  const a = t.clip;
3919
3974
  if (a && a.startsWith("rect(")) {
3920
3975
  const i = a.match(/[\d.]+/g);
@@ -3928,17 +3983,17 @@ function mi(t) {
3928
3983
  }
3929
3984
  return !1;
3930
3985
  }
3931
- function hi(t) {
3986
+ function bi(t) {
3932
3987
  if (p(t)) return !0;
3933
3988
  let a = t;
3934
3989
  for (; a; ) {
3935
3990
  const e = A(a);
3936
- if (e.display === "none" || e.visibility === "hidden" || mi(e)) return !0;
3991
+ if (e.display === "none" || e.visibility === "hidden" || gi(e)) return !0;
3937
3992
  a = a.parentElement;
3938
3993
  }
3939
3994
  return !1;
3940
3995
  }
3941
- const pi = {
3996
+ const fi = {
3942
3997
  id: "color-contrast",
3943
3998
  wcag: ["1.4.3"],
3944
3999
  level: "AA",
@@ -3953,93 +4008,93 @@ const pi = {
3953
4008
  for (; r = i.nextNode(); ) {
3954
4009
  if (!r.textContent || !r.textContent.trim()) continue;
3955
4010
  const o = r.parentElement;
3956
- if (!o || n.has(o) || (n.add(o), ui.has(o.tagName)) || di(o) || hi(o)) continue;
4011
+ if (!o || n.has(o) || (n.add(o), mi.has(o.tagName)) || hi(o) || pi(o, t) || bi(o)) continue;
3957
4012
  const s = A(o);
3958
4013
  if (parseFloat(s.opacity) === 0) continue;
3959
- const c = R(s.color);
3960
- if (!c) continue;
3961
- const h = s.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/);
3962
- if (h && parseFloat(h[1]) === 0 || Oe(o)) continue;
3963
- const l = $e(o);
3964
- if (!l) continue;
3965
- const m = q(c[0], c[1], c[2]), g = q(l[0], l[1], l[2]), b = ce(m, g), f = We(o) ? 3 : 4.5;
3966
- if (b < f) {
3967
- const w = Math.round(b * 100) / 100, L = se(c), S = se(l);
4014
+ const u = s.textShadow;
4015
+ if (u && u !== "none" && u !== "initial") continue;
4016
+ const h = R(s.color);
4017
+ if (!h) continue;
4018
+ 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);
4021
+ 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;
4023
+ if (f < w) {
4024
+ const I = Math.round(f * 100) / 100, S = ce(h), M = ce(m);
3968
4025
  a.push({
3969
4026
  ruleId: "color-contrast",
3970
4027
  selector: d(o),
3971
- html: u(o),
4028
+ html: c(o),
3972
4029
  impact: "serious",
3973
- message: `Insufficient color contrast ratio of ${w}:1 (required ${f}:1).`,
3974
- context: `foreground: ${L} rgb(${c.join(", ")}), background: ${S} rgb(${l.join(", ")}), ratio: ${w}:1, required: ${f}:1`
4030
+ message: `Insufficient color contrast ratio of ${I}:1 (required ${w}:1).`,
4031
+ context: `foreground: ${S} rgb(${h.join(", ")}), background: ${M} rgb(${m.join(", ")}), ratio: ${I}:1, required: ${w}:1`
3975
4032
  });
3976
4033
  }
3977
4034
  }
3978
4035
  return a;
3979
4036
  }
3980
- }, de = [
4037
+ }, he = [
3981
4038
  // Document Structure
3982
- Gt,
3983
- Xt,
3984
4039
  Yt,
3985
4040
  Kt,
3986
4041
  Qt,
4042
+ Jt,
3987
4043
  Zt,
3988
- ea,
4044
+ ta,
3989
4045
  aa,
3990
4046
  na,
4047
+ oa,
3991
4048
  // Images
3992
- _e,
3993
4049
  je,
3994
- Pe,
3995
4050
  Ve,
4051
+ ze,
3996
4052
  Ue,
3997
- Ge,
4053
+ Xe,
3998
4054
  Ye,
3999
- Ke,
4000
- et,
4055
+ Qe,
4056
+ Je,
4057
+ at,
4001
4058
  // Forms
4002
- rt,
4003
- ot,
4004
4059
  st,
4005
4060
  lt,
4006
- gt,
4007
- bt,
4061
+ ct,
4062
+ ut,
4008
4063
  ft,
4009
- // Keyboard
4064
+ vt,
4010
4065
  wt,
4066
+ // Keyboard
4011
4067
  At,
4012
- Lt,
4013
- Ct,
4068
+ xt,
4014
4069
  qt,
4015
- // Structure
4016
4070
  Rt,
4017
- Jt,
4018
- ra,
4019
4071
  Nt,
4072
+ // Structure
4020
4073
  Mt,
4074
+ ea,
4075
+ sa,
4021
4076
  $t,
4022
4077
  Ht,
4023
4078
  Dt,
4024
4079
  Ot,
4025
- Bt,
4026
4080
  Wt,
4081
+ Bt,
4027
4082
  _t,
4028
4083
  Ft,
4084
+ jt,
4029
4085
  Pt,
4030
- Vt,
4086
+ zt,
4031
4087
  Ut,
4088
+ Xt,
4032
4089
  // ARIA
4033
- oa,
4034
- sa,
4035
4090
  la,
4091
+ ca,
4036
4092
  ua,
4037
- ga,
4038
- va,
4093
+ ma,
4094
+ fa,
4039
4095
  ya,
4040
- Aa,
4041
- ka,
4042
- Ia,
4096
+ Sa,
4097
+ xa,
4043
4098
  Ea,
4044
4099
  Ta,
4045
4100
  La,
@@ -4049,42 +4104,44 @@ const pi = {
4049
4104
  Na,
4050
4105
  Ma,
4051
4106
  $a,
4052
- Oa,
4053
- ma,
4107
+ Ha,
4108
+ Da,
4054
4109
  Ba,
4055
- // Links
4110
+ pa,
4056
4111
  _a,
4057
- Fa,
4058
- Xa,
4112
+ // Links
4113
+ ja,
4114
+ Pa,
4115
+ Ka,
4059
4116
  // Language
4060
- Ya,
4061
- Za,
4062
- ei,
4117
+ Qa,
4063
4118
  ti,
4064
- // Tables
4065
4119
  ai,
4066
4120
  ii,
4121
+ // Tables
4067
4122
  ni,
4068
4123
  ri,
4069
4124
  oi,
4070
- // Parsing
4071
4125
  si,
4072
- // Media
4073
4126
  li,
4127
+ // Parsing
4074
4128
  ci,
4129
+ // Media
4130
+ ui,
4131
+ di,
4075
4132
  // Color
4076
- pi
4133
+ fi
4077
4134
  ];
4078
- let z = [], me = /* @__PURE__ */ new Set();
4079
- function vi(t) {
4080
- t.additionalRules && (z = t.additionalRules), t.disabledRules && (me = new Set(t.disabledRules));
4135
+ let U = [], pe = /* @__PURE__ */ new Set();
4136
+ function Ai(t) {
4137
+ t.additionalRules && (U = t.additionalRules), t.disabledRules && (pe = new Set(t.disabledRules));
4081
4138
  }
4082
- function he() {
4083
- return de.filter((a) => !me.has(a.id)).concat(z);
4139
+ function ge() {
4140
+ return he.filter((a) => !pe.has(a.id)).concat(U);
4084
4141
  }
4085
- function wi(t) {
4086
- pe();
4087
- const a = he(), e = [];
4142
+ function Si(t) {
4143
+ be();
4144
+ const a = ge(), e = [];
4088
4145
  let i = 0;
4089
4146
  return {
4090
4147
  processChunk(n) {
@@ -4103,13 +4160,13 @@ function wi(t) {
4103
4160
  }
4104
4161
  };
4105
4162
  }
4106
- function pe() {
4107
- Ae(), be(), fe(), Me(), Ne(), xe();
4163
+ function be() {
4164
+ Se(), fe(), ve(), $e(), Me(), ke();
4108
4165
  }
4109
- function yi(t) {
4166
+ function xi(t) {
4110
4167
  var i;
4111
- pe();
4112
- const a = he(), e = [];
4168
+ be();
4169
+ const a = ge(), e = [];
4113
4170
  for (const n of a)
4114
4171
  try {
4115
4172
  e.push(...n.run(t));
@@ -4122,32 +4179,32 @@ function yi(t) {
4122
4179
  ruleCount: a.length
4123
4180
  };
4124
4181
  }
4125
- const gi = new Map(de.map((t) => [t.id, t]));
4126
- function Ai(t) {
4127
- const a = gi.get(t);
4128
- return a || z.find((e) => e.id === t);
4182
+ const vi = new Map(he.map((t) => [t.id, t]));
4183
+ function ki(t) {
4184
+ const a = vi.get(t);
4185
+ return a || U.find((e) => e.id === t);
4129
4186
  }
4130
4187
  export {
4131
- pe as clearAllCaches,
4132
- Ne as clearAriaAttrAuditCache,
4133
- Ae as clearAriaHiddenCache,
4134
- Me as clearColorCaches,
4135
- be as clearComputedRoleCache,
4188
+ be as clearAllCaches,
4189
+ Me as clearAriaAttrAuditCache,
4190
+ Se as clearAriaHiddenCache,
4191
+ $e as clearColorCaches,
4192
+ fe as clearComputedRoleCache,
4136
4193
  k as compileDeclarativeRule,
4137
- vi as configureRules,
4138
- wi as createChunkedAudit,
4194
+ Ai as configureRules,
4195
+ Si as createChunkedAudit,
4139
4196
  v as getAccessibleName,
4140
4197
  y as getAccessibleTextContent,
4141
- he as getActiveRules,
4198
+ ge as getActiveRules,
4142
4199
  C as getComputedRole,
4143
- u as getHtmlSnippet,
4144
- le as getImplicitRole,
4145
- Ai as getRuleById,
4200
+ c as getHtmlSnippet,
4201
+ ue as getImplicitRole,
4202
+ ki as getRuleById,
4146
4203
  d as getSelector,
4147
4204
  p as isAriaHidden,
4148
- ye as isValidRole,
4149
- bi as querySelectorShadowAware,
4150
- de as rules,
4151
- yi as runAudit,
4152
- fi as validateDeclarativeRule
4205
+ Ae as isValidRole,
4206
+ wi as querySelectorShadowAware,
4207
+ he as rules,
4208
+ xi as runAudit,
4209
+ yi as validateDeclarativeRule
4153
4210
  };