@accesslint/core 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,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 ve() {
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 we() {
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 = ye(t);
135
+ return W.set(t, e), e;
136
136
  }
137
- function ve(t) {
138
- var r, o, s, c, h;
137
+ function ye(t) {
138
+ var r, o, s, d, h;
139
139
  const a = t.getAttribute("aria-labelledby");
140
140
  if (a) {
141
141
  const l = a.split(/\s+/).map((m) => {
@@ -179,9 +179,9 @@ function 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 ? ((d = t.alt) == null ? void 0 : d.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((h = t.alt) == null ? void 0 : h.trim()) ?? "" : "";
183
183
  }
184
- const we = /* @__PURE__ */ new Set([
184
+ const Ae = /* @__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 Se(t) {
269
269
  const a = t.trim().toLowerCase().replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "");
270
- return we.has(a);
270
+ return Ae.has(a);
271
271
  }
272
272
  let B = /* @__PURE__ */ new WeakMap();
273
- function Ae() {
273
+ function xe() {
274
274
  B = /* @__PURE__ */ new WeakMap();
275
275
  }
276
276
  function p(t) {
@@ -279,7 +279,7 @@ function p(t) {
279
279
  let e;
280
280
  return t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none") ? e = !0 : t.parentElement ? e = p(t.parentElement) : e = !1, B.set(t, e), e;
281
281
  }
282
- function Se(t) {
282
+ function ke(t) {
283
283
  return !!(t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none"));
284
284
  }
285
285
  function y(t) {
@@ -289,43 +289,43 @@ function y(t) {
289
289
  if (s.nodeType === 3)
290
290
  a += s.textContent ?? "";
291
291
  else if (s.nodeType === 1) {
292
- const c = s;
293
- if (!Se(c)) {
294
- const h = (e = c.tagName) == null ? void 0 : e.toLowerCase();
292
+ const d = s;
293
+ if (!ke(d)) {
294
+ const h = (e = d.tagName) == null ? void 0 : e.toLowerCase();
295
295
  if (h === "img" || h === "area") {
296
- const l = c.getAttribute("aria-labelledby");
296
+ const l = d.getAttribute("aria-labelledby");
297
297
  if (l) {
298
298
  const m = l.split(/\s+/).map((g) => {
299
299
  var b, f;
300
- return ((f = (b = c.ownerDocument.getElementById(g)) == null ? void 0 : b.textContent) == null ? void 0 : f.trim()) ?? "";
300
+ return ((f = (b = d.ownerDocument.getElementById(g)) == null ? void 0 : b.textContent) == null ? void 0 : f.trim()) ?? "";
301
301
  }).filter(Boolean);
302
302
  if (m.length) {
303
303
  a += m.join(" ");
304
304
  continue;
305
305
  }
306
306
  }
307
- a += ((i = c.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? c.getAttribute("alt") ?? ((n = c.getAttribute("title")) == null ? void 0 : n.trim()) ?? "";
307
+ a += ((i = d.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? d.getAttribute("alt") ?? ((n = d.getAttribute("title")) == null ? void 0 : n.trim()) ?? "";
308
308
  } else if (h === "svg") {
309
- const l = (r = c.getAttribute("aria-label")) == null ? void 0 : r.trim();
309
+ const l = (r = d.getAttribute("aria-label")) == null ? void 0 : r.trim();
310
310
  if (l)
311
311
  a += l;
312
312
  else {
313
- const m = c.querySelector("title");
313
+ const m = d.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 = d.getAttribute("aria-label")) != null && o.trim() ? a += d.getAttribute("aria-label").trim() : a += y(d);
317
317
  }
318
318
  }
319
319
  return a;
320
320
  }
321
- let W = /* @__PURE__ */ new WeakMap();
322
- function xe() {
323
- W = /* @__PURE__ */ new WeakMap();
321
+ let F = /* @__PURE__ */ new WeakMap();
322
+ function Ie() {
323
+ F = /* @__PURE__ */ new WeakMap();
324
324
  }
325
- function ke(t) {
325
+ function Ee(t) {
326
326
  return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
327
327
  }
328
- const Ie = [
328
+ const Te = [
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 Le(t) {
339
339
  const a = t.tagName.toLowerCase();
340
- for (const i of Ie) {
340
+ for (const i of Te) {
341
341
  const n = t.getAttribute(i);
342
342
  if (n != null && n.length > 0 && n.length < 100)
343
- return `${a}[${i}="${ke(n)}"]`;
343
+ return `${a}[${i}="${Ee(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(Le(n)), i.length >= 2) {
365
365
  const r = i.join(" > ");
366
366
  try {
367
367
  const o = a.querySelectorAll(r);
@@ -373,30 +373,30 @@ function M(t) {
373
373
  }
374
374
  return i.join(" > ");
375
375
  }
376
- function d(t) {
376
+ function u(t) {
377
377
  var r;
378
- const a = W.get(t);
378
+ const a = F.get(t);
379
379
  if (a !== void 0) return a;
380
380
  const e = [];
381
381
  let i = t;
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 F.set(t, n), n;
398
398
  }
399
- function bi(t) {
399
+ function yi(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 Ce = /* @__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"]), qe = /* @__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
+ ]), Re = /* @__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
+ ]), Ne = {
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
+ }, Me = {
572
572
  alert: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
573
573
  article: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
574
574
  banner: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
@@ -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 $e() {
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, d;
621
+ const h = () => (s === void 0 && (s = u(r), d = c(r)), { selector: s, html: d });
622
622
  for (const l of r.attributes)
623
- if (l.name.startsWith("aria-") && !Te.has(l.name)) {
623
+ if (l.name.startsWith("aria-") && !Ce.has(l.name)) {
624
624
  const m = h();
625
625
  a.push({
626
626
  ruleId: "aria-valid-attr",
@@ -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 (qe.has(l.name)) {
661
661
  if (m === "" || !/^-?\d+$/.test(m)) {
662
662
  const g = h();
663
663
  e.push({
@@ -668,7 +668,7 @@ function 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 (Re.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 && Ne[m]) {
702
702
  const g = r.hasAttribute("aria-label"), b = r.hasAttribute("aria-labelledby");
703
703
  if (g || b) {
704
704
  const f = h();
@@ -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 = Me[l];
728
728
  if (g) {
729
729
  for (const b of r.attributes)
730
730
  if (b.name.startsWith("aria-") && g.has(b.name)) {
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,11 +743,11 @@ 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 _ = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
749
+ function He() {
750
+ _ = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
751
751
  }
752
752
  function A(t) {
753
753
  let a = _.get(t);
@@ -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 De(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 = Oe(t);
810
+ return j.set(t, e), e;
778
811
  }
779
- function He(t) {
812
+ function Oe(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,20 +828,20 @@ 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 We = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
832
+ function Be(t) {
833
+ const a = P.get(t);
801
834
  if (a !== void 0) return a;
802
- const e = Be(t);
803
- return j.set(t, e), e;
835
+ const e = Fe(t);
836
+ return P.set(t, e), e;
804
837
  }
805
- function Be(t) {
838
+ function Fe(t) {
806
839
  let a = t, e = !1;
807
840
  for (; a; ) {
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)) && We.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 je(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 || "", d = (o = n.textContent) == null ? void 0 : o.replace(s, "").trim().slice(0, 100);
878
+ d && a.push(`Adjacent text: ${d}`);
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 Pe = {
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");
@@ -871,44 +908,44 @@ const _e = {
871
908
  if (n !== null && n.trim() === "" && n !== "") {
872
909
  a.push({
873
910
  ruleId: "img-alt",
874
- selector: d(e),
875
- html: u(e),
911
+ selector: 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
- selector: d(e),
885
- html: u(e),
921
+ selector: 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
- selector: d(e),
895
- html: u(e),
931
+ selector: 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 Ve(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 d = 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 (d.length) return d.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 ze = {
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 (!Ve(i)) {
932
969
  const r = i.getAttribute("role");
933
970
  a.push({
934
971
  ruleId: "svg-img-alt",
935
- selector: d(i),
936
- html: u(i),
972
+ selector: 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
+ }, Ue = {
945
982
  id: "input-image-alt",
946
983
  wcag: ["1.1.1", "4.1.2"],
947
984
  level: "A",
@@ -953,14 +990,14 @@ const je = {
953
990
  for (const e of t.querySelectorAll('input[type="image"]'))
954
991
  p(e) || v(e) || a.push({
955
992
  ruleId: "input-image-alt",
956
- selector: d(e),
957
- html: u(e),
993
+ selector: 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
+ }, Ge = {
964
1001
  id: "image-redundant-alt",
965
1002
  wcag: [],
966
1003
  level: "A",
@@ -979,8 +1016,8 @@ const je = {
979
1016
  const o = ((e = r.textContent) == null ? void 0 : e.trim().toLowerCase()) || "";
980
1017
  o && o === n && a.push({
981
1018
  ruleId: "image-redundant-alt",
982
- selector: d(i),
983
- html: u(i),
1019
+ selector: 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
+ }, Xe = ["image", "picture", "photo", "graphic", "icon", "img"], Ye = {
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 && Xe.some((n) => i.split(/\s+/).includes(n)) && a.push({
1004
1041
  ruleId: "image-alt-redundant-words",
1005
- selector: d(e),
1006
- html: u(e),
1042
+ selector: 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
+ }, Ke = {
1014
1051
  id: "area-alt",
1015
1052
  wcag: ["1.1.1", "4.1.2"],
1016
1053
  level: "A",
@@ -1023,8 +1060,8 @@ const je = {
1023
1060
  if (p(e)) continue;
1024
1061
  v(e) || a.push({
1025
1062
  ruleId: "area-alt",
1026
- selector: d(e),
1027
- html: u(e),
1063
+ selector: 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 Qe(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 d, h;
1078
+ return ((h = (d = t.ownerDocument.getElementById(s)) == null ? void 0 : d.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 Je = {
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" || Qe(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]");
@@ -1075,15 +1112,15 @@ const Ye = {
1075
1112
  }
1076
1113
  a.push({
1077
1114
  ruleId: "object-alt",
1078
- selector: d(i),
1079
- html: u(i),
1115
+ selector: 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
+ }, Ze = {
1087
1124
  id: "role-img-alt",
1088
1125
  wcag: ["1.1.1"],
1089
1126
  level: "A",
@@ -1096,8 +1133,8 @@ const Ye = {
1096
1133
  if (p(e) || e.tagName.toLowerCase() === "svg" || e.tagName.toLowerCase() === "img") continue;
1097
1134
  v(e) || a.push({
1098
1135
  ruleId: "role-img-alt",
1099
- selector: d(e),
1100
- html: u(e),
1136
+ selector: 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 Ai(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 = et(e);
1139
1176
  return n || null;
1140
1177
  }
1141
- function Qe(t) {
1178
+ function et(t) {
1142
1179
  switch (t.type) {
1143
1180
  case "selector-exists":
1144
1181
  return null;
@@ -1181,8 +1218,8 @@ function k(t) {
1181
1218
  for (const n of e.querySelectorAll(t.selector))
1182
1219
  a && p(n) || i.push({
1183
1220
  ruleId: t.id,
1184
- selector: d(n),
1185
- html: u(n),
1221
+ selector: 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 d = s.getAttribute(n);
1234
+ d !== null && tt(d, r, o) && i.push({
1198
1235
  ruleId: t.id,
1199
- selector: d(s),
1200
- html: u(s),
1236
+ selector: u(s),
1237
+ html: c(s),
1201
1238
  impact: t.impact,
1202
1239
  message: x(t.message, s, t.check),
1203
1240
  element: s
@@ -1210,8 +1247,8 @@ function k(t) {
1210
1247
  for (const r of e.querySelectorAll(t.selector))
1211
1248
  a && p(r) || r.hasAttribute(n) || i.push({
1212
1249
  ruleId: t.id,
1213
- selector: d(r),
1214
- html: u(r),
1250
+ selector: 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 d;
1224
1261
  try {
1225
- c = new RegExp(r, o);
1262
+ d = 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 = d.test(l);
1234
1271
  s && !m ? i.push({
1235
1272
  ruleId: t.id,
1236
- selector: d(h),
1237
- html: u(h),
1273
+ selector: 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
- selector: d(h),
1244
- html: u(h),
1280
+ selector: u(h),
1281
+ html: c(h),
1245
1282
  impact: t.impact,
1246
1283
  message: x(t.message, h, t.check),
1247
1284
  element: h
@@ -1254,8 +1291,8 @@ function k(t) {
1254
1291
  for (const r of e.querySelectorAll(t.selector))
1255
1292
  a && p(r) || r.querySelector(n) || i.push({
1256
1293
  ruleId: t.id,
1257
- selector: d(r),
1258
- html: u(r),
1294
+ selector: u(r),
1295
+ html: c(r),
1259
1296
  impact: t.impact,
1260
1297
  message: x(t.message, r, t.check),
1261
1298
  element: r
@@ -1272,8 +1309,8 @@ function k(t) {
1272
1309
  if (!n.has(o.tagName.toLowerCase())) {
1273
1310
  i.push({
1274
1311
  ruleId: t.id,
1275
- selector: d(o),
1276
- html: u(o),
1312
+ selector: 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 tt(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 at = {
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
+ }, it = k(at), nt = [
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(", "), rt = /* @__PURE__ */ new Set([
1333
1370
  "checkbox",
1334
1371
  "menuitemcheckbox",
1335
1372
  "menuitemradio",
1336
1373
  "radio",
1337
1374
  "switch"
1338
- ]), it = /* @__PURE__ */ new Set([
1375
+ ]), ot = /* @__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 st(t) {
1384
+ var o, s, d, 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 && rt.has(a) || (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && !(a && ot.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 = (d = t.getAttribute("title")) == null ? void 0 : d.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 lt = {
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, ${nt}`);
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
+ st(r) || a.push({
1398
1435
  ruleId: "label",
1399
- selector: d(r),
1400
- html: u(r),
1436
+ selector: 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
+ }, ct = {
1408
1445
  id: "form-field-multiple-labels",
1409
1446
  wcag: [],
1410
1447
  level: "A",
@@ -1428,15 +1465,15 @@ const rt = {
1428
1465
  const s = n.length + r;
1429
1466
  s > 1 && a.push({
1430
1467
  ruleId: "form-field-multiple-labels",
1431
- selector: d(i),
1432
- html: u(i),
1468
+ selector: 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
+ }, ut = {
1440
1477
  id: "select-name",
1441
1478
  wcag: ["4.1.2"],
1442
1479
  level: "A",
@@ -1448,14 +1485,14 @@ const rt = {
1448
1485
  for (const e of t.querySelectorAll("select"))
1449
1486
  p(e) || v(e) || a.push({
1450
1487
  ruleId: "select-name",
1451
- selector: d(e),
1452
- html: u(e),
1488
+ selector: 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
+ }, dt = {
1459
1496
  id: "input-button-name",
1460
1497
  wcag: ["4.1.2"],
1461
1498
  level: "A",
@@ -1472,15 +1509,15 @@ const rt = {
1472
1509
  const r = (e = n.getAttribute("value")) == null ? void 0 : e.trim(), o = (i = n.getAttribute("type")) == null ? void 0 : i.toLowerCase(), s = (o === "submit" || o === "reset") && !n.hasAttribute("value");
1473
1510
  !r && !s && !v(n) && a.push({
1474
1511
  ruleId: "input-button-name",
1475
- selector: d(n),
1476
- html: u(n),
1512
+ selector: 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
+ }, mt = /* @__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
+ ]), ht = /* @__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
+ ]), pt = /* @__PURE__ */ new Set(["home", "work", "mobile", "fax", "pager"]), gt = /* @__PURE__ */ new Set(["shipping", "billing"]), bt = /* @__PURE__ */ new Set(["webauthn"]);
1585
+ function ft(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 && gt.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 && pt.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 !mt.has(n) || i && !ht.has(n) ? !1 : (e++, e < a.length && bt.has(a[e]) && e++, e === a.length);
1557
1594
  }
1558
- const gt = {
1595
+ const vt = {
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 && (ft(i) || a.push({
1571
1608
  ruleId: "autocomplete-valid",
1572
- selector: d(e),
1573
- html: u(e),
1609
+ selector: 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 wt = {
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
- selector: d(e),
1625
- html: u(e),
1661
+ selector: 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
- selector: d(e),
1643
- html: u(e),
1679
+ selector: 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
+ }, yt = {
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 d = s.hasAttribute("title") && ((i = s.getAttribute("title")) == null ? void 0 : i.trim()), h = s.hasAttribute("aria-label") && ((n = s.getAttribute("aria-label")) == null ? void 0 : n.trim()), l = s.hasAttribute("aria-labelledby");
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), d && !h && !l && !m && a.push({
1674
1711
  ruleId: "label-title-only",
1675
- selector: d(s),
1676
- html: u(s),
1712
+ selector: 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
+ }, At = {
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
+ }, St = k(At), xt = /* @__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
+ ]), kt = {
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 (!xt.has(i)) continue;
1735
1772
  e.getAttribute("role") || a.push({
1736
1773
  ruleId: "focus-order-semantics",
1737
- selector: d(e),
1738
- html: u(e),
1774
+ selector: 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
+ }, It = /* @__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
+ ]), Et = /* @__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
+ ]), Tt = {
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 Lt(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 = Tt[e]) == null ? void 0 : o.has(i)) ?? !1;
1792
1829
  }
1793
- function Et(t) {
1830
+ function Ct(t) {
1794
1831
  var n;
1795
1832
  const a = t.tagName.toLowerCase();
1796
- if (St.has(a))
1833
+ if (It.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 && Et.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 qt(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 Rt = {
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) && Ct(o)) {
1823
1860
  if (r.length > 0) {
1824
1861
  const s = r[r.length - 1];
1825
- It(s, o) || a.push({
1862
+ Lt(s, o) || a.push({
1826
1863
  ruleId: "nested-interactive",
1827
- selector: d(o),
1828
- html: u(o),
1864
+ selector: 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
+ qt(o) && r.push(o);
1834
1871
  }
1835
1872
  o = n.nextNode();
1836
1873
  }
1837
1874
  return a;
1838
1875
  }
1839
- }, Ct = {
1876
+ }, Nt = {
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 d = e.getAttribute("tabindex");
1896
+ d !== null && d !== "-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
- selector: d(e),
1858
- html: u(e),
1900
+ selector: 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
+ }, Mt = {
1866
1909
  id: "accesskeys",
1867
1910
  wcag: [],
1868
1911
  level: "A",
@@ -1885,14 +1928,14 @@ const Lt = {
1885
1928
  for (const o of r.slice(1))
1886
1929
  a.push({
1887
1930
  ruleId: "accesskeys",
1888
- selector: d(o),
1889
- html: u(o),
1931
+ selector: 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
+ }, $t = {
1896
1939
  id: "heading-order",
1897
1940
  wcag: [],
1898
1941
  level: "A",
@@ -1908,16 +1951,16 @@ const Lt = {
1908
1951
  let o;
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
- selector: d(r),
1912
- html: u(r),
1954
+ selector: 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"]', Ht = {
1921
1964
  id: "landmark-one-main",
1922
1965
  wcag: [],
1923
1966
  level: "A",
@@ -1935,13 +1978,13 @@ const Lt = {
1935
1978
  message: "Page has no main landmark."
1936
1979
  }] : a.length > 1 ? Array.from(a).slice(1).map((e) => ({
1937
1980
  ruleId: "landmark-one-main",
1938
- selector: d(e),
1939
- html: u(e),
1981
+ selector: 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
+ }, Dt = {
1945
1988
  id: "landmark-no-duplicate-banner",
1946
1989
  wcag: [],
1947
1990
  level: "A",
@@ -1954,14 +1997,14 @@ const Lt = {
1954
1997
  return i.length > 1 && i.slice(1).forEach(
1955
1998
  (n) => a.push({
1956
1999
  ruleId: "landmark-no-duplicate-banner",
1957
- selector: d(n),
1958
- html: u(n),
2000
+ selector: 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
+ }, Ot = {
1965
2008
  id: "landmark-no-duplicate-contentinfo",
1966
2009
  wcag: [],
1967
2010
  level: "A",
@@ -1974,14 +2017,14 @@ const Lt = {
1974
2017
  return i.length > 1 && i.slice(1).forEach(
1975
2018
  (n) => a.push({
1976
2019
  ruleId: "landmark-no-duplicate-contentinfo",
1977
- selector: d(n),
1978
- html: u(n),
2020
+ selector: 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
+ }, Wt = {
1985
2028
  id: "landmark-no-duplicate-main",
1986
2029
  wcag: [],
1987
2030
  level: "A",
@@ -1994,14 +2037,14 @@ const Lt = {
1994
2037
  return e.length > 1 && Array.from(e).slice(1).forEach(
1995
2038
  (i) => a.push({
1996
2039
  ruleId: "landmark-no-duplicate-main",
1997
- selector: d(i),
1998
- html: u(i),
2040
+ selector: 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
+ }, Bt = {
2005
2048
  id: "landmark-banner-is-top-level",
2006
2049
  wcag: [],
2007
2050
  level: "A",
@@ -2014,14 +2057,14 @@ const Lt = {
2014
2057
  for (const i of e)
2015
2058
  i.closest(N) && a.push({
2016
2059
  ruleId: "landmark-banner-is-top-level",
2017
- selector: d(i),
2018
- html: u(i),
2060
+ selector: 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
+ }, Ft = {
2025
2068
  id: "landmark-contentinfo-is-top-level",
2026
2069
  wcag: [],
2027
2070
  level: "A",
@@ -2034,14 +2077,14 @@ const Lt = {
2034
2077
  for (const i of e)
2035
2078
  i.closest(N) && a.push({
2036
2079
  ruleId: "landmark-contentinfo-is-top-level",
2037
- selector: d(i),
2038
- html: u(i),
2080
+ selector: 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",
@@ -2055,15 +2098,15 @@ const Lt = {
2055
2098
  const n = i.parentElement;
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
- selector: d(i),
2059
- html: u(i),
2101
+ selector: 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
+ }, jt = {
2067
2110
  id: "landmark-complementary-is-top-level",
2068
2111
  wcag: [],
2069
2112
  level: "A",
@@ -2077,15 +2120,15 @@ const Lt = {
2077
2120
  const n = i.parentElement;
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
- selector: d(i),
2081
- html: u(i),
2123
+ selector: 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
+ }, Pt = {
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 d = v(s).toLowerCase() || "", h = o.get(d) || [];
2152
+ h.push(s), o.set(d, 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, d] of o)
2155
+ if (d.length > 1)
2156
+ for (const h of d.slice(1))
2114
2157
  a.push({
2115
2158
  ruleId: "landmark-unique",
2116
- selector: d(h),
2117
- html: u(h),
2159
+ selector: 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
+ }, Vt = {
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
- selector: d(n),
2142
- html: u(n),
2184
+ selector: 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
+ }, zt = {
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
+ }, Ut = k(zt), Gt = {
2161
2204
  id: "dlitem",
2162
2205
  wcag: ["1.3.1"],
2163
2206
  level: "A",
@@ -2169,14 +2212,14 @@ const Lt = {
2169
2212
  for (const e of t.querySelectorAll("dt, dd"))
2170
2213
  (!e.parentElement || e.parentElement.tagName.toLowerCase() !== "dl") && a.push({
2171
2214
  ruleId: "dlitem",
2172
- selector: d(e),
2173
- html: u(e),
2215
+ selector: 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
+ }, Xt = {
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
+ }, Yt = k(Xt), Kt = {
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
+ }, Qt = {
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
+ }, Jt = {
2236
2279
  id: "page-has-heading-one",
2237
2280
  wcag: [],
2238
2281
  level: "A",
@@ -2254,7 +2297,14 @@ const Lt = {
2254
2297
  message: "Page does not contain a level-one heading."
2255
2298
  }];
2256
2299
  }
2257
- }, Kt = {
2300
+ };
2301
+ function me(t) {
2302
+ if (!(t instanceof HTMLElement)) return !1;
2303
+ if (t.style.display === "none" || t.style.visibility === "hidden") return !0;
2304
+ const a = t.getAttribute("width"), e = t.getAttribute("height");
2305
+ return (a === "0" || a === "1") && (e === "0" || e === "1");
2306
+ }
2307
+ const Zt = {
2258
2308
  id: "frame-title",
2259
2309
  wcag: ["4.1.2"],
2260
2310
  level: "A",
@@ -2264,18 +2314,18 @@ const Lt = {
2264
2314
  run(t) {
2265
2315
  const a = [];
2266
2316
  for (const e of t.querySelectorAll("iframe, frame")) {
2267
- if (p(e)) continue;
2317
+ if (p(e) || me(e)) continue;
2268
2318
  v(e) || a.push({
2269
2319
  ruleId: "frame-title",
2270
- selector: d(e),
2271
- html: u(e),
2320
+ selector: u(e),
2321
+ html: c(e),
2272
2322
  impact: "serious",
2273
2323
  message: "Frame is missing an accessible name. Add a title attribute."
2274
2324
  });
2275
2325
  }
2276
2326
  return a;
2277
2327
  }
2278
- }, Qt = {
2328
+ }, ea = {
2279
2329
  id: "frame-title-unique",
2280
2330
  wcag: ["4.1.2"],
2281
2331
  level: "A",
@@ -2287,13 +2337,11 @@ const Lt = {
2287
2337
  var n;
2288
2338
  const a = [], e = Array.from(t.querySelectorAll("iframe[title], frame[title]")), i = /* @__PURE__ */ new Map();
2289
2339
  for (const r of e) {
2290
- if (p(r)) continue;
2291
- const o = r.getAttribute("width"), s = r.getAttribute("height");
2292
- 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);
2340
+ if (p(r) || me(r)) continue;
2341
+ const o = (n = r.getAttribute("title")) == null ? void 0 : n.trim().toLowerCase();
2342
+ if (o) {
2343
+ const s = i.get(o) || [];
2344
+ s.push(r), i.set(o, s);
2297
2345
  }
2298
2346
  }
2299
2347
  for (const [, r] of i)
@@ -2301,14 +2349,14 @@ const Lt = {
2301
2349
  for (const o of r.slice(1))
2302
2350
  a.push({
2303
2351
  ruleId: "frame-title-unique",
2304
- selector: d(o),
2305
- html: u(o),
2352
+ selector: u(o),
2353
+ html: c(o),
2306
2354
  impact: "moderate",
2307
2355
  message: "Frame title is not unique. Use a distinct title for each frame."
2308
2356
  });
2309
2357
  return a;
2310
2358
  }
2311
- }, Jt = {
2359
+ }, ta = {
2312
2360
  id: "empty-heading",
2313
2361
  wcag: [],
2314
2362
  level: "A",
@@ -2321,14 +2369,14 @@ const Lt = {
2321
2369
  for (const i of e)
2322
2370
  p(i) || v(i) || a.push({
2323
2371
  ruleId: "empty-heading",
2324
- selector: d(i),
2325
- html: u(i),
2372
+ selector: u(i),
2373
+ html: c(i),
2326
2374
  impact: "minor",
2327
2375
  message: "Heading is empty. Add text content or remove the heading element."
2328
2376
  });
2329
2377
  return a;
2330
2378
  }
2331
- }, Zt = {
2379
+ }, aa = {
2332
2380
  id: "meta-viewport",
2333
2381
  wcag: ["1.4.4"],
2334
2382
  level: "AA",
@@ -2342,8 +2390,8 @@ const Lt = {
2342
2390
  const i = ((r = e.getAttribute("content")) == null ? void 0 : r.toLowerCase()) || "";
2343
2391
  (/user-scalable\s*=\s*no/i.test(i) || /user-scalable\s*=\s*0/i.test(i)) && a.push({
2344
2392
  ruleId: "meta-viewport",
2345
- selector: d(e),
2346
- html: u(e),
2393
+ selector: u(e),
2394
+ html: c(e),
2347
2395
  impact: "critical",
2348
2396
  message: "Viewport disables user scaling. Remove user-scalable=no."
2349
2397
  });
@@ -2352,15 +2400,15 @@ const Lt = {
2352
2400
  const o = n[1], s = o.toLowerCase() === "yes" ? 1 : parseFloat(o);
2353
2401
  s < 2 && a.push({
2354
2402
  ruleId: "meta-viewport",
2355
- selector: d(e),
2356
- html: u(e),
2403
+ selector: u(e),
2404
+ html: c(e),
2357
2405
  impact: "critical",
2358
2406
  message: `Viewport maximum-scale=${s} restricts zooming. Set to at least 2 or remove.`
2359
2407
  });
2360
2408
  }
2361
2409
  return a;
2362
2410
  }
2363
- }, ea = {
2411
+ }, ia = {
2364
2412
  id: "meta-refresh",
2365
2413
  wcag: ["2.2.1", "2.2.4", "3.2.5"],
2366
2414
  level: "A",
@@ -2375,23 +2423,23 @@ const Lt = {
2375
2423
  if (/^\d+\s*[;,]\s*url\s*=/i.test(e) || /^\d+\s*[;,]\s*['"]?\s*https?:/i.test(e))
2376
2424
  return n > 0 && n <= 72e3 ? [{
2377
2425
  ruleId: "meta-refresh",
2378
- selector: d(a),
2379
- html: u(a),
2426
+ selector: u(a),
2427
+ html: c(a),
2380
2428
  impact: "critical",
2381
2429
  message: `Page redirects after ${n} seconds without warning. Use server-side redirect.`
2382
2430
  }] : [];
2383
2431
  if (n > 0 && n <= 72e3)
2384
2432
  return [{
2385
2433
  ruleId: "meta-refresh",
2386
- selector: d(a),
2387
- html: u(a),
2434
+ selector: u(a),
2435
+ html: c(a),
2388
2436
  impact: "critical",
2389
2437
  message: `Page auto-refreshes after ${n} seconds. Provide user control over refresh.`
2390
2438
  }];
2391
2439
  }
2392
2440
  return [];
2393
2441
  }
2394
- }, ta = {
2442
+ }, na = {
2395
2443
  id: "blink",
2396
2444
  selector: "blink",
2397
2445
  check: { type: "selector-exists" },
@@ -2402,7 +2450,7 @@ const Lt = {
2402
2450
  level: "A",
2403
2451
  guidance: "Blinking content can cause seizures in users with photosensitive epilepsy and is distracting for users with attention disorders. The <blink> element is deprecated and should never be used. If you need to draw attention to content, use less intrusive methods like color, borders, or icons.",
2404
2452
  prompt: "Suggest static alternatives to the blinking effect."
2405
- }, aa = k(ta), ia = {
2453
+ }, ra = k(na), oa = {
2406
2454
  id: "marquee",
2407
2455
  selector: "marquee",
2408
2456
  check: { type: "selector-exists" },
@@ -2413,7 +2461,7 @@ const Lt = {
2413
2461
  level: "A",
2414
2462
  guidance: "Scrolling or moving content is difficult for many users to read, especially those with cognitive or visual disabilities. The <marquee> element is deprecated. Replace scrolling text with static content. If content must scroll, provide pause/stop controls and ensure it stops after 5 seconds.",
2415
2463
  prompt: "Suggest static alternatives or accessible carousel patterns."
2416
- }, na = k(ia), ra = {
2464
+ }, sa = k(oa), la = {
2417
2465
  id: "p-as-heading",
2418
2466
  wcag: [],
2419
2467
  level: "A",
@@ -2426,13 +2474,13 @@ const Lt = {
2426
2474
  const a = [];
2427
2475
  for (const n of t.querySelectorAll("p")) {
2428
2476
  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(/[.!?,;:]$/);
2477
+ const r = n.getAttribute("style") || "", o = /font-weight\s*:\s*(bold|[6-9]00)/i.test(r), s = /font-size\s*:\s*(\d+)\s*(px|em|rem)/i.test(r), d = ((e = n.className) == null ? void 0 : e.toLowerCase()) || "", h = /\bh[1-6]\b|\bheading\b/.test(d), l = ((i = n.textContent) == null ? void 0 : i.trim()) || "", m = l.length > 0 && l.length < 50, g = !l.match(/[.!?,;:]$/);
2430
2478
  if ((o && s || o && h) && m && g) {
2431
2479
  const w = n.nextElementSibling;
2432
2480
  w && (w.tagName === "P" || w.tagName === "DIV" || w.tagName === "UL") && a.push({
2433
2481
  ruleId: "p-as-heading",
2434
- selector: d(n),
2435
- html: u(n),
2482
+ selector: u(n),
2483
+ html: c(n),
2436
2484
  impact: "serious",
2437
2485
  message: "Paragraph appears to be styled as a heading. Use an h1-h6 element instead."
2438
2486
  });
@@ -2440,7 +2488,7 @@ const Lt = {
2440
2488
  }
2441
2489
  return a;
2442
2490
  }
2443
- }, oa = {
2491
+ }, ca = {
2444
2492
  id: "aria-roles",
2445
2493
  wcag: ["4.1.2"],
2446
2494
  level: "A",
@@ -2451,17 +2499,17 @@ const Lt = {
2451
2499
  const a = [];
2452
2500
  for (const e of t.querySelectorAll("[role]")) {
2453
2501
  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({
2502
+ !r.some((s) => Se(s)) && r.length > 0 && a.push({
2455
2503
  ruleId: "aria-roles",
2456
- selector: d(e),
2457
- html: u(e),
2504
+ selector: u(e),
2505
+ html: c(e),
2458
2506
  impact: "critical",
2459
2507
  message: `Invalid ARIA role "${r[0]}".`
2460
2508
  });
2461
2509
  }
2462
2510
  return a;
2463
2511
  }
2464
- }, sa = {
2512
+ }, ua = {
2465
2513
  id: "aria-valid-attr",
2466
2514
  wcag: ["4.1.2"],
2467
2515
  level: "A",
@@ -2469,9 +2517,9 @@ const Lt = {
2469
2517
  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
2518
  prompt: "Identify the misspelled attribute and provide the correct spelling.",
2471
2519
  run(t) {
2472
- return V(t).validAttr;
2520
+ return z(t).validAttr;
2473
2521
  }
2474
- }, la = {
2522
+ }, da = {
2475
2523
  id: "aria-valid-attr-value",
2476
2524
  wcag: ["4.1.2"],
2477
2525
  level: "A",
@@ -2479,9 +2527,9 @@ const Lt = {
2479
2527
  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
2528
  prompt: "Show the invalid value and list the valid values for this specific attribute.",
2481
2529
  run(t) {
2482
- return V(t).validAttrValue;
2530
+ return z(t).validAttrValue;
2483
2531
  }
2484
- }, ca = {
2532
+ }, ma = {
2485
2533
  checkbox: ["aria-checked"],
2486
2534
  combobox: ["aria-expanded"],
2487
2535
  heading: ["aria-level"],
@@ -2495,7 +2543,7 @@ const Lt = {
2495
2543
  slider: ["aria-valuenow"],
2496
2544
  spinbutton: ["aria-valuenow"],
2497
2545
  switch: ["aria-checked"]
2498
- }, ua = {
2546
+ }, ha = {
2499
2547
  id: "aria-required-attr",
2500
2548
  wcag: ["4.1.2"],
2501
2549
  level: "A",
@@ -2506,7 +2554,7 @@ const Lt = {
2506
2554
  const a = [];
2507
2555
  for (const e of t.querySelectorAll("[role]")) {
2508
2556
  if (p(e) || e instanceof HTMLElement && e.style.display === "none") continue;
2509
- const i = e.getAttribute("role").trim().toLowerCase(), n = ca[i];
2557
+ const i = e.getAttribute("role").trim().toLowerCase(), n = ma[i];
2510
2558
  if (n && !(i === "checkbox" && e instanceof HTMLInputElement && e.type === "checkbox") && !(i === "radio" && e instanceof HTMLInputElement && e.type === "radio") && !(i === "option" && e instanceof HTMLOptionElement) && !(i === "heading" && /^h[1-6]$/i.test(e.tagName))) {
2511
2559
  if (i === "separator") {
2512
2560
  const r = e.getAttribute("tabindex");
@@ -2517,8 +2565,8 @@ const Lt = {
2517
2565
  if (!e.hasAttribute(r)) {
2518
2566
  a.push({
2519
2567
  ruleId: "aria-required-attr",
2520
- selector: d(e),
2521
- html: u(e),
2568
+ selector: u(e),
2569
+ html: c(e),
2522
2570
  impact: "critical",
2523
2571
  message: `Role "${i}" requires attribute "${r}".`
2524
2572
  });
@@ -2530,24 +2578,24 @@ const Lt = {
2530
2578
  return a;
2531
2579
  }
2532
2580
  };
2533
- function da(t) {
2581
+ function pa(t) {
2534
2582
  var r, o, s;
2535
2583
  const a = [], e = t.className;
2536
2584
  e && typeof e == "string" && e.trim() && a.push(`Classes: ${e.trim().slice(0, 100)}`);
2537
2585
  const i = t.closest("form");
2538
2586
  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)}`);
2587
+ const d = i.getAttribute("aria-label") || ((o = (r = i.querySelector("legend")) == null ? void 0 : r.textContent) == null ? void 0 : o.trim());
2588
+ d && a.push(`Form: ${d.slice(0, 60)}`);
2541
2589
  }
2542
2590
  const n = t.parentElement;
2543
2591
  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)}`);
2592
+ const d = n.closest("h1, h2, h3, h4, h5, h6") || n.querySelector("h1, h2, h3, h4, h5, h6");
2593
+ (s = d == null ? void 0 : d.textContent) != null && s.trim() && a.push(`Nearby heading: ${d.textContent.trim().slice(0, 60)}`);
2546
2594
  }
2547
2595
  return a.length > 0 ? a.join(`
2548
2596
  `) : void 0;
2549
2597
  }
2550
- const ma = {
2598
+ const ga = {
2551
2599
  id: "button-name",
2552
2600
  wcag: ["4.1.2"],
2553
2601
  level: "A",
@@ -2562,16 +2610,16 @@ const ma = {
2562
2610
  if ((i === "none" || i === "presentation") && !(e.matches('button:not([disabled]), [tabindex]:not([tabindex="-1"])') || e.tagName.toLowerCase() === "button" && !e.disabled) || e.getRootNode() instanceof ShadowRoot) continue;
2563
2611
  v(e) || a.push({
2564
2612
  ruleId: "button-name",
2565
- selector: d(e),
2566
- html: u(e),
2613
+ selector: u(e),
2614
+ html: c(e),
2567
2615
  impact: "critical",
2568
2616
  message: "Button has no discernible text.",
2569
- context: da(e)
2617
+ context: pa(e)
2570
2618
  });
2571
2619
  }
2572
2620
  return a;
2573
2621
  }
2574
- }, ha = {
2622
+ }, ba = {
2575
2623
  alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
2576
2624
  alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
2577
2625
  application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
@@ -2643,7 +2691,7 @@ const ma = {
2643
2691
  tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
2644
2692
  treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
2645
2693
  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([
2694
+ }, fa = /* @__PURE__ */ new Set([
2647
2695
  "aria-atomic",
2648
2696
  "aria-busy",
2649
2697
  "aria-controls",
@@ -2667,7 +2715,7 @@ const ma = {
2667
2715
  "aria-roledescription",
2668
2716
  "aria-braillelabel",
2669
2717
  "aria-brailleroledescription"
2670
- ]), ga = {
2718
+ ]), va = {
2671
2719
  id: "aria-allowed-attr",
2672
2720
  wcag: ["4.1.2"],
2673
2721
  level: "A",
@@ -2680,20 +2728,20 @@ const ma = {
2680
2728
  if (p(e)) continue;
2681
2729
  const i = C(e);
2682
2730
  if (!i) continue;
2683
- const n = ha[i];
2731
+ const n = ba[i];
2684
2732
  if (n)
2685
2733
  for (const r of e.attributes)
2686
- r.name.startsWith("aria-") && (pa.has(r.name) || n.has(r.name) || a.push({
2734
+ r.name.startsWith("aria-") && (fa.has(r.name) || n.has(r.name) || a.push({
2687
2735
  ruleId: "aria-allowed-attr",
2688
- selector: d(e),
2689
- html: u(e),
2736
+ selector: u(e),
2737
+ html: c(e),
2690
2738
  impact: "critical",
2691
2739
  message: `ARIA attribute "${r.name}" is not allowed on role "${i}".`
2692
2740
  }));
2693
2741
  }
2694
2742
  return a;
2695
2743
  }
2696
- }, ba = /* @__PURE__ */ new Set([
2744
+ }, wa = /* @__PURE__ */ new Set([
2697
2745
  "base",
2698
2746
  "col",
2699
2747
  "colgroup",
@@ -2708,7 +2756,7 @@ const ma = {
2708
2756
  "template",
2709
2757
  "title",
2710
2758
  "track"
2711
- ]), I = {
2759
+ ]), E = {
2712
2760
  a: /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem", "link"]),
2713
2761
  "a[href]": /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem"]),
2714
2762
  abbr: "any",
@@ -2815,22 +2863,22 @@ const ma = {
2815
2863
  video: /* @__PURE__ */ new Set(["application"]),
2816
2864
  wbr: /* @__PURE__ */ new Set(["none", "presentation"])
2817
2865
  };
2818
- function fa(t) {
2866
+ function ya(t) {
2819
2867
  var e;
2820
2868
  const a = t.tagName.toLowerCase();
2821
- if (ba.has(a))
2869
+ if (wa.has(a))
2822
2870
  return "none";
2823
2871
  if (a === "a" && t.hasAttribute("href"))
2824
- return I["a[href]"];
2872
+ return E["a[href]"];
2825
2873
  if (a === "img" && t.getAttribute("alt") === "")
2826
- return I["img[alt='']"];
2874
+ return E["img[alt='']"];
2827
2875
  if (a === "input") {
2828
2876
  const n = `input[type=${((e = t.getAttribute("type")) == null ? void 0 : e.toLowerCase()) || "text"}]`;
2829
- return n in I ? I[n] : "none";
2877
+ return n in E ? E[n] : "none";
2830
2878
  }
2831
- return I[a] || "any";
2879
+ return E[a] || "any";
2832
2880
  }
2833
- const va = {
2881
+ const Aa = {
2834
2882
  id: "aria-allowed-role",
2835
2883
  wcag: ["4.1.2"],
2836
2884
  level: "A",
@@ -2844,26 +2892,26 @@ const va = {
2844
2892
  if (p(i)) continue;
2845
2893
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2846
2894
  if (!n) continue;
2847
- const r = le(i);
2895
+ const r = ue(i);
2848
2896
  if (r && n === r) continue;
2849
- const o = fa(i);
2897
+ const o = ya(i);
2850
2898
  o === "none" ? a.push({
2851
2899
  ruleId: "aria-allowed-role",
2852
- selector: d(i),
2853
- html: u(i),
2900
+ selector: u(i),
2901
+ html: c(i),
2854
2902
  impact: "minor",
2855
2903
  message: `Element <${i.tagName.toLowerCase()}> should not have an explicit role.`
2856
2904
  }) : o !== "any" && !o.has(n) && a.push({
2857
2905
  ruleId: "aria-allowed-role",
2858
- selector: d(i),
2859
- html: u(i),
2906
+ selector: u(i),
2907
+ html: c(i),
2860
2908
  impact: "minor",
2861
2909
  message: `Role "${n}" is not allowed on element <${i.tagName.toLowerCase()}>.`
2862
2910
  });
2863
2911
  }
2864
2912
  return a;
2865
2913
  }
2866
- }, ee = {
2914
+ }, ae = {
2867
2915
  // Each array is an OR group - at least one of each inner array must be present
2868
2916
  combobox: [["listbox", "tree", "grid", "dialog", "textbox"]],
2869
2917
  // Must own/contain one of these
@@ -2880,7 +2928,7 @@ const va = {
2880
2928
  tablist: [["tab"]],
2881
2929
  tree: [["treeitem", "group"]],
2882
2930
  treegrid: [["row", "rowgroup"]]
2883
- }, te = {
2931
+ }, ie = {
2884
2932
  caption: ["figure", "table", "grid", "treegrid"],
2885
2933
  // cell/gridcell/columnheader/rowheader must be in a row
2886
2934
  // but we skip checking native td/th since they're handled by HTML semantics
@@ -2894,7 +2942,7 @@ const va = {
2894
2942
  tab: ["tablist"],
2895
2943
  treeitem: ["tree", "group"]
2896
2944
  };
2897
- function wa(t, a) {
2945
+ function Sa(t, a) {
2898
2946
  var r;
2899
2947
  const e = ((r = t.getAttribute("aria-owns")) == null ? void 0 : r.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
2900
2948
  for (const o of t.querySelectorAll("*")) {
@@ -2904,15 +2952,15 @@ function wa(t, a) {
2904
2952
  for (const o of e) {
2905
2953
  const s = i.getElementById(o);
2906
2954
  if (s) {
2907
- const c = C(s);
2908
- c && !p(s) && n.add(c);
2955
+ const d = C(s);
2956
+ d && !p(s) && n.add(d);
2909
2957
  }
2910
2958
  }
2911
2959
  for (const o of a)
2912
- if (!o.some((c) => n.has(c))) return !1;
2960
+ if (!o.some((d) => n.has(d))) return !1;
2913
2961
  return !0;
2914
2962
  }
2915
- const ya = {
2963
+ const xa = {
2916
2964
  id: "aria-required-children",
2917
2965
  wcag: ["4.1.2"],
2918
2966
  level: "A",
@@ -2925,14 +2973,14 @@ const ya = {
2925
2973
  for (const i of t.querySelectorAll("[role]")) {
2926
2974
  if (p(i)) continue;
2927
2975
  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)) {
2976
+ if (!n || !(n in ae)) continue;
2977
+ const r = ae[n];
2978
+ if (!Sa(i, r)) {
2931
2979
  const o = r.map((s) => s.join(" or ")).join(", ");
2932
2980
  a.push({
2933
2981
  ruleId: "aria-required-children",
2934
- selector: d(i),
2935
- html: u(i),
2982
+ selector: u(i),
2983
+ html: c(i),
2936
2984
  impact: "critical",
2937
2985
  message: `Role "${n}" requires children with role: ${o}.`
2938
2986
  });
@@ -2940,7 +2988,7 @@ const ya = {
2940
2988
  }
2941
2989
  return a;
2942
2990
  }
2943
- }, Aa = {
2991
+ }, ka = {
2944
2992
  id: "aria-required-parent",
2945
2993
  wcag: ["4.1.2"],
2946
2994
  level: "A",
@@ -2953,12 +3001,12 @@ const ya = {
2953
3001
  for (const i of t.querySelectorAll("[role]")) {
2954
3002
  if (p(i)) continue;
2955
3003
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2956
- if (!n || !(n in te)) continue;
2957
- const r = te[n];
3004
+ if (!n || !(n in ie)) continue;
3005
+ const r = ie[n];
2958
3006
  let o = i.parentElement, s = !1;
2959
3007
  for (; o && o !== t.documentElement; ) {
2960
- const c = C(o);
2961
- if (c && r.includes(c)) {
3008
+ const d = C(o);
3009
+ if (d && r.includes(d)) {
2962
3010
  s = !0;
2963
3011
  break;
2964
3012
  }
@@ -2966,15 +3014,15 @@ const ya = {
2966
3014
  }
2967
3015
  s || a.push({
2968
3016
  ruleId: "aria-required-parent",
2969
- selector: d(i),
2970
- html: u(i),
3017
+ selector: u(i),
3018
+ html: c(i),
2971
3019
  impact: "critical",
2972
3020
  message: `Role "${n}" must be contained within: ${r.join(", ")}.`
2973
3021
  });
2974
3022
  }
2975
3023
  return a;
2976
3024
  }
2977
- }, ae = [
3025
+ }, ne = [
2978
3026
  "a[href]",
2979
3027
  "button:not([disabled])",
2980
3028
  'input:not([disabled]):not([type="hidden"])',
@@ -2990,7 +3038,7 @@ const ya = {
2990
3038
  "embed",
2991
3039
  "area[href]"
2992
3040
  ].join(", ");
2993
- function Sa(t) {
3041
+ function Ia(t) {
2994
3042
  let a = t;
2995
3043
  const e = t.ownerDocument, i = e.defaultView;
2996
3044
  for (; a && a !== e.body; ) {
@@ -3003,7 +3051,7 @@ function Sa(t) {
3003
3051
  }
3004
3052
  return !0;
3005
3053
  }
3006
- const xa = {
3054
+ const Ea = {
3007
3055
  id: "aria-hidden-body",
3008
3056
  selector: 'body[aria-hidden="true"]',
3009
3057
  check: { type: "selector-exists" },
@@ -3015,7 +3063,7 @@ const xa = {
3015
3063
  guidance: "Setting aria-hidden='true' on the body element hides all page content from assistive technologies, making the page completely inaccessible to screen reader users. Remove aria-hidden from the body element. If you need to hide content temporarily (e.g., behind a modal), use aria-hidden on specific sections instead.",
3016
3064
  prompt: "Instruct to remove aria-hidden='true' from the body element.",
3017
3065
  skipAriaHidden: !1
3018
- }, ka = k(xa), Ia = {
3066
+ }, Ta = k(Ea), La = {
3019
3067
  id: "aria-hidden-focus",
3020
3068
  wcag: ["4.1.2"],
3021
3069
  level: "A",
@@ -3026,15 +3074,15 @@ const xa = {
3026
3074
  const a = [];
3027
3075
  for (const e of t.querySelectorAll('[aria-hidden="true"]')) {
3028
3076
  if (e === t.body) continue;
3029
- const i = [...e.querySelectorAll(ae)];
3030
- e.matches(ae) && i.push(e);
3077
+ const i = [...e.querySelectorAll(ne)];
3078
+ e.matches(ne) && i.push(e);
3031
3079
  for (const n of i)
3032
3080
  if (n instanceof HTMLElement) {
3033
- if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Sa(n)) continue;
3081
+ if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Ia(n)) continue;
3034
3082
  a.push({
3035
3083
  ruleId: "aria-hidden-focus",
3036
- selector: d(n),
3037
- html: u(n),
3084
+ selector: u(n),
3085
+ html: c(n),
3038
3086
  impact: "serious",
3039
3087
  message: "Focusable element is inside an aria-hidden region."
3040
3088
  });
@@ -3042,7 +3090,7 @@ const xa = {
3042
3090
  }
3043
3091
  return a;
3044
3092
  }
3045
- }, Ea = {
3093
+ }, Ca = {
3046
3094
  id: "aria-command-name",
3047
3095
  wcag: ["4.1.2"],
3048
3096
  level: "A",
@@ -3059,8 +3107,8 @@ const xa = {
3059
3107
  if ((e = r == null ? void 0 : r.getAttribute("alt")) != null && e.trim()) continue;
3060
3108
  a.push({
3061
3109
  ruleId: "aria-command-name",
3062
- selector: d(i),
3063
- html: u(i),
3110
+ selector: u(i),
3111
+ html: c(i),
3064
3112
  impact: "serious",
3065
3113
  message: "ARIA command has no accessible name."
3066
3114
  });
@@ -3068,7 +3116,7 @@ const xa = {
3068
3116
  }
3069
3117
  return a;
3070
3118
  }
3071
- }, Ta = {
3119
+ }, qa = {
3072
3120
  id: "aria-input-field-name",
3073
3121
  wcag: ["4.1.2"],
3074
3122
  level: "A",
@@ -3081,15 +3129,15 @@ const xa = {
3081
3129
  if (p(i) || i.matches("input, select, textarea")) continue;
3082
3130
  v(i) || a.push({
3083
3131
  ruleId: "aria-input-field-name",
3084
- selector: d(i),
3085
- html: u(i),
3132
+ selector: u(i),
3133
+ html: c(i),
3086
3134
  impact: "serious",
3087
3135
  message: "ARIA input field has no accessible name."
3088
3136
  });
3089
3137
  }
3090
3138
  return a;
3091
3139
  }
3092
- }, La = {
3140
+ }, Ra = {
3093
3141
  id: "aria-toggle-field-name",
3094
3142
  wcag: ["4.1.2"],
3095
3143
  level: "A",
@@ -3102,15 +3150,15 @@ const xa = {
3102
3150
  if (p(i) || i.matches('input[type="checkbox"], input[type="radio"]')) continue;
3103
3151
  v(i) || a.push({
3104
3152
  ruleId: "aria-toggle-field-name",
3105
- selector: d(i),
3106
- html: u(i),
3153
+ selector: u(i),
3154
+ html: c(i),
3107
3155
  impact: "serious",
3108
3156
  message: "ARIA toggle field has no accessible name."
3109
3157
  });
3110
3158
  }
3111
3159
  return a;
3112
3160
  }
3113
- }, Ca = {
3161
+ }, Na = {
3114
3162
  id: "aria-meter-name",
3115
3163
  wcag: ["4.1.2"],
3116
3164
  level: "A",
@@ -3123,15 +3171,15 @@ const xa = {
3123
3171
  if (p(e)) continue;
3124
3172
  v(e) || a.push({
3125
3173
  ruleId: "aria-meter-name",
3126
- selector: d(e),
3127
- html: u(e),
3174
+ selector: u(e),
3175
+ html: c(e),
3128
3176
  impact: "serious",
3129
3177
  message: "Meter has no accessible name."
3130
3178
  });
3131
3179
  }
3132
3180
  return a;
3133
3181
  }
3134
- }, qa = {
3182
+ }, Ma = {
3135
3183
  id: "aria-progressbar-name",
3136
3184
  wcag: ["4.1.2"],
3137
3185
  level: "A",
@@ -3144,15 +3192,15 @@ const xa = {
3144
3192
  if (p(e)) continue;
3145
3193
  v(e) || a.push({
3146
3194
  ruleId: "aria-progressbar-name",
3147
- selector: d(e),
3148
- html: u(e),
3195
+ selector: u(e),
3196
+ html: c(e),
3149
3197
  impact: "serious",
3150
3198
  message: "Progressbar has no accessible name."
3151
3199
  });
3152
3200
  }
3153
3201
  return a;
3154
3202
  }
3155
- }, Ra = {
3203
+ }, $a = {
3156
3204
  id: "aria-dialog-name",
3157
3205
  wcag: ["4.1.2"],
3158
3206
  level: "A",
@@ -3165,15 +3213,15 @@ const xa = {
3165
3213
  if (p(e)) continue;
3166
3214
  v(e) || a.push({
3167
3215
  ruleId: "aria-dialog-name",
3168
- selector: d(e),
3169
- html: u(e),
3216
+ selector: u(e),
3217
+ html: c(e),
3170
3218
  impact: "serious",
3171
3219
  message: "Dialog has no accessible name."
3172
3220
  });
3173
3221
  }
3174
3222
  return a;
3175
3223
  }
3176
- }, Na = {
3224
+ }, Ha = {
3177
3225
  id: "aria-tooltip-name",
3178
3226
  wcag: ["4.1.2"],
3179
3227
  level: "A",
@@ -3186,15 +3234,15 @@ const xa = {
3186
3234
  if (p(e)) continue;
3187
3235
  v(e) || a.push({
3188
3236
  ruleId: "aria-tooltip-name",
3189
- selector: d(e),
3190
- html: u(e),
3237
+ selector: u(e),
3238
+ html: c(e),
3191
3239
  impact: "serious",
3192
3240
  message: "Tooltip has no accessible name."
3193
3241
  });
3194
3242
  }
3195
3243
  return a;
3196
3244
  }
3197
- }, Ma = {
3245
+ }, Da = {
3198
3246
  id: "aria-treeitem-name",
3199
3247
  wcag: ["4.1.2"],
3200
3248
  level: "A",
@@ -3207,15 +3255,15 @@ const xa = {
3207
3255
  if (p(e)) continue;
3208
3256
  v(e) || a.push({
3209
3257
  ruleId: "aria-treeitem-name",
3210
- selector: d(e),
3211
- html: u(e),
3258
+ selector: u(e),
3259
+ html: c(e),
3212
3260
  impact: "serious",
3213
3261
  message: "Treeitem has no accessible name."
3214
3262
  });
3215
3263
  }
3216
3264
  return a;
3217
3265
  }
3218
- }, $a = {
3266
+ }, Oa = {
3219
3267
  id: "aria-prohibited-attr",
3220
3268
  wcag: ["4.1.2"],
3221
3269
  level: "A",
@@ -3223,16 +3271,16 @@ const xa = {
3223
3271
  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
3272
  prompt: "Identify the prohibited attribute and recommend removing it from this element.",
3225
3273
  run(t) {
3226
- return V(t).prohibitedAttr;
3274
+ return z(t).prohibitedAttr;
3227
3275
  }
3228
- }, Ha = [
3276
+ }, Wa = [
3229
3277
  "a[href]",
3230
3278
  "button:not([disabled])",
3231
3279
  'input:not([disabled]):not([type="hidden"])',
3232
3280
  "select:not([disabled])",
3233
3281
  "textarea:not([disabled])",
3234
3282
  '[tabindex]:not([tabindex="-1"])'
3235
- ].join(", "), Da = [
3283
+ ].join(", "), Ba = [
3236
3284
  "aria-atomic",
3237
3285
  "aria-busy",
3238
3286
  "aria-controls",
@@ -3247,17 +3295,17 @@ const xa = {
3247
3295
  "aria-owns",
3248
3296
  "aria-relevant"
3249
3297
  ];
3250
- function ie(t) {
3298
+ function re(t) {
3251
3299
  const a = [];
3252
- t.matches(Ha) && a.push("element is focusable");
3253
- for (const e of Da)
3300
+ t.matches(Wa) && a.push("element is focusable");
3301
+ for (const e of Ba)
3254
3302
  if (t.hasAttribute(e)) {
3255
3303
  a.push(`has ${e}`);
3256
3304
  break;
3257
3305
  }
3258
3306
  return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
3259
3307
  }
3260
- const Oa = {
3308
+ const Fa = {
3261
3309
  id: "presentation-role-conflict",
3262
3310
  wcag: ["4.1.2"],
3263
3311
  level: "A",
@@ -3268,29 +3316,29 @@ const Oa = {
3268
3316
  const a = [];
3269
3317
  for (const e of t.querySelectorAll('[role="presentation"], [role="none"]')) {
3270
3318
  if (p(e)) continue;
3271
- const i = ie(e);
3319
+ const i = re(e);
3272
3320
  i.length > 0 && a.push({
3273
3321
  ruleId: "presentation-role-conflict",
3274
- selector: d(e),
3275
- html: u(e),
3322
+ selector: u(e),
3323
+ html: c(e),
3276
3324
  impact: "serious",
3277
3325
  message: `Presentation role conflicts with: ${i.join(", ")}. The role will be ignored.`
3278
3326
  });
3279
3327
  }
3280
3328
  for (const e of t.querySelectorAll('img[alt=""]')) {
3281
3329
  if (p(e) || e.hasAttribute("role")) continue;
3282
- const i = ie(e);
3330
+ const i = re(e);
3283
3331
  i.length > 0 && a.push({
3284
3332
  ruleId: "presentation-role-conflict",
3285
- selector: d(e),
3286
- html: u(e),
3333
+ selector: u(e),
3334
+ html: c(e),
3287
3335
  impact: "serious",
3288
3336
  message: `Element with implicit presentation role (alt="") conflicts with: ${i.join(", ")}. The decorative role will be ignored.`
3289
3337
  });
3290
3338
  }
3291
3339
  return a;
3292
3340
  }
3293
- }, Ba = {
3341
+ }, _a = {
3294
3342
  id: "summary-name",
3295
3343
  wcag: ["4.1.2"],
3296
3344
  level: "A",
@@ -3303,8 +3351,8 @@ const Oa = {
3303
3351
  if (p(e)) continue;
3304
3352
  v(e) || a.push({
3305
3353
  ruleId: "summary-name",
3306
- selector: d(e),
3307
- html: u(e),
3354
+ selector: u(e),
3355
+ html: c(e),
3308
3356
  impact: "serious",
3309
3357
  message: "<summary> element has no accessible name. Add descriptive text."
3310
3358
  });
@@ -3312,7 +3360,7 @@ const Oa = {
3312
3360
  return a;
3313
3361
  }
3314
3362
  };
3315
- function Wa(t) {
3363
+ function ja(t) {
3316
3364
  var n, r;
3317
3365
  const a = [], e = t.getAttribute("href");
3318
3366
  e && a.push(`href: ${e}`);
@@ -3329,7 +3377,7 @@ function Wa(t) {
3329
3377
  return a.length > 0 ? a.join(`
3330
3378
  `) : void 0;
3331
3379
  }
3332
- const _a = {
3380
+ const Pa = {
3333
3381
  id: "link-name",
3334
3382
  wcag: ["2.4.4", "4.1.2"],
3335
3383
  level: "A",
@@ -3342,16 +3390,16 @@ const _a = {
3342
3390
  if (p(e)) continue;
3343
3391
  v(e) || a.push({
3344
3392
  ruleId: "link-name",
3345
- selector: d(e),
3346
- html: u(e),
3393
+ selector: u(e),
3394
+ html: c(e),
3347
3395
  impact: "serious",
3348
3396
  message: "Link has no discernible text.",
3349
- context: Wa(e)
3397
+ context: ja(e)
3350
3398
  });
3351
3399
  }
3352
3400
  return a;
3353
3401
  }
3354
- }, Fa = {
3402
+ }, Va = {
3355
3403
  id: "skip-link",
3356
3404
  wcag: ["2.4.1"],
3357
3405
  level: "A",
@@ -3369,15 +3417,15 @@ const _a = {
3369
3417
  const s = n.slice(1);
3370
3418
  t.getElementById(s) || a.push({
3371
3419
  ruleId: "skip-link",
3372
- selector: d(i),
3373
- html: u(i),
3420
+ selector: u(i),
3421
+ html: c(i),
3374
3422
  impact: "moderate",
3375
3423
  message: `Skip link points to "#${s}" which does not exist on the page.`
3376
3424
  });
3377
3425
  }
3378
3426
  return a;
3379
3427
  }
3380
- }, ja = /* @__PURE__ */ new Set([
3428
+ }, za = /* @__PURE__ */ new Set([
3381
3429
  "block",
3382
3430
  "flex",
3383
3431
  "grid",
@@ -3385,23 +3433,23 @@ const _a = {
3385
3433
  "table-cell",
3386
3434
  "list-item",
3387
3435
  "flow-root"
3388
- ]), Pa = /* @__PURE__ */ new Set([
3436
+ ]), Ua = /* @__PURE__ */ new Set([
3389
3437
  "inline",
3390
3438
  "inline-block",
3391
3439
  "inline-flex",
3392
3440
  "inline-grid"
3393
3441
  ]);
3394
- function Va(t) {
3442
+ function Ga(t) {
3395
3443
  let a = t.parentElement;
3396
3444
  for (; a; ) {
3397
3445
  const e = A(a).display;
3398
- if (ja.has(e) && za(a))
3399
- return a;
3446
+ if (za.has(e))
3447
+ return Xa(a) ? a : null;
3400
3448
  a = a.parentElement;
3401
3449
  }
3402
3450
  return null;
3403
3451
  }
3404
- function za(t) {
3452
+ function Xa(t) {
3405
3453
  const a = t.ownerDocument.createTreeWalker(
3406
3454
  t,
3407
3455
  NodeFilter.SHOW_TEXT
@@ -3421,7 +3469,7 @@ function za(t) {
3421
3469
  }
3422
3470
  return !1;
3423
3471
  }
3424
- function Ua(t, a) {
3472
+ function Ya(t, a) {
3425
3473
  const e = t.ownerDocument.createTreeWalker(
3426
3474
  t,
3427
3475
  NodeFilter.SHOW_TEXT
@@ -3442,7 +3490,7 @@ function Ua(t, a) {
3442
3490
  }
3443
3491
  return null;
3444
3492
  }
3445
- function Ga(t, a) {
3493
+ function Ka(t, a) {
3446
3494
  const e = t.textDecorationLine || t.textDecoration || "", i = a.textDecorationLine || a.textDecoration || "";
3447
3495
  if ((e.includes("underline") || e.includes("line-through")) && e !== i)
3448
3496
  return !0;
@@ -3452,22 +3500,22 @@ function Ga(t, a) {
3452
3500
  const o = parseFloat(t.outlineWidth) || 0, s = t.outlineStyle || "";
3453
3501
  if (o > 0 && s !== "none")
3454
3502
  return !0;
3455
- const c = t.backgroundImage || "";
3456
- if (c && c !== "none" && c !== "initial")
3503
+ const d = t.backgroundImage || "";
3504
+ if (d && d !== "none" && d !== "initial")
3457
3505
  return !0;
3458
- const h = ne(t.fontWeight), l = ne(a.fontWeight);
3506
+ const h = oe(t.fontWeight), l = oe(a.fontWeight);
3459
3507
  if (Math.abs(h - l) >= 300 || t.fontStyle !== a.fontStyle)
3460
3508
  return !0;
3461
3509
  const m = parseFloat(t.fontSize) || 16, g = parseFloat(a.fontSize) || 16;
3462
3510
  return g > 0 && m / g >= 1.2;
3463
3511
  }
3464
- function ne(t) {
3512
+ function oe(t) {
3465
3513
  return t === "bold" ? 700 : t === "normal" ? 400 : parseInt(t) || 400;
3466
3514
  }
3467
- function re(t, a, e) {
3515
+ function se(t, a, e) {
3468
3516
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3469
3517
  }
3470
- const Xa = {
3518
+ const Qa = {
3471
3519
  id: "link-in-text-block",
3472
3520
  wcag: ["1.4.1"],
3473
3521
  level: "A",
@@ -3477,22 +3525,22 @@ const Xa = {
3477
3525
  run(t) {
3478
3526
  const a = [];
3479
3527
  for (const e of t.querySelectorAll("a[href]")) {
3480
- if (p(e) || !y(e).trim()) continue;
3528
+ if (p(e) || !y(e).trim() || e.closest('nav, [role="navigation"], [role="banner"], [role="contentinfo"]')) continue;
3481
3529
  const i = A(e), n = i.display || "inline";
3482
- if (!Pa.has(n)) continue;
3483
- const r = Va(e);
3530
+ if (!Ua.has(n)) continue;
3531
+ const r = Ga(e);
3484
3532
  if (!r) continue;
3485
3533
  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);
3534
+ if (Ka(i, o)) continue;
3535
+ const s = R(i.color), d = Ya(r);
3536
+ if (!s || !d) continue;
3537
+ const h = q(...s), l = q(...d), m = de(h, l);
3490
3538
  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`;
3539
+ const g = se(...s), b = se(...d), f = `link color: ${g} rgb(${s.join(", ")}), surrounding text: ${b} rgb(${d.join(", ")}), ratio: ${m.toFixed(2)}:1`;
3492
3540
  a.push({
3493
3541
  ruleId: "link-in-text-block",
3494
- selector: d(e),
3495
- html: u(e),
3542
+ selector: u(e),
3543
+ html: c(e),
3496
3544
  impact: "serious",
3497
3545
  message: "Link in text block is not visually distinguishable from surrounding text. Add an underline, border, or ensure 3:1 color contrast with surrounding text.",
3498
3546
  context: f
@@ -3500,7 +3548,7 @@ const Xa = {
3500
3548
  }
3501
3549
  return a;
3502
3550
  }
3503
- }, Ya = {
3551
+ }, Ja = {
3504
3552
  id: "html-has-lang",
3505
3553
  wcag: ["3.1.1"],
3506
3554
  level: "A",
@@ -3519,23 +3567,23 @@ const Xa = {
3519
3567
  }
3520
3568
  return (e = a.getAttribute("lang")) != null && e.trim() ? [] : [{
3521
3569
  ruleId: "html-has-lang",
3522
- selector: d(a),
3523
- html: u(a),
3570
+ selector: u(a),
3571
+ html: c(a),
3524
3572
  impact: "serious",
3525
3573
  message: "<html> element missing lang attribute."
3526
3574
  }];
3527
3575
  }
3528
- }, Ka = new Set(
3576
+ }, Za = new Set(
3529
3577
  "aa ab ae af ak am an ar as av ay az ba be bg bh bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu".split(" ")
3530
- ), Qa = new Set(
3578
+ ), ei = new Set(
3531
3579
  "aar abk afr aka amh ara arg asm ava ave aym aze bak bam bel ben bih bis bod bos bre bul cat ces cha che chu chv cor cos cre cym dan deu div dzo ell eng epo est eus ewe fao fas fij fin fra fry ful gla gle glg glv grn guj hat hau hbs heb her hin hmo hrv hun hye ibo iii iku ile ina ind ipk isl ita jav jpn kal kan kas kat kau kaz khm kik kin kir kom kon kor kua kur lao lat lav lim lin lit ltz lub lug mah mal mar mkd mlg mlt mon mri msa mya nau nav nbl nde ndo nep nld nno nob nor nya oci oji ori orm oss pan pli pol por pus que roh ron run rus sag san sin slk slv sme smo sna snd som sot spa sqi srd srp ssw sun swa swe tah tam tat tel tgk tgl tha tir ton tsn tso tuk tur twi uig ukr urd uzb ven vie vol wln wol xho yid yor zha zho zul".split(" ")
3532
- ), Ja = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
3533
- function ue(t) {
3534
- if (!Ja.test(t)) return !1;
3580
+ ), ti = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
3581
+ function he(t) {
3582
+ if (!ti.test(t)) return !1;
3535
3583
  const a = t.split("-")[0].toLowerCase();
3536
- return a.length === 2 ? Ka.has(a) : a.length === 3 ? !Qa.has(a) : !1;
3584
+ return a.length === 2 ? Za.has(a) : a.length === 3 ? !ei.has(a) : !1;
3537
3585
  }
3538
- const Za = {
3586
+ const ai = {
3539
3587
  id: "html-lang-valid",
3540
3588
  wcag: ["3.1.1"],
3541
3589
  level: "A",
@@ -3545,16 +3593,16 @@ const Za = {
3545
3593
  run(t) {
3546
3594
  var e;
3547
3595
  const a = (e = t.documentElement.getAttribute("lang")) == null ? void 0 : e.trim();
3548
- return a && !ue(a) ? [{
3596
+ return a && !he(a) ? [{
3549
3597
  ruleId: "html-lang-valid",
3550
3598
  selector: "html",
3551
- html: u(t.documentElement),
3599
+ html: c(t.documentElement),
3552
3600
  impact: "serious",
3553
3601
  message: `Invalid lang attribute value "${a}".`
3554
3602
  }] : [];
3555
3603
  }
3556
3604
  };
3557
- function oe(t) {
3605
+ function le(t) {
3558
3606
  var i;
3559
3607
  const a = t.ownerDocument.createTreeWalker(t, NodeFilter.SHOW_TEXT);
3560
3608
  let e;
@@ -3586,7 +3634,7 @@ function oe(t) {
3586
3634
  }
3587
3635
  return !1;
3588
3636
  }
3589
- const ei = {
3637
+ const ii = {
3590
3638
  id: "valid-lang",
3591
3639
  wcag: ["3.1.2"],
3592
3640
  level: "AA",
@@ -3599,26 +3647,26 @@ const ei = {
3599
3647
  if (p(e) || e === t.documentElement) continue;
3600
3648
  const i = e.getAttribute("lang"), n = i == null ? void 0 : i.trim();
3601
3649
  if (i && !n) {
3602
- oe(e) && a.push({
3650
+ le(e) && a.push({
3603
3651
  ruleId: "valid-lang",
3604
- selector: d(e),
3605
- html: u(e),
3652
+ selector: u(e),
3653
+ html: c(e),
3606
3654
  impact: "serious",
3607
3655
  message: "Empty lang attribute value."
3608
3656
  });
3609
3657
  continue;
3610
3658
  }
3611
- n && oe(e) && (ue(n) || a.push({
3659
+ n && le(e) && (he(n) || a.push({
3612
3660
  ruleId: "valid-lang",
3613
- selector: d(e),
3614
- html: u(e),
3661
+ selector: u(e),
3662
+ html: c(e),
3615
3663
  impact: "serious",
3616
3664
  message: `Invalid lang attribute value "${n}".`
3617
3665
  }));
3618
3666
  }
3619
3667
  return a;
3620
3668
  }
3621
- }, ti = {
3669
+ }, ni = {
3622
3670
  id: "html-xml-lang-mismatch",
3623
3671
  wcag: ["3.1.1"],
3624
3672
  level: "A",
@@ -3634,14 +3682,14 @@ const ei = {
3634
3682
  return [{
3635
3683
  ruleId: "html-xml-lang-mismatch",
3636
3684
  selector: "html",
3637
- html: u(a),
3685
+ html: c(a),
3638
3686
  impact: "moderate",
3639
3687
  message: `lang="${e}" and xml:lang="${i}" do not match.`
3640
3688
  }];
3641
3689
  }
3642
3690
  return [];
3643
3691
  }
3644
- }, ai = {
3692
+ }, ri = {
3645
3693
  id: "td-headers-attr",
3646
3694
  wcag: ["1.3.1"],
3647
3695
  level: "A",
@@ -3659,8 +3707,8 @@ const ei = {
3659
3707
  if (o === n) {
3660
3708
  a.push({
3661
3709
  ruleId: "td-headers-attr",
3662
- selector: d(e),
3663
- html: u(e),
3710
+ selector: u(e),
3711
+ html: c(e),
3664
3712
  impact: "serious",
3665
3713
  message: `Headers attribute references the cell itself ("${o}").`
3666
3714
  });
@@ -3669,8 +3717,8 @@ const ei = {
3669
3717
  if (!i.querySelector(`th#${CSS.escape(o)}, td#${CSS.escape(o)}`)) {
3670
3718
  a.push({
3671
3719
  ruleId: "td-headers-attr",
3672
- selector: d(e),
3673
- html: u(e),
3720
+ selector: u(e),
3721
+ html: c(e),
3674
3722
  impact: "serious",
3675
3723
  message: `Headers attribute references non-existent ID "${o}".`
3676
3724
  });
@@ -3680,7 +3728,7 @@ const ei = {
3680
3728
  }
3681
3729
  return a;
3682
3730
  }
3683
- }, ii = {
3731
+ }, oi = {
3684
3732
  id: "th-has-data-cells",
3685
3733
  wcag: ["1.3.1"],
3686
3734
  level: "A",
@@ -3694,15 +3742,15 @@ const ei = {
3694
3742
  const i = e.querySelectorAll("th"), n = e.querySelectorAll("td");
3695
3743
  i.length > 0 && n.length === 0 && a.push({
3696
3744
  ruleId: "th-has-data-cells",
3697
- selector: d(e),
3698
- html: u(e),
3745
+ selector: u(e),
3746
+ html: c(e),
3699
3747
  impact: "serious",
3700
3748
  message: "Table has header cells but no data cells."
3701
3749
  });
3702
3750
  }
3703
3751
  return a;
3704
3752
  }
3705
- }, ni = {
3753
+ }, si = {
3706
3754
  id: "td-has-header",
3707
3755
  wcag: ["1.3.1"],
3708
3756
  level: "A",
@@ -3724,17 +3772,17 @@ const ei = {
3724
3772
  s = Math.max(s, b);
3725
3773
  }
3726
3774
  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)
3775
+ const d = n.querySelector("th") !== null, h = n.querySelector("th[scope]") !== null, l = n.querySelector("td[headers]") !== null;
3776
+ if (d)
3729
3777
  for (const m of n.querySelectorAll("td")) {
3730
3778
  if (p(m) || m.hasAttribute("headers")) continue;
3731
3779
  const g = m.closest("tr");
3732
3780
  if (!g) continue;
3733
3781
  const b = g.querySelector("th") !== null, f = Array.from(g.children).indexOf(m);
3734
3782
  let w = !1;
3735
- const L = n.querySelector("thead");
3736
- if (L) {
3737
- const S = L.querySelector("tr");
3783
+ const I = n.querySelector("thead");
3784
+ if (I) {
3785
+ const S = I.querySelector("tr");
3738
3786
  S && ((e = S.querySelectorAll("th, td")[f]) == null ? void 0 : e.tagName.toLowerCase()) === "th" && (w = !0);
3739
3787
  }
3740
3788
  if (!w) {
@@ -3744,8 +3792,8 @@ const ei = {
3744
3792
  if (!b && !w && !h && !l) {
3745
3793
  a.push({
3746
3794
  ruleId: "td-has-header",
3747
- selector: d(m),
3748
- html: u(m),
3795
+ selector: u(m),
3796
+ html: c(m),
3749
3797
  impact: "serious",
3750
3798
  message: "Data cell has no associated header. Add th elements with scope, or headers attribute."
3751
3799
  });
@@ -3755,7 +3803,7 @@ const ei = {
3755
3803
  }
3756
3804
  return a;
3757
3805
  }
3758
- }, ri = {
3806
+ }, li = {
3759
3807
  id: "scope-attr-valid",
3760
3808
  wcag: ["1.3.1"],
3761
3809
  level: "A",
@@ -3770,15 +3818,15 @@ const ei = {
3770
3818
  const r = (i = n.getAttribute("scope")) == null ? void 0 : i.toLowerCase();
3771
3819
  r && !e.has(r) && a.push({
3772
3820
  ruleId: "scope-attr-valid",
3773
- selector: d(n),
3774
- html: u(n),
3821
+ selector: u(n),
3822
+ html: c(n),
3775
3823
  impact: "moderate",
3776
3824
  message: `Invalid scope value "${r}". Use row, col, rowgroup, or colgroup.`
3777
3825
  });
3778
3826
  }
3779
3827
  return a;
3780
3828
  }
3781
- }, oi = {
3829
+ }, ci = {
3782
3830
  id: "empty-table-header",
3783
3831
  wcag: [],
3784
3832
  level: "A",
@@ -3793,15 +3841,15 @@ const ei = {
3793
3841
  const i = e.closest("table");
3794
3842
  (i == null ? void 0 : i.getAttribute("role")) === "presentation" || (i == null ? void 0 : i.getAttribute("role")) === "none" || v(e) || a.push({
3795
3843
  ruleId: "empty-table-header",
3796
- selector: d(e),
3797
- html: u(e),
3844
+ selector: u(e),
3845
+ html: c(e),
3798
3846
  impact: "minor",
3799
3847
  message: "Table header cell is empty. Add text or use aria-label."
3800
3848
  });
3801
3849
  }
3802
3850
  return a;
3803
3851
  }
3804
- }, H = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], si = {
3852
+ }, D = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], ui = {
3805
3853
  id: "duplicate-id-aria",
3806
3854
  wcag: ["4.1.2"],
3807
3855
  level: "A",
@@ -3811,7 +3859,7 @@ const ei = {
3811
3859
  run(t) {
3812
3860
  const a = [], e = /* @__PURE__ */ new Set();
3813
3861
  for (const n of t.querySelectorAll("[aria-labelledby], [aria-describedby], [aria-controls], [aria-owns], [aria-flowto]"))
3814
- for (const r of H) {
3862
+ for (const r of D) {
3815
3863
  const o = n.getAttribute(r);
3816
3864
  o && o.split(/\s+/).forEach((s) => e.add(s));
3817
3865
  }
@@ -3825,31 +3873,31 @@ const ei = {
3825
3873
  for (const [n, r] of i) {
3826
3874
  if (r <= 1) continue;
3827
3875
  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)}"]`);
3876
+ D.map((l) => `[${l}~="${CSS.escape(n)}"]`).join(", ")
3877
+ ), d = t.querySelector(`label[for="${CSS.escape(n)}"]`);
3830
3878
  let h;
3831
3879
  if (s) {
3832
- const l = H.find(
3880
+ const l = D.find(
3833
3881
  (m) => {
3834
3882
  var g;
3835
3883
  return (g = s.getAttribute(m)) == null ? void 0 : g.split(/\s+/).includes(n);
3836
3884
  }
3837
3885
  );
3838
3886
  l && (h = l);
3839
- } else c && (h = "label[for]");
3887
+ } else d && (h = "label[for]");
3840
3888
  a.push({
3841
3889
  ruleId: "duplicate-id-aria",
3842
- selector: d(o[1]),
3843
- html: u(o[1]),
3890
+ selector: u(o[1]),
3891
+ html: c(o[1]),
3844
3892
  impact: "critical",
3845
3893
  message: `Duplicate ID "${n}" referenced by ${h ?? "an accessibility attribute"}.`,
3846
- context: `First element: ${u(o[0])}${h ? `
3894
+ context: `First element: ${c(o[0])}${h ? `
3847
3895
  Referenced by: ${h}` : ""}`
3848
3896
  });
3849
3897
  }
3850
3898
  return a;
3851
3899
  }
3852
- }, li = {
3900
+ }, di = {
3853
3901
  id: "video-caption",
3854
3902
  wcag: ["1.2.2"],
3855
3903
  level: "A",
@@ -3862,15 +3910,15 @@ Referenced by: ${h}` : ""}`
3862
3910
  if (p(e) || e.hasAttribute("muted") || e.hasAttribute("autoplay")) continue;
3863
3911
  e.querySelector('track[kind="captions"], track[kind="subtitles"]') || a.push({
3864
3912
  ruleId: "video-caption",
3865
- selector: d(e),
3866
- html: u(e),
3913
+ selector: u(e),
3914
+ html: c(e),
3867
3915
  impact: "critical",
3868
3916
  message: "Video element has no captions track."
3869
3917
  });
3870
3918
  }
3871
3919
  return a;
3872
3920
  }
3873
- }, ci = {
3921
+ }, mi = {
3874
3922
  id: "audio-caption",
3875
3923
  wcag: ["1.2.1"],
3876
3924
  level: "A",
@@ -3884,15 +3932,15 @@ Referenced by: ${h}` : ""}`
3884
3932
  const n = e.parentElement;
3885
3933
  n && n.querySelector('a[href*="transcript"], a[href*="text"]') || a.push({
3886
3934
  ruleId: "audio-caption",
3887
- selector: d(e),
3888
- html: u(e),
3935
+ selector: u(e),
3936
+ html: c(e),
3889
3937
  impact: "critical",
3890
3938
  message: "Audio element has no transcript or text alternative. Add a transcript or track element."
3891
3939
  });
3892
3940
  }
3893
3941
  return a;
3894
3942
  }
3895
- }, ui = /* @__PURE__ */ new Set([
3943
+ }, hi = /* @__PURE__ */ new Set([
3896
3944
  "SCRIPT",
3897
3945
  "STYLE",
3898
3946
  "NOSCRIPT",
@@ -3908,13 +3956,25 @@ Referenced by: ${h}` : ""}`
3908
3956
  "BR",
3909
3957
  "HR"
3910
3958
  ]);
3911
- function se([t, a, e]) {
3959
+ function ce([t, a, e]) {
3912
3960
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3913
3961
  }
3914
- function di(t) {
3915
- return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!t.closest("fieldset[disabled]");
3962
+ function pi(t) {
3963
+ return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!(t.closest("fieldset[disabled]") || t.getAttribute("aria-disabled") === "true");
3964
+ }
3965
+ function gi(t, a) {
3966
+ if (t.tagName !== "LABEL") return !1;
3967
+ const e = t, i = e.htmlFor;
3968
+ if (i) {
3969
+ const o = a.getElementById(i);
3970
+ if (o && (o.disabled || o.getAttribute("aria-disabled") === "true")) return !0;
3971
+ }
3972
+ const n = e.querySelector("input, select, textarea, button");
3973
+ if (n && (n.disabled || n.getAttribute("aria-disabled") === "true")) return !0;
3974
+ const r = e.id;
3975
+ return !!(r && a.querySelector(`[aria-labelledby~="${r}"][aria-disabled="true"]`));
3916
3976
  }
3917
- function mi(t) {
3977
+ function bi(t) {
3918
3978
  const a = t.clip;
3919
3979
  if (a && a.startsWith("rect(")) {
3920
3980
  const i = a.match(/[\d.]+/g);
@@ -3928,17 +3988,17 @@ function mi(t) {
3928
3988
  }
3929
3989
  return !1;
3930
3990
  }
3931
- function hi(t) {
3991
+ function fi(t) {
3932
3992
  if (p(t)) return !0;
3933
3993
  let a = t;
3934
3994
  for (; a; ) {
3935
3995
  const e = A(a);
3936
- if (e.display === "none" || e.visibility === "hidden" || mi(e)) return !0;
3996
+ if (e.display === "none" || e.visibility === "hidden" || bi(e)) return !0;
3937
3997
  a = a.parentElement;
3938
3998
  }
3939
3999
  return !1;
3940
4000
  }
3941
- const pi = {
4001
+ const vi = {
3942
4002
  id: "color-contrast",
3943
4003
  wcag: ["1.4.3"],
3944
4004
  level: "AA",
@@ -3953,94 +4013,93 @@ const pi = {
3953
4013
  for (; r = i.nextNode(); ) {
3954
4014
  if (!r.textContent || !r.textContent.trim()) continue;
3955
4015
  const o = r.parentElement;
3956
- if (!o || n.has(o) || (n.add(o), ui.has(o.tagName)) || di(o) || hi(o)) continue;
4016
+ if (!o || n.has(o) || (n.add(o), hi.has(o.tagName)) || pi(o) || gi(o, t) || fi(o)) continue;
3957
4017
  const s = A(o);
3958
4018
  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);
4019
+ const d = s.textShadow;
4020
+ if (d && d !== "none" && d !== "initial") continue;
4021
+ const h = R(s.color);
4022
+ if (!h) continue;
4023
+ const l = s.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/) || s.color.match(/rgba?\(.+?\/\s*([\d.]+%?)\s*\)/);
4024
+ if (l && (l[1].endsWith("%") ? parseFloat(l[1]) / 100 : parseFloat(l[1])) === 0 || Be(o)) continue;
4025
+ const m = De(o);
4026
+ if (!m) continue;
4027
+ const g = q(h[0], h[1], h[2]), b = q(m[0], m[1], m[2]), f = de(g, b), w = je(o) ? 3 : 4.5;
4028
+ if (f < w) {
4029
+ const I = Math.round(f * 100) / 100, S = ce(h), M = ce(m);
3968
4030
  a.push({
3969
4031
  ruleId: "color-contrast",
3970
- selector: d(o),
3971
- html: u(o),
4032
+ selector: u(o),
4033
+ html: c(o),
3972
4034
  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`
4035
+ message: `Insufficient color contrast ratio of ${I}:1 (required ${w}:1).`,
4036
+ context: `foreground: ${S} rgb(${h.join(", ")}), background: ${M} rgb(${m.join(", ")}), ratio: ${I}:1, required: ${w}:1`
3975
4037
  });
3976
4038
  }
3977
4039
  }
3978
4040
  return a;
3979
4041
  }
3980
- }, de = [
4042
+ }, pe = [
3981
4043
  // Document Structure
3982
- Gt,
3983
- Xt,
3984
- Yt,
3985
4044
  Kt,
3986
4045
  Qt,
4046
+ Jt,
3987
4047
  Zt,
3988
4048
  ea,
3989
4049
  aa,
3990
- na,
4050
+ ia,
4051
+ ra,
4052
+ sa,
3991
4053
  // Images
3992
- _e,
3993
- je,
3994
4054
  Pe,
3995
- Ve,
4055
+ ze,
3996
4056
  Ue,
3997
4057
  Ge,
3998
4058
  Ye,
3999
4059
  Ke,
4000
- et,
4060
+ Je,
4061
+ Ze,
4062
+ it,
4001
4063
  // Forms
4002
- rt,
4003
- ot,
4004
- st,
4005
4064
  lt,
4006
- gt,
4007
- bt,
4008
- ft,
4009
- // Keyboard
4065
+ ct,
4066
+ ut,
4067
+ dt,
4068
+ vt,
4010
4069
  wt,
4011
- At,
4012
- Lt,
4013
- Ct,
4014
- qt,
4015
- // Structure
4070
+ yt,
4071
+ // Keyboard
4072
+ St,
4073
+ kt,
4016
4074
  Rt,
4017
- Jt,
4018
- ra,
4019
4075
  Nt,
4020
4076
  Mt,
4077
+ // Structure
4021
4078
  $t,
4079
+ ta,
4080
+ la,
4022
4081
  Ht,
4023
4082
  Dt,
4024
4083
  Ot,
4025
- Bt,
4026
4084
  Wt,
4027
- _t,
4085
+ Bt,
4028
4086
  Ft,
4087
+ _t,
4088
+ jt,
4029
4089
  Pt,
4030
4090
  Vt,
4031
4091
  Ut,
4092
+ Gt,
4093
+ Yt,
4032
4094
  // ARIA
4033
- oa,
4034
- sa,
4035
- la,
4095
+ ca,
4036
4096
  ua,
4037
- ga,
4097
+ da,
4098
+ ha,
4038
4099
  va,
4039
- ya,
4040
4100
  Aa,
4101
+ xa,
4041
4102
  ka,
4042
- Ia,
4043
- Ea,
4044
4103
  Ta,
4045
4104
  La,
4046
4105
  Ca,
@@ -4049,42 +4108,45 @@ const pi = {
4049
4108
  Na,
4050
4109
  Ma,
4051
4110
  $a,
4111
+ Ha,
4112
+ Da,
4052
4113
  Oa,
4053
- ma,
4054
- Ba,
4055
- // Links
4056
- _a,
4057
4114
  Fa,
4058
- Xa,
4115
+ ga,
4116
+ _a,
4117
+ // Links
4118
+ Pa,
4119
+ Va,
4120
+ Qa,
4059
4121
  // Language
4060
- Ya,
4061
- Za,
4062
- ei,
4063
- ti,
4064
- // Tables
4122
+ Ja,
4065
4123
  ai,
4066
4124
  ii,
4067
4125
  ni,
4126
+ // Tables
4068
4127
  ri,
4069
4128
  oi,
4070
- // Parsing
4071
4129
  si,
4072
- // Media
4073
4130
  li,
4074
4131
  ci,
4132
+ // Parsing
4133
+ ui,
4134
+ // Media
4135
+ di,
4136
+ mi,
4075
4137
  // Color
4076
- pi
4138
+ vi
4077
4139
  ];
4078
- let z = [], me = /* @__PURE__ */ new Set();
4079
- function vi(t) {
4080
- t.additionalRules && (z = t.additionalRules), t.disabledRules && (me = new Set(t.disabledRules));
4140
+ let U = [], ge = /* @__PURE__ */ new Set();
4141
+ function Si(t) {
4142
+ t.additionalRules && (U = t.additionalRules), t.disabledRules && (ge = new Set(t.disabledRules));
4081
4143
  }
4082
- function he() {
4083
- return de.filter((a) => !me.has(a.id)).concat(z);
4144
+ function be() {
4145
+ return pe.filter((a) => !ge.has(a.id)).concat(U);
4084
4146
  }
4085
- function wi(t) {
4086
- pe();
4087
- const a = he(), e = [];
4147
+ function xi(t) {
4148
+ fe();
4149
+ const a = be(), e = [];
4088
4150
  let i = 0;
4089
4151
  return {
4090
4152
  processChunk(n) {
@@ -4103,13 +4165,13 @@ function wi(t) {
4103
4165
  }
4104
4166
  };
4105
4167
  }
4106
- function pe() {
4107
- Ae(), be(), fe(), Me(), Ne(), xe();
4168
+ function fe() {
4169
+ xe(), ve(), we(), He(), $e(), Ie();
4108
4170
  }
4109
- function yi(t) {
4171
+ function ki(t) {
4110
4172
  var i;
4111
- pe();
4112
- const a = he(), e = [];
4173
+ fe();
4174
+ const a = be(), e = [];
4113
4175
  for (const n of a)
4114
4176
  try {
4115
4177
  e.push(...n.run(t));
@@ -4122,32 +4184,32 @@ function yi(t) {
4122
4184
  ruleCount: a.length
4123
4185
  };
4124
4186
  }
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);
4187
+ const wi = new Map(pe.map((t) => [t.id, t]));
4188
+ function Ii(t) {
4189
+ const a = wi.get(t);
4190
+ return a || U.find((e) => e.id === t);
4129
4191
  }
4130
4192
  export {
4131
- pe as clearAllCaches,
4132
- Ne as clearAriaAttrAuditCache,
4133
- Ae as clearAriaHiddenCache,
4134
- Me as clearColorCaches,
4135
- be as clearComputedRoleCache,
4193
+ fe as clearAllCaches,
4194
+ $e as clearAriaAttrAuditCache,
4195
+ xe as clearAriaHiddenCache,
4196
+ He as clearColorCaches,
4197
+ ve as clearComputedRoleCache,
4136
4198
  k as compileDeclarativeRule,
4137
- vi as configureRules,
4138
- wi as createChunkedAudit,
4199
+ Si as configureRules,
4200
+ xi as createChunkedAudit,
4139
4201
  v as getAccessibleName,
4140
4202
  y as getAccessibleTextContent,
4141
- he as getActiveRules,
4203
+ be as getActiveRules,
4142
4204
  C as getComputedRole,
4143
- u as getHtmlSnippet,
4144
- le as getImplicitRole,
4145
- Ai as getRuleById,
4146
- d as getSelector,
4205
+ c as getHtmlSnippet,
4206
+ ue as getImplicitRole,
4207
+ Ii as getRuleById,
4208
+ u as getSelector,
4147
4209
  p as isAriaHidden,
4148
- ye as isValidRole,
4149
- bi as querySelectorShadowAware,
4150
- de as rules,
4151
- yi as runAudit,
4152
- fi as validateDeclarativeRule
4210
+ Se as isValidRole,
4211
+ yi as querySelectorShadowAware,
4212
+ pe as rules,
4213
+ ki as runAudit,
4214
+ Ai as validateDeclarativeRule
4153
4215
  };