@accesslint/core 0.2.0 → 0.2.2

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 $ = /* @__PURE__ */ new WeakMap();
2
- function K() {
3
- $ = /* @__PURE__ */ new WeakMap();
1
+ let M = /* @__PURE__ */ new WeakMap();
2
+ function Q() {
3
+ M = /* @__PURE__ */ new WeakMap();
4
4
  }
5
- function Y(t) {
5
+ function J(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) {
@@ -117,14 +117,24 @@ function Y(t) {
117
117
  return null;
118
118
  }
119
119
  }
120
- function T(t) {
120
+ function E(t) {
121
121
  var n;
122
- const a = $.get(t);
122
+ const a = M.get(t);
123
123
  if (a !== void 0) return a;
124
- const i = ((n = t.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase()) || null || Y(t);
125
- return $.set(t, i), i;
124
+ const i = ((n = t.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase()) || null || J(t);
125
+ return M.set(t, i), i;
126
+ }
127
+ let $ = /* @__PURE__ */ new WeakMap();
128
+ function Z() {
129
+ $ = /* @__PURE__ */ new WeakMap();
126
130
  }
127
131
  function b(t) {
132
+ const a = $.get(t);
133
+ if (a !== void 0) return a;
134
+ const e = de(t);
135
+ return $.set(t, e), e;
136
+ }
137
+ function de(t) {
128
138
  var r, o, s, u, h;
129
139
  const a = t.getAttribute("aria-labelledby");
130
140
  if (a) {
@@ -171,7 +181,7 @@ function b(t) {
171
181
  }
172
182
  return t instanceof HTMLImageElement || t instanceof HTMLAreaElement ? ((u = t.alt) == null ? void 0 : u.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((h = t.alt) == null ? void 0 : h.trim()) ?? "" : "";
173
183
  }
174
- const oe = /* @__PURE__ */ new Set([
184
+ const ue = /* @__PURE__ */ new Set([
175
185
  "alert",
176
186
  "alertdialog",
177
187
  "application",
@@ -255,21 +265,21 @@ const oe = /* @__PURE__ */ new Set([
255
265
  "treegrid",
256
266
  "treeitem"
257
267
  ]);
258
- function se(t) {
268
+ function me(t) {
259
269
  const a = t.trim().toLowerCase().replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "");
260
- return oe.has(a);
270
+ return ue.has(a);
261
271
  }
262
- let M = /* @__PURE__ */ new WeakMap();
263
- function Q() {
264
- M = /* @__PURE__ */ new WeakMap();
272
+ let H = /* @__PURE__ */ new WeakMap();
273
+ function ee() {
274
+ H = /* @__PURE__ */ new WeakMap();
265
275
  }
266
276
  function m(t) {
267
- const a = M.get(t);
277
+ const a = H.get(t);
268
278
  if (a !== void 0) return a;
269
279
  let e;
270
- return t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none") ? e = !0 : t.parentElement ? e = m(t.parentElement) : e = !1, M.set(t, e), e;
280
+ return t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none") ? e = !0 : t.parentElement ? e = m(t.parentElement) : e = !1, H.set(t, e), e;
271
281
  }
272
- function le(t) {
282
+ function pe(t) {
273
283
  return !!(t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none"));
274
284
  }
275
285
  function w(t) {
@@ -280,7 +290,7 @@ function w(t) {
280
290
  a += o.textContent ?? "";
281
291
  else if (o.nodeType === 1) {
282
292
  const s = o;
283
- if (!le(s)) {
293
+ if (!pe(s)) {
284
294
  const u = (e = s.tagName) == null ? void 0 : e.toLowerCase();
285
295
  if (u === "img" || u === "area")
286
296
  a += ((i = s.getAttribute("aria-label")) == null ? void 0 : i.trim()) ?? s.getAttribute("alt") ?? "";
@@ -297,10 +307,14 @@ function w(t) {
297
307
  }
298
308
  return a;
299
309
  }
300
- function ce(t) {
310
+ let D = /* @__PURE__ */ new WeakMap();
311
+ function te() {
312
+ D = /* @__PURE__ */ new WeakMap();
313
+ }
314
+ function he(t) {
301
315
  return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
302
316
  }
303
- const de = [
317
+ const ge = [
304
318
  "data-testid",
305
319
  "data-test-id",
306
320
  "data-cy",
@@ -310,20 +324,20 @@ const de = [
310
324
  "for",
311
325
  "aria-label"
312
326
  ];
313
- function ue(t) {
327
+ function be(t) {
314
328
  const a = t.tagName.toLowerCase();
315
- for (const i of de) {
329
+ for (const i of ge) {
316
330
  const n = t.getAttribute(i);
317
331
  if (n != null && n.length > 0 && n.length < 100)
318
- return `${a}[${i}="${ce(n)}"]`;
332
+ return `${a}[${i}="${he(n)}"]`;
319
333
  }
320
334
  const e = t.parentElement;
321
335
  if (e) {
322
- const i = Array.from(e.children).filter(
323
- (n) => n.tagName === t.tagName
324
- );
325
- if (i.length > 1)
326
- return `${a}:nth-of-type(${i.indexOf(t) + 1})`;
336
+ let i = 0, n = 0;
337
+ for (let r = 0; r < e.children.length; r++)
338
+ e.children[r].tagName === t.tagName && (i++, e.children[r] === t && (n = i));
339
+ if (i > 1)
340
+ return `${a}:nth-of-type(${n})`;
327
341
  }
328
342
  return a;
329
343
  }
@@ -336,7 +350,7 @@ function R(t) {
336
350
  i.unshift(`#${CSS.escape(n.id)}`);
337
351
  break;
338
352
  }
339
- if (i.unshift(ue(n)), i.length >= 2) {
353
+ if (i.unshift(be(n)), i.length >= 2) {
340
354
  const r = i.join(" > ");
341
355
  try {
342
356
  const o = a.querySelectorAll(r);
@@ -349,26 +363,29 @@ function R(t) {
349
363
  return i.join(" > ");
350
364
  }
351
365
  function c(t) {
352
- var i;
353
- const a = [];
354
- let e = t;
355
- for (; e; ) {
356
- const n = e.getRootNode();
357
- if (n instanceof ShadowRoot)
358
- a.unshift({ selector: R(e), delimiter: " >>> " }), e = n.host;
366
+ var r;
367
+ const a = D.get(t);
368
+ if (a !== void 0) return a;
369
+ const e = [];
370
+ let i = t;
371
+ for (; i; ) {
372
+ const o = i.getRootNode();
373
+ if (o instanceof ShadowRoot)
374
+ e.unshift({ selector: R(i), delimiter: " >>> " }), i = o.host;
359
375
  else {
360
- const r = (i = n.defaultView) == null ? void 0 : i.frameElement;
361
- if (r)
362
- a.unshift({ selector: R(e), delimiter: " >>>iframe> " }), e = r;
376
+ const s = (r = o.defaultView) == null ? void 0 : r.frameElement;
377
+ if (s)
378
+ e.unshift({ selector: R(i), delimiter: " >>>iframe> " }), i = s;
363
379
  else {
364
- a.unshift({ selector: R(e), delimiter: "" });
380
+ e.unshift({ selector: R(i), delimiter: "" });
365
381
  break;
366
382
  }
367
383
  }
368
384
  }
369
- return a.map((n, r) => (r === 0 ? "" : n.delimiter) + n.selector).join("");
385
+ const n = e.map((o, s) => (s === 0 ? "" : o.delimiter) + o.selector).join("");
386
+ return D.set(t, n), n;
370
387
  }
371
- function Ma(t) {
388
+ function Wa(t) {
372
389
  const a = [], e = [];
373
390
  let i = t;
374
391
  for (; i; ) {
@@ -405,7 +422,7 @@ function l(t) {
405
422
  const a = t.outerHTML;
406
423
  return a.length > 200 ? a.slice(0, 200) + "..." : a;
407
424
  }
408
- const me = /* @__PURE__ */ new Set([
425
+ const fe = /* @__PURE__ */ new Set([
409
426
  "aria-activedescendant",
410
427
  "aria-atomic",
411
428
  "aria-autocomplete",
@@ -459,7 +476,7 @@ const me = /* @__PURE__ */ new Set([
459
476
  "aria-valuemin",
460
477
  "aria-valuenow",
461
478
  "aria-valuetext"
462
- ]), pe = /* @__PURE__ */ new Set([
479
+ ]), ve = /* @__PURE__ */ new Set([
463
480
  "aria-atomic",
464
481
  "aria-busy",
465
482
  "aria-disabled",
@@ -470,7 +487,7 @@ const me = /* @__PURE__ */ new Set([
470
487
  "aria-multiselectable",
471
488
  "aria-readonly",
472
489
  "aria-required"
473
- ]), he = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), ge = /* @__PURE__ */ new Set([
490
+ ]), ye = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), we = /* @__PURE__ */ new Set([
474
491
  "aria-colcount",
475
492
  "aria-colindex",
476
493
  "aria-colspan",
@@ -480,11 +497,11 @@ const me = /* @__PURE__ */ new Set([
480
497
  "aria-rowindex",
481
498
  "aria-rowspan",
482
499
  "aria-setsize"
483
- ]), be = /* @__PURE__ */ new Set([
500
+ ]), Ae = /* @__PURE__ */ new Set([
484
501
  "aria-valuemax",
485
502
  "aria-valuemin",
486
503
  "aria-valuenow"
487
- ]), F = {
504
+ ]), P = {
488
505
  "aria-autocomplete": /* @__PURE__ */ new Set(["inline", "list", "both", "none"]),
489
506
  "aria-current": /* @__PURE__ */ new Set(["page", "step", "location", "date", "time", "true", "false"]),
490
507
  "aria-dropeffect": /* @__PURE__ */ new Set(["copy", "execute", "link", "move", "none", "popup"]),
@@ -494,7 +511,7 @@ const me = /* @__PURE__ */ new Set([
494
511
  "aria-orientation": /* @__PURE__ */ new Set(["horizontal", "vertical", "undefined"]),
495
512
  "aria-relevant": /* @__PURE__ */ new Set(["additions", "all", "removals", "text"]),
496
513
  "aria-sort": /* @__PURE__ */ new Set(["ascending", "descending", "none", "other"])
497
- }, _ = /* @__PURE__ */ new Set([
514
+ }, V = /* @__PURE__ */ new Set([
498
515
  "caption",
499
516
  "code",
500
517
  "deletion",
@@ -511,7 +528,7 @@ const me = /* @__PURE__ */ new Set([
511
528
  "suggestion",
512
529
  "term",
513
530
  "time"
514
- ]), fe = {
531
+ ]), Se = {
515
532
  abbr: !0,
516
533
  bdi: !0,
517
534
  bdo: !0,
@@ -539,7 +556,7 @@ const me = /* @__PURE__ */ new Set([
539
556
  u: !0,
540
557
  var: !0,
541
558
  wbr: !0
542
- }, ve = {
559
+ }, xe = {
543
560
  alert: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
544
561
  article: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
545
562
  banner: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
@@ -573,10 +590,10 @@ const me = /* @__PURE__ */ new Set([
573
590
  tooltip: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"])
574
591
  };
575
592
  let I = null, q = null;
576
- function J() {
593
+ function ae() {
577
594
  I = null, q = null;
578
595
  }
579
- function O(t) {
596
+ function _(t) {
580
597
  var n;
581
598
  if (q && (I == null ? void 0 : I.deref()) === t) return q;
582
599
  const a = [], e = [], i = [];
@@ -588,13 +605,15 @@ function O(t) {
588
605
  break;
589
606
  }
590
607
  if (!o) continue;
591
- const s = c(r), u = l(r), h = m(r);
608
+ let s, u;
609
+ const h = () => (s === void 0 && (s = c(r), u = l(r)), { selector: s, html: u });
592
610
  for (const d of r.attributes)
593
- if (d.name.startsWith("aria-") && !me.has(d.name)) {
611
+ if (d.name.startsWith("aria-") && !fe.has(d.name)) {
612
+ const p = h();
594
613
  a.push({
595
614
  ruleId: "aria-valid-attr",
596
- selector: s,
597
- html: u,
615
+ selector: p.selector,
616
+ html: p.html,
598
617
  impact: "critical",
599
618
  message: `Invalid ARIA attribute "${d.name}".`
600
619
  });
@@ -603,46 +622,59 @@ function O(t) {
603
622
  for (const d of r.attributes) {
604
623
  if (!d.name.startsWith("aria-")) continue;
605
624
  const p = d.value.trim();
606
- if (pe.has(d.name))
607
- p !== "true" && p !== "false" && e.push({
608
- ruleId: "aria-valid-attr-value",
609
- selector: s,
610
- html: u,
611
- impact: "critical",
612
- message: `${d.name} must be "true" or "false", got "${p}".`
613
- });
614
- else if (he.has(d.name))
615
- p !== "true" && p !== "false" && p !== "mixed" && e.push({
616
- ruleId: "aria-valid-attr-value",
617
- selector: s,
618
- html: u,
619
- impact: "critical",
620
- message: `${d.name} must be "true", "false", or "mixed", got "${p}".`
621
- });
622
- else if (ge.has(d.name))
623
- (p === "" || !/^-?\d+$/.test(p)) && e.push({
624
- ruleId: "aria-valid-attr-value",
625
- selector: s,
626
- html: u,
627
- impact: "critical",
628
- message: `${d.name} must be an integer, got "${p}".`
629
- });
630
- else if (be.has(d.name))
631
- (p === "" || isNaN(Number(p))) && e.push({
632
- ruleId: "aria-valid-attr-value",
633
- selector: s,
634
- html: u,
635
- impact: "critical",
636
- message: `${d.name} must be a number, got "${p}".`
637
- });
638
- else if (F[d.name]) {
625
+ if (ve.has(d.name)) {
626
+ if (p !== "true" && p !== "false") {
627
+ const g = h();
628
+ e.push({
629
+ ruleId: "aria-valid-attr-value",
630
+ selector: g.selector,
631
+ html: g.html,
632
+ impact: "critical",
633
+ message: `${d.name} must be "true" or "false", got "${p}".`
634
+ });
635
+ }
636
+ } else if (ye.has(d.name)) {
637
+ if (p !== "true" && p !== "false" && p !== "mixed") {
638
+ const g = h();
639
+ e.push({
640
+ ruleId: "aria-valid-attr-value",
641
+ selector: g.selector,
642
+ html: g.html,
643
+ impact: "critical",
644
+ message: `${d.name} must be "true", "false", or "mixed", got "${p}".`
645
+ });
646
+ }
647
+ } else if (we.has(d.name)) {
648
+ if (p === "" || !/^-?\d+$/.test(p)) {
649
+ const g = h();
650
+ e.push({
651
+ ruleId: "aria-valid-attr-value",
652
+ selector: g.selector,
653
+ html: g.html,
654
+ impact: "critical",
655
+ message: `${d.name} must be an integer, got "${p}".`
656
+ });
657
+ }
658
+ } else if (Ae.has(d.name)) {
659
+ if (p === "" || isNaN(Number(p))) {
660
+ const g = h();
661
+ e.push({
662
+ ruleId: "aria-valid-attr-value",
663
+ selector: g.selector,
664
+ html: g.html,
665
+ impact: "critical",
666
+ message: `${d.name} must be a number, got "${p}".`
667
+ });
668
+ }
669
+ } else if (P[d.name]) {
639
670
  const g = p.split(/\s+/);
640
671
  for (const f of g)
641
- if (!F[d.name].has(f)) {
672
+ if (!P[d.name].has(f)) {
673
+ const v = h();
642
674
  e.push({
643
675
  ruleId: "aria-valid-attr-value",
644
- selector: s,
645
- html: u,
676
+ selector: v.selector,
677
+ html: v.html,
646
678
  impact: "critical",
647
679
  message: `Invalid value "${p}" for ${d.name}.`
648
680
  });
@@ -650,38 +682,45 @@ function O(t) {
650
682
  }
651
683
  }
652
684
  }
653
- if (!h) {
685
+ if (!m(r)) {
654
686
  const d = (n = r.getAttribute("role")) == null ? void 0 : n.trim().toLowerCase(), p = r.tagName.toLowerCase();
655
- if (!d && fe[p]) {
687
+ if (!d && Se[p]) {
656
688
  const g = r.hasAttribute("aria-label"), f = r.hasAttribute("aria-labelledby");
657
- (g || f) && i.push({
658
- ruleId: "aria-prohibited-attr",
659
- selector: s,
660
- html: u,
661
- impact: "serious",
662
- message: `aria-label and aria-labelledby are prohibited on <${p}> elements.`
663
- });
664
- } else if (d) {
665
- if (_.has(d)) {
666
- const f = r.hasAttribute("aria-label"), v = r.hasAttribute("aria-labelledby");
667
- (f || v) && i.push({
689
+ if (g || f) {
690
+ const v = h();
691
+ i.push({
668
692
  ruleId: "aria-prohibited-attr",
669
- selector: s,
670
- html: u,
693
+ selector: v.selector,
694
+ html: v.html,
671
695
  impact: "serious",
672
- message: `aria-label and aria-labelledby are prohibited on role "${d}".`
696
+ message: `aria-label and aria-labelledby are prohibited on <${p}> elements.`
673
697
  });
674
698
  }
675
- const g = ve[d];
699
+ } else if (d) {
700
+ if (V.has(d)) {
701
+ const f = r.hasAttribute("aria-label"), v = r.hasAttribute("aria-labelledby");
702
+ if (f || v) {
703
+ const y = h();
704
+ i.push({
705
+ ruleId: "aria-prohibited-attr",
706
+ selector: y.selector,
707
+ html: y.html,
708
+ impact: "serious",
709
+ message: `aria-label and aria-labelledby are prohibited on role "${d}".`
710
+ });
711
+ }
712
+ }
713
+ const g = xe[d];
676
714
  if (g) {
677
715
  for (const f of r.attributes)
678
716
  if (f.name.startsWith("aria-") && g.has(f.name)) {
679
- if ((f.name === "aria-label" || f.name === "aria-labelledby") && _.has(d))
717
+ if ((f.name === "aria-label" || f.name === "aria-labelledby") && V.has(d))
680
718
  continue;
719
+ const v = h();
681
720
  i.push({
682
721
  ruleId: "aria-prohibited-attr",
683
- selector: s,
684
- html: u,
722
+ selector: v.selector,
723
+ html: v.html,
685
724
  impact: "serious",
686
725
  message: `Attribute "${f.name}" is prohibited on role "${d}".`
687
726
  });
@@ -692,41 +731,41 @@ function O(t) {
692
731
  }
693
732
  return I = new WeakRef(t), q = { validAttr: a, validAttrValue: e, prohibitedAttr: i }, q;
694
733
  }
695
- let H = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap();
696
- function Z() {
697
- H = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap();
734
+ let B = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap();
735
+ function ie() {
736
+ B = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap();
698
737
  }
699
- function E(t) {
700
- let a = H.get(t);
701
- return a || (a = getComputedStyle(t), H.set(t, a), a);
738
+ function C(t) {
739
+ let a = B.get(t);
740
+ return a || (a = getComputedStyle(t), B.set(t, a), a);
702
741
  }
703
- function P(t, a, e) {
742
+ function U(t, a, e) {
704
743
  const [i, n, r] = [t, a, e].map((o) => {
705
744
  const s = o / 255;
706
745
  return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
707
746
  });
708
747
  return 0.2126 * i + 0.7152 * n + 0.0722 * r;
709
748
  }
710
- function ye(t, a) {
749
+ function ke(t, a) {
711
750
  const e = Math.max(t, a), i = Math.min(t, a);
712
751
  return (e + 0.05) / (i + 0.05);
713
752
  }
714
- function ee(t) {
753
+ function ne(t) {
715
754
  const a = t.match(
716
755
  /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*[\d.]+)?\s*\)/
717
756
  );
718
757
  return a ? [parseInt(a[1]), parseInt(a[2]), parseInt(a[3])] : null;
719
758
  }
720
- function we(t) {
721
- const a = D.get(t);
759
+ function Ie(t) {
760
+ const a = O.get(t);
722
761
  if (a !== void 0) return a;
723
- const e = Ae(t);
724
- return D.set(t, e), e;
762
+ const e = qe(t);
763
+ return O.set(t, e), e;
725
764
  }
726
- function Ae(t) {
765
+ function qe(t) {
727
766
  let a = t;
728
767
  for (; a; ) {
729
- const e = E(a), i = e.backgroundColor;
768
+ const e = C(a), i = e.backgroundColor;
730
769
  if (i === "transparent" || i === "rgba(0, 0, 0, 0)") {
731
770
  a = a.parentElement;
732
771
  continue;
@@ -736,15 +775,15 @@ function Ae(t) {
736
775
  a = a.parentElement;
737
776
  continue;
738
777
  }
739
- return e.backgroundImage && e.backgroundImage !== "none" ? null : ee(i);
778
+ return e.backgroundImage && e.backgroundImage !== "none" ? null : ne(i);
740
779
  }
741
780
  return [255, 255, 255];
742
781
  }
743
- function Se(t) {
744
- const a = E(t), e = parseFloat(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
782
+ function Ce(t) {
783
+ const a = C(t), e = parseFloat(a.fontSize), i = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
745
784
  return e >= 24 || e >= 18.66 && i >= 700;
746
785
  }
747
- function xe(t) {
786
+ function Te(t) {
748
787
  var r, o;
749
788
  const a = [], e = t.closest("a");
750
789
  if (e) {
@@ -764,7 +803,7 @@ function xe(t) {
764
803
  return a.length > 0 ? a.join(`
765
804
  `) : void 0;
766
805
  }
767
- const ke = {
806
+ const Ee = {
768
807
  id: "img-alt",
769
808
  wcag: ["1.1.1"],
770
809
  level: "A",
@@ -780,11 +819,11 @@ const ke = {
780
819
  html: l(e),
781
820
  impact: "critical",
782
821
  message: "Image element missing alt attribute.",
783
- context: xe(e)
822
+ context: Te(e)
784
823
  });
785
824
  return a;
786
825
  }
787
- }, Ie = {
826
+ }, Le = {
788
827
  id: "svg-img-alt",
789
828
  wcag: ["1.1.1"],
790
829
  level: "A",
@@ -805,7 +844,7 @@ const ke = {
805
844
  }
806
845
  return a;
807
846
  }
808
- }, qe = {
847
+ }, Re = {
809
848
  id: "input-image-alt",
810
849
  wcag: ["1.1.1", "4.1.2"],
811
850
  level: "A",
@@ -824,7 +863,7 @@ const ke = {
824
863
  });
825
864
  return a;
826
865
  }
827
- }, Ce = {
866
+ }, Ne = {
828
867
  id: "image-redundant-alt",
829
868
  wcag: [],
830
869
  level: "A",
@@ -852,7 +891,7 @@ const ke = {
852
891
  }
853
892
  return a;
854
893
  }
855
- }, Te = ["image", "picture", "photo", "graphic", "icon", "img"], Ee = {
894
+ }, Me = ["image", "picture", "photo", "graphic", "icon", "img"], $e = {
856
895
  id: "image-alt-redundant-words",
857
896
  wcag: [],
858
897
  level: "A",
@@ -864,7 +903,7 @@ const ke = {
864
903
  const a = [];
865
904
  for (const e of t.querySelectorAll("img[alt]")) {
866
905
  const i = e.getAttribute("alt").toLowerCase();
867
- i && Te.some((n) => i.split(/\s+/).includes(n)) && a.push({
906
+ i && Me.some((n) => i.split(/\s+/).includes(n)) && a.push({
868
907
  ruleId: "image-alt-redundant-words",
869
908
  selector: c(e),
870
909
  html: l(e),
@@ -874,7 +913,7 @@ const ke = {
874
913
  }
875
914
  return a;
876
915
  }
877
- }, Le = {
916
+ }, He = {
878
917
  id: "area-alt",
879
918
  wcag: ["1.1.1", "4.1.2"],
880
919
  level: "A",
@@ -895,7 +934,7 @@ const ke = {
895
934
  }
896
935
  return a;
897
936
  }
898
- }, Re = {
937
+ }, De = {
899
938
  id: "object-alt",
900
939
  wcag: ["1.1.1"],
901
940
  level: "A",
@@ -914,7 +953,7 @@ const ke = {
914
953
  });
915
954
  return a;
916
955
  }
917
- }, Ne = {
956
+ }, Be = {
918
957
  id: "role-img-alt",
919
958
  wcag: ["1.1.1"],
920
959
  level: "A",
@@ -936,7 +975,7 @@ const ke = {
936
975
  return a;
937
976
  }
938
977
  };
939
- function Ha(t) {
978
+ function _a(t) {
940
979
  if (typeof t != "object" || t === null)
941
980
  return "Rule spec must be an object";
942
981
  const a = t;
@@ -966,10 +1005,10 @@ function Ha(t) {
966
1005
  return "Rule must have a wcag array";
967
1006
  if (typeof a.level != "string" || !["A", "AA"].includes(a.level))
968
1007
  return "Rule must have level A or AA";
969
- const n = $e(e);
1008
+ const n = Oe(e);
970
1009
  return n || null;
971
1010
  }
972
- function $e(t) {
1011
+ function Oe(t) {
973
1012
  switch (t.type) {
974
1013
  case "selector-exists":
975
1014
  return null;
@@ -1025,7 +1064,7 @@ function x(t) {
1025
1064
  for (const s of e.querySelectorAll(t.selector)) {
1026
1065
  if (a && m(s)) continue;
1027
1066
  const u = s.getAttribute(n);
1028
- u !== null && Me(u, r, o) && i.push({
1067
+ u !== null && We(u, r, o) && i.push({
1029
1068
  ruleId: t.id,
1030
1069
  selector: c(s),
1031
1070
  html: l(s),
@@ -1119,7 +1158,7 @@ function x(t) {
1119
1158
  }
1120
1159
  };
1121
1160
  }
1122
- function Me(t, a, e) {
1161
+ function We(t, a, e) {
1123
1162
  switch (a) {
1124
1163
  case ">":
1125
1164
  return parseFloat(t) > e;
@@ -1137,7 +1176,7 @@ function Me(t, a, e) {
1137
1176
  return !1;
1138
1177
  }
1139
1178
  }
1140
- const He = {
1179
+ const _e = {
1141
1180
  id: "server-side-image-map",
1142
1181
  selector: "img[ismap], input[type='image'][ismap]",
1143
1182
  check: { type: "selector-exists" },
@@ -1148,7 +1187,7 @@ const He = {
1148
1187
  level: "A",
1149
1188
  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.",
1150
1189
  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."
1151
- }, De = x(He), Be = {
1190
+ }, Fe = x(_e), Pe = {
1152
1191
  id: "label",
1153
1192
  wcag: ["4.1.2"],
1154
1193
  level: "A",
@@ -1171,7 +1210,7 @@ const He = {
1171
1210
  }
1172
1211
  return a;
1173
1212
  }
1174
- }, Oe = {
1213
+ }, Ve = {
1175
1214
  id: "form-field-multiple-labels",
1176
1215
  wcag: [],
1177
1216
  level: "A",
@@ -1203,7 +1242,7 @@ const He = {
1203
1242
  }
1204
1243
  return a;
1205
1244
  }
1206
- }, We = {
1245
+ }, Ue = {
1207
1246
  id: "select-name",
1208
1247
  wcag: ["4.1.2"],
1209
1248
  level: "A",
@@ -1222,7 +1261,7 @@ const He = {
1222
1261
  });
1223
1262
  return a;
1224
1263
  }
1225
- }, Fe = {
1264
+ }, je = {
1226
1265
  id: "input-button-name",
1227
1266
  wcag: ["4.1.2"],
1228
1267
  level: "A",
@@ -1247,7 +1286,7 @@ const He = {
1247
1286
  }
1248
1287
  return a;
1249
1288
  }
1250
- }, _e = /* @__PURE__ */ new Set([
1289
+ }, ze = /* @__PURE__ */ new Set([
1251
1290
  "off",
1252
1291
  "on",
1253
1292
  "name",
@@ -1302,7 +1341,7 @@ const He = {
1302
1341
  "impp",
1303
1342
  "url",
1304
1343
  "photo"
1305
- ]), Pe = {
1344
+ ]), Ge = {
1306
1345
  id: "autocomplete-valid",
1307
1346
  wcag: ["1.3.5"],
1308
1347
  level: "AA",
@@ -1315,7 +1354,7 @@ const He = {
1315
1354
  const i = e.getAttribute("autocomplete").trim();
1316
1355
  if (!i) continue;
1317
1356
  const n = i.split(/\s+/), r = n[n.length - 1];
1318
- _e.has(r) || a.push({
1357
+ ze.has(r) || a.push({
1319
1358
  ruleId: "autocomplete-valid",
1320
1359
  selector: c(e),
1321
1360
  html: l(e),
@@ -1326,16 +1365,16 @@ const He = {
1326
1365
  return a;
1327
1366
  }
1328
1367
  };
1329
- function V(t) {
1368
+ function j(t) {
1330
1369
  return t.toLowerCase().replace(/\s+/g, " ").trim();
1331
1370
  }
1332
- function U(t, a) {
1333
- const e = V(t), i = V(a);
1371
+ function z(t, a) {
1372
+ const e = j(t), i = j(a);
1334
1373
  if (!e || !i || e.includes(i) || i.includes(e)) return !0;
1335
1374
  const n = i.split(/\s+/).map((r) => r.replace(/[.,;:!?\u2026]+$/g, "")).filter((r) => r.length > 2);
1336
1375
  return n.length >= 2 && n.filter((o) => e.includes(o)).length / n.length > 0.5;
1337
1376
  }
1338
- function B(t) {
1377
+ function W(t) {
1339
1378
  let a = "";
1340
1379
  for (const e of t.childNodes)
1341
1380
  if (e.nodeType === 3)
@@ -1345,11 +1384,11 @@ function B(t) {
1345
1384
  if (n === "style" || n === "script" || n === "svg" || i.getAttribute("aria-hidden") === "true" || i instanceof HTMLElement && i.style.display === "none") continue;
1346
1385
  const r = i.getAttribute("role");
1347
1386
  if (r === "img" || r === "presentation" || r === "none") continue;
1348
- a += B(i);
1387
+ a += W(i);
1349
1388
  }
1350
1389
  return a;
1351
1390
  }
1352
- const Ve = {
1391
+ const Xe = {
1353
1392
  id: "label-content-name-mismatch",
1354
1393
  wcag: ["2.5.3"],
1355
1394
  level: "A",
@@ -1363,11 +1402,11 @@ const Ve = {
1363
1402
  const i = b(e);
1364
1403
  if (!i) continue;
1365
1404
  let n = "";
1366
- e instanceof HTMLInputElement ? n = e.value || "" : n = B(e);
1405
+ e instanceof HTMLInputElement ? n = e.value || "" : n = W(e);
1367
1406
  const r = n.trim();
1368
1407
  if (!r || r.length <= 2) continue;
1369
1408
  const o = e.hasAttribute("aria-label"), s = e.hasAttribute("aria-labelledby");
1370
- !o && !s || U(i, n) || a.push({
1409
+ !o && !s || z(i, n) || a.push({
1371
1410
  ruleId: "label-content-name-mismatch",
1372
1411
  selector: c(e),
1373
1412
  html: l(e),
@@ -1383,9 +1422,9 @@ const Ve = {
1383
1422
  let o = "";
1384
1423
  if (r) {
1385
1424
  const s = t.querySelector(`label[for="${CSS.escape(r)}"]`);
1386
- s && (o = B(s));
1425
+ s && (o = W(s));
1387
1426
  }
1388
- o.trim() && (U(i, o) || a.push({
1427
+ o.trim() && (z(i, o) || a.push({
1389
1428
  ruleId: "label-content-name-mismatch",
1390
1429
  selector: c(e),
1391
1430
  html: l(e),
@@ -1395,7 +1434,7 @@ const Ve = {
1395
1434
  }
1396
1435
  return a;
1397
1436
  }
1398
- }, Ue = {
1437
+ }, Ke = {
1399
1438
  id: "label-title-only",
1400
1439
  wcag: [],
1401
1440
  level: "A",
@@ -1428,7 +1467,7 @@ const Ve = {
1428
1467
  }
1429
1468
  return a;
1430
1469
  }
1431
- }, je = {
1470
+ }, Ye = {
1432
1471
  id: "tabindex",
1433
1472
  selector: "[tabindex]",
1434
1473
  check: { type: "attribute-value", attribute: "tabindex", operator: ">", value: 0 },
@@ -1440,7 +1479,7 @@ const Ve = {
1440
1479
  tags: ["best-practice"],
1441
1480
  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.",
1442
1481
  prompt: "Change the positive tabindex value to tabindex='0' and rely on DOM order for tab sequence instead."
1443
- }, ze = x(je), Ge = /* @__PURE__ */ new Set([
1482
+ }, Qe = x(Ye), Je = /* @__PURE__ */ new Set([
1444
1483
  "div",
1445
1484
  "span",
1446
1485
  "p",
@@ -1467,7 +1506,7 @@ const Ve = {
1467
1506
  "tr",
1468
1507
  "td",
1469
1508
  "th"
1470
- ]), Xe = {
1509
+ ]), Ze = {
1471
1510
  id: "focus-order-semantics",
1472
1511
  wcag: [],
1473
1512
  tags: ["best-practice"],
@@ -1479,7 +1518,7 @@ const Ve = {
1479
1518
  const a = [];
1480
1519
  for (const e of t.querySelectorAll('[tabindex="0"]')) {
1481
1520
  const i = e.tagName.toLowerCase();
1482
- if (!Ge.has(i)) continue;
1521
+ if (!Je.has(i)) continue;
1483
1522
  e.getAttribute("role") || a.push({
1484
1523
  ruleId: "focus-order-semantics",
1485
1524
  selector: c(e),
@@ -1490,7 +1529,7 @@ const Ve = {
1490
1529
  }
1491
1530
  return a;
1492
1531
  }
1493
- }, Ke = /* @__PURE__ */ new Set([
1532
+ }, et = /* @__PURE__ */ new Set([
1494
1533
  "a",
1495
1534
  "audio",
1496
1535
  "button",
@@ -1499,7 +1538,7 @@ const Ve = {
1499
1538
  "select",
1500
1539
  "textarea",
1501
1540
  "video"
1502
- ]), Ye = /* @__PURE__ */ new Set([
1541
+ ]), tt = /* @__PURE__ */ new Set([
1503
1542
  "button",
1504
1543
  "checkbox",
1505
1544
  "combobox",
@@ -1523,7 +1562,7 @@ const Ve = {
1523
1562
  "tabpanel",
1524
1563
  "textbox",
1525
1564
  "treeitem"
1526
- ]), Qe = {
1565
+ ]), at = {
1527
1566
  grid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader"]),
1528
1567
  listbox: /* @__PURE__ */ new Set(["option"]),
1529
1568
  menu: /* @__PURE__ */ new Set(["menuitem", "menuitemcheckbox", "menuitemradio"]),
@@ -1533,26 +1572,26 @@ const Ve = {
1533
1572
  tree: /* @__PURE__ */ new Set(["treeitem"]),
1534
1573
  treegrid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader", "treeitem"])
1535
1574
  };
1536
- function Je(t, a) {
1575
+ function it(t, a) {
1537
1576
  var n, r, o;
1538
1577
  const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase(), i = (r = a.getAttribute("role")) == null ? void 0 : r.toLowerCase();
1539
- return !e || !i ? !1 : ((o = Qe[e]) == null ? void 0 : o.has(i)) ?? !1;
1578
+ return !e || !i ? !1 : ((o = at[e]) == null ? void 0 : o.has(i)) ?? !1;
1540
1579
  }
1541
- function Ze(t) {
1580
+ function nt(t) {
1542
1581
  var n;
1543
1582
  const a = t.tagName.toLowerCase();
1544
- if (Ke.has(a))
1583
+ if (et.has(a))
1545
1584
  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);
1546
1585
  const e = (n = t.getAttribute("role")) == null ? void 0 : n.toLowerCase();
1547
- if (e && Ye.has(e)) return !0;
1586
+ if (e && tt.has(e)) return !0;
1548
1587
  const i = t.getAttribute("tabindex");
1549
1588
  return i !== null && i !== "-1" || t.getAttribute("contenteditable") === "true";
1550
1589
  }
1551
- function et(t) {
1590
+ function rt(t) {
1552
1591
  const a = t.tagName.toLowerCase();
1553
1592
  return !!(a === "a" && t.hasAttribute("href") || a === "button" && !t.disabled);
1554
1593
  }
1555
- const tt = {
1594
+ const ot = {
1556
1595
  id: "nested-interactive",
1557
1596
  wcag: ["4.1.2"],
1558
1597
  level: "A",
@@ -1567,10 +1606,10 @@ const tt = {
1567
1606
  for (; o; ) {
1568
1607
  for (; r.length > 0 && !r[r.length - 1].contains(o); )
1569
1608
  r.pop();
1570
- if (!m(o) && Ze(o)) {
1609
+ if (!m(o) && nt(o)) {
1571
1610
  if (r.length > 0) {
1572
1611
  const s = r[r.length - 1];
1573
- Je(s, o) || a.push({
1612
+ it(s, o) || a.push({
1574
1613
  ruleId: "nested-interactive",
1575
1614
  selector: c(o),
1576
1615
  html: l(o),
@@ -1578,13 +1617,13 @@ const tt = {
1578
1617
  message: `Interactive element <${o.tagName.toLowerCase()}> is nested inside <${s.tagName.toLowerCase()}>.`
1579
1618
  });
1580
1619
  }
1581
- et(o) && r.push(o);
1620
+ rt(o) && r.push(o);
1582
1621
  }
1583
1622
  o = n.nextNode();
1584
1623
  }
1585
1624
  return a;
1586
1625
  }
1587
- }, at = {
1626
+ }, st = {
1588
1627
  id: "scrollable-region-focusable",
1589
1628
  wcag: ["2.1.1"],
1590
1629
  level: "A",
@@ -1595,12 +1634,10 @@ const tt = {
1595
1634
  const a = [];
1596
1635
  for (const e of t.querySelectorAll("*")) {
1597
1636
  if (m(e) || !(e instanceof HTMLElement)) continue;
1598
- const i = t.defaultView ?? t.ownerDocument.defaultView, n = i == null ? void 0 : i.getComputedStyle(e);
1599
- if (!n) continue;
1600
- const r = n.overflowX, o = n.overflowY;
1601
- if (!(r === "scroll" || r === "auto" || o === "scroll" || o === "auto") || !(e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth)) continue;
1602
- const h = e.getAttribute("tabindex");
1603
- h !== null && h !== "-1" || e.querySelector(
1637
+ const i = C(e), n = i.overflowX, r = i.overflowY;
1638
+ if (!(n === "scroll" || n === "auto" || r === "scroll" || r === "auto") || !(e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth)) continue;
1639
+ const u = e.getAttribute("tabindex");
1640
+ u !== null && u !== "-1" || e.querySelector(
1604
1641
  'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
1605
1642
  ) || a.push({
1606
1643
  ruleId: "scrollable-region-focusable",
@@ -1612,7 +1649,7 @@ const tt = {
1612
1649
  }
1613
1650
  return a;
1614
1651
  }
1615
- }, it = {
1652
+ }, lt = {
1616
1653
  id: "accesskeys",
1617
1654
  wcag: [],
1618
1655
  level: "A",
@@ -1642,7 +1679,7 @@ const tt = {
1642
1679
  });
1643
1680
  return a;
1644
1681
  }
1645
- }, nt = {
1682
+ }, ct = {
1646
1683
  id: "heading-order",
1647
1684
  wcag: [],
1648
1685
  level: "A",
@@ -1667,7 +1704,7 @@ const tt = {
1667
1704
  }
1668
1705
  return a;
1669
1706
  }
1670
- }, L = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', j = '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"]', rt = {
1707
+ }, L = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', G = 'main, [role="main"], header, [role="banner"], footer, [role="contentinfo"], nav, [role="navigation"], aside, [role="complementary"], section[aria-label], section[aria-labelledby], [role="region"][aria-label], [role="region"][aria-labelledby], form[aria-label], form[aria-labelledby], [role="form"][aria-label], [role="form"][aria-labelledby], [role="search"]', dt = {
1671
1708
  id: "landmark-one-main",
1672
1709
  wcag: [],
1673
1710
  level: "A",
@@ -1691,7 +1728,7 @@ const tt = {
1691
1728
  message: "Page has multiple main landmarks."
1692
1729
  })) : [];
1693
1730
  }
1694
- }, ot = {
1731
+ }, ut = {
1695
1732
  id: "landmark-no-duplicate-banner",
1696
1733
  wcag: [],
1697
1734
  level: "A",
@@ -1711,7 +1748,7 @@ const tt = {
1711
1748
  })
1712
1749
  ), a;
1713
1750
  }
1714
- }, st = {
1751
+ }, mt = {
1715
1752
  id: "landmark-no-duplicate-contentinfo",
1716
1753
  wcag: [],
1717
1754
  level: "A",
@@ -1731,7 +1768,7 @@ const tt = {
1731
1768
  })
1732
1769
  ), a;
1733
1770
  }
1734
- }, lt = {
1771
+ }, pt = {
1735
1772
  id: "landmark-no-duplicate-main",
1736
1773
  wcag: [],
1737
1774
  level: "A",
@@ -1751,7 +1788,7 @@ const tt = {
1751
1788
  })
1752
1789
  ), a;
1753
1790
  }
1754
- }, ct = {
1791
+ }, ht = {
1755
1792
  id: "landmark-banner-is-top-level",
1756
1793
  wcag: [],
1757
1794
  level: "A",
@@ -1771,7 +1808,7 @@ const tt = {
1771
1808
  });
1772
1809
  return a;
1773
1810
  }
1774
- }, dt = {
1811
+ }, gt = {
1775
1812
  id: "landmark-contentinfo-is-top-level",
1776
1813
  wcag: [],
1777
1814
  level: "A",
@@ -1791,7 +1828,7 @@ const tt = {
1791
1828
  });
1792
1829
  return a;
1793
1830
  }
1794
- }, ut = {
1831
+ }, bt = {
1795
1832
  id: "landmark-main-is-top-level",
1796
1833
  wcag: [],
1797
1834
  level: "A",
@@ -1813,7 +1850,7 @@ const tt = {
1813
1850
  }
1814
1851
  return a;
1815
1852
  }
1816
- }, mt = {
1853
+ }, ft = {
1817
1854
  id: "landmark-complementary-is-top-level",
1818
1855
  wcag: [],
1819
1856
  level: "A",
@@ -1835,7 +1872,7 @@ const tt = {
1835
1872
  }
1836
1873
  return a;
1837
1874
  }
1838
- }, pt = {
1875
+ }, vt = {
1839
1876
  id: "landmark-unique",
1840
1877
  wcag: [],
1841
1878
  level: "A",
@@ -1871,7 +1908,7 @@ const tt = {
1871
1908
  }
1872
1909
  return a;
1873
1910
  }
1874
- }, ht = {
1911
+ }, yt = {
1875
1912
  id: "region",
1876
1913
  wcag: [],
1877
1914
  level: "A",
@@ -1885,8 +1922,8 @@ const tt = {
1885
1922
  if (!e) return [];
1886
1923
  for (const n of e.children) {
1887
1924
  if (m(n) || n instanceof HTMLScriptElement || n instanceof HTMLStyleElement || n.tagName === "NOSCRIPT" || n instanceof HTMLElement && n.hidden || n.matches('a[href^="#"]')) continue;
1888
- const r = n.matches(j), o = (i = n.textContent) == null ? void 0 : i.trim();
1889
- !r && o && (n.querySelector(j) || a.push({
1925
+ const r = n.matches(G), o = (i = n.textContent) == null ? void 0 : i.trim();
1926
+ !r && o && (n.querySelector(G) || a.push({
1890
1927
  ruleId: "region",
1891
1928
  selector: c(n),
1892
1929
  html: l(n),
@@ -1896,7 +1933,7 @@ const tt = {
1896
1933
  }
1897
1934
  return a;
1898
1935
  }
1899
- }, gt = {
1936
+ }, wt = {
1900
1937
  id: "list",
1901
1938
  selector: "ul, ol",
1902
1939
  check: { type: "child-invalid", allowedChildren: ["li", "script", "template"] },
@@ -1907,7 +1944,7 @@ const tt = {
1907
1944
  level: "A",
1908
1945
  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.",
1909
1946
  prompt: "Explain how to restructure this element within the list properly."
1910
- }, bt = x(gt), ft = {
1947
+ }, At = x(wt), St = {
1911
1948
  id: "dlitem",
1912
1949
  wcag: ["1.3.1"],
1913
1950
  level: "A",
@@ -1926,7 +1963,7 @@ const tt = {
1926
1963
  });
1927
1964
  return a;
1928
1965
  }
1929
- }, vt = {
1966
+ }, xt = {
1930
1967
  id: "definition-list",
1931
1968
  selector: "dl",
1932
1969
  check: { type: "child-invalid", allowedChildren: ["dt", "dd", "div", "script", "template"] },
@@ -1937,7 +1974,7 @@ const tt = {
1937
1974
  level: "A",
1938
1975
  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.",
1939
1976
  prompt: "Explain whether to move this element outside the <dl> or convert it to dt/dd."
1940
- }, yt = x(vt), wt = {
1977
+ }, kt = x(xt), It = {
1941
1978
  id: "document-title",
1942
1979
  wcag: ["2.4.2"],
1943
1980
  level: "A",
@@ -1955,7 +1992,7 @@ const tt = {
1955
1992
  message: a ? "Document <title> element is empty." : "Document is missing a <title> element."
1956
1993
  }] : [];
1957
1994
  }
1958
- }, At = {
1995
+ }, qt = {
1959
1996
  id: "bypass",
1960
1997
  wcag: ["2.4.1"],
1961
1998
  level: "A",
@@ -1982,7 +2019,7 @@ const tt = {
1982
2019
  message: "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link."
1983
2020
  }];
1984
2021
  }
1985
- }, St = {
2022
+ }, Ct = {
1986
2023
  id: "page-has-heading-one",
1987
2024
  wcag: [],
1988
2025
  level: "A",
@@ -2004,7 +2041,7 @@ const tt = {
2004
2041
  message: "Page does not contain a level-one heading."
2005
2042
  }];
2006
2043
  }
2007
- }, xt = {
2044
+ }, Tt = {
2008
2045
  id: "frame-title",
2009
2046
  wcag: ["4.1.2"],
2010
2047
  level: "A",
@@ -2025,7 +2062,7 @@ const tt = {
2025
2062
  }
2026
2063
  return a;
2027
2064
  }
2028
- }, kt = {
2065
+ }, Et = {
2029
2066
  id: "frame-title-unique",
2030
2067
  wcag: ["4.1.2"],
2031
2068
  level: "A",
@@ -2058,7 +2095,7 @@ const tt = {
2058
2095
  });
2059
2096
  return a;
2060
2097
  }
2061
- }, It = {
2098
+ }, Lt = {
2062
2099
  id: "empty-heading",
2063
2100
  wcag: [],
2064
2101
  level: "A",
@@ -2078,7 +2115,7 @@ const tt = {
2078
2115
  });
2079
2116
  return a;
2080
2117
  }
2081
- }, qt = {
2118
+ }, Rt = {
2082
2119
  id: "meta-viewport",
2083
2120
  wcag: ["1.4.4"],
2084
2121
  level: "AA",
@@ -2110,7 +2147,7 @@ const tt = {
2110
2147
  }
2111
2148
  return a;
2112
2149
  }
2113
- }, Ct = {
2150
+ }, Nt = {
2114
2151
  id: "meta-refresh",
2115
2152
  wcag: ["2.2.1", "2.2.4", "3.2.5"],
2116
2153
  level: "A",
@@ -2145,7 +2182,7 @@ const tt = {
2145
2182
  }
2146
2183
  return a;
2147
2184
  }
2148
- }, Tt = {
2185
+ }, Mt = {
2149
2186
  id: "blink",
2150
2187
  selector: "blink",
2151
2188
  check: { type: "selector-exists" },
@@ -2156,7 +2193,7 @@ const tt = {
2156
2193
  level: "A",
2157
2194
  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.",
2158
2195
  prompt: "Suggest static alternatives to the blinking effect."
2159
- }, Et = x(Tt), Lt = {
2196
+ }, $t = x(Mt), Ht = {
2160
2197
  id: "marquee",
2161
2198
  selector: "marquee",
2162
2199
  check: { type: "selector-exists" },
@@ -2167,7 +2204,7 @@ const tt = {
2167
2204
  level: "A",
2168
2205
  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.",
2169
2206
  prompt: "Suggest static alternatives or accessible carousel patterns."
2170
- }, Rt = x(Lt), Nt = {
2207
+ }, Dt = x(Ht), Bt = {
2171
2208
  id: "p-as-heading",
2172
2209
  wcag: [],
2173
2210
  level: "A",
@@ -2194,7 +2231,7 @@ const tt = {
2194
2231
  }
2195
2232
  return a;
2196
2233
  }
2197
- }, $t = {
2234
+ }, Ot = {
2198
2235
  id: "aria-roles",
2199
2236
  wcag: ["4.1.2"],
2200
2237
  level: "A",
@@ -2206,7 +2243,7 @@ const tt = {
2206
2243
  for (const e of t.querySelectorAll("[role]")) {
2207
2244
  const r = e.getAttribute("role").replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "").split(/\s+/);
2208
2245
  for (const o of r)
2209
- if (o && !se(o)) {
2246
+ if (o && !me(o)) {
2210
2247
  a.push({
2211
2248
  ruleId: "aria-roles",
2212
2249
  selector: c(e),
@@ -2219,7 +2256,7 @@ const tt = {
2219
2256
  }
2220
2257
  return a;
2221
2258
  }
2222
- }, Mt = {
2259
+ }, Wt = {
2223
2260
  id: "aria-valid-attr",
2224
2261
  wcag: ["4.1.2"],
2225
2262
  level: "A",
@@ -2227,9 +2264,9 @@ const tt = {
2227
2264
  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+).",
2228
2265
  prompt: "Identify the misspelled attribute and provide the correct spelling.",
2229
2266
  run(t) {
2230
- return O(t).validAttr;
2267
+ return _(t).validAttr;
2231
2268
  }
2232
- }, Ht = {
2269
+ }, _t = {
2233
2270
  id: "aria-valid-attr-value",
2234
2271
  wcag: ["4.1.2"],
2235
2272
  level: "A",
@@ -2237,9 +2274,9 @@ const tt = {
2237
2274
  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.",
2238
2275
  prompt: "Show the invalid value and list the valid values for this specific attribute.",
2239
2276
  run(t) {
2240
- return O(t).validAttrValue;
2277
+ return _(t).validAttrValue;
2241
2278
  }
2242
- }, Dt = {
2279
+ }, Ft = {
2243
2280
  checkbox: ["aria-checked"],
2244
2281
  combobox: ["aria-expanded"],
2245
2282
  heading: ["aria-level"],
@@ -2254,7 +2291,7 @@ const tt = {
2254
2291
  slider: ["aria-valuenow"],
2255
2292
  spinbutton: ["aria-valuenow"],
2256
2293
  switch: ["aria-checked"]
2257
- }, Bt = {
2294
+ }, Pt = {
2258
2295
  id: "aria-required-attr",
2259
2296
  wcag: ["4.1.2"],
2260
2297
  level: "A",
@@ -2264,7 +2301,7 @@ const tt = {
2264
2301
  run(t) {
2265
2302
  const a = [];
2266
2303
  for (const e of t.querySelectorAll("[role]")) {
2267
- const i = e.getAttribute("role").trim().toLowerCase(), n = Dt[i];
2304
+ const i = e.getAttribute("role").trim().toLowerCase(), n = Ft[i];
2268
2305
  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))) {
2269
2306
  if (i === "separator") {
2270
2307
  const r = e.getAttribute("tabindex");
@@ -2288,7 +2325,7 @@ const tt = {
2288
2325
  return a;
2289
2326
  }
2290
2327
  };
2291
- function Ot(t) {
2328
+ function Vt(t) {
2292
2329
  var r, o, s;
2293
2330
  const a = [], e = t.className;
2294
2331
  e && typeof e == "string" && e.trim() && a.push(`Classes: ${e.trim().slice(0, 100)}`);
@@ -2305,7 +2342,7 @@ function Ot(t) {
2305
2342
  return a.length > 0 ? a.join(`
2306
2343
  `) : void 0;
2307
2344
  }
2308
- const Wt = {
2345
+ const Ut = {
2309
2346
  id: "button-name",
2310
2347
  wcag: ["4.1.2"],
2311
2348
  level: "A",
@@ -2322,12 +2359,12 @@ const Wt = {
2322
2359
  html: l(e),
2323
2360
  impact: "critical",
2324
2361
  message: "Button has no discernible text.",
2325
- context: Ot(e)
2362
+ context: Vt(e)
2326
2363
  });
2327
2364
  }
2328
2365
  return a;
2329
2366
  }
2330
- }, Ft = {
2367
+ }, jt = {
2331
2368
  alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
2332
2369
  alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
2333
2370
  application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
@@ -2399,7 +2436,7 @@ const Wt = {
2399
2436
  tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
2400
2437
  treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
2401
2438
  treeitem: /* @__PURE__ */ new Set(["aria-checked", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"])
2402
- }, _t = /* @__PURE__ */ new Set([
2439
+ }, zt = /* @__PURE__ */ new Set([
2403
2440
  "aria-atomic",
2404
2441
  "aria-busy",
2405
2442
  "aria-controls",
@@ -2423,7 +2460,7 @@ const Wt = {
2423
2460
  "aria-roledescription",
2424
2461
  "aria-braillelabel",
2425
2462
  "aria-brailleroledescription"
2426
- ]), Pt = {
2463
+ ]), Gt = {
2427
2464
  id: "aria-allowed-attr",
2428
2465
  wcag: ["4.1.2"],
2429
2466
  level: "A",
@@ -2434,12 +2471,12 @@ const Wt = {
2434
2471
  const a = [];
2435
2472
  for (const e of t.querySelectorAll("[role], [aria-*]")) {
2436
2473
  if (m(e)) continue;
2437
- const i = T(e);
2474
+ const i = E(e);
2438
2475
  if (!i) continue;
2439
- const n = Ft[i];
2476
+ const n = jt[i];
2440
2477
  if (n)
2441
2478
  for (const r of e.attributes)
2442
- r.name.startsWith("aria-") && (_t.has(r.name) || n.has(r.name) || a.push({
2479
+ r.name.startsWith("aria-") && (zt.has(r.name) || n.has(r.name) || a.push({
2443
2480
  ruleId: "aria-allowed-attr",
2444
2481
  selector: c(e),
2445
2482
  html: l(e),
@@ -2449,7 +2486,7 @@ const Wt = {
2449
2486
  }
2450
2487
  return a;
2451
2488
  }
2452
- }, Vt = /* @__PURE__ */ new Set([
2489
+ }, Xt = /* @__PURE__ */ new Set([
2453
2490
  "base",
2454
2491
  "col",
2455
2492
  "colgroup",
@@ -2571,10 +2608,10 @@ const Wt = {
2571
2608
  video: /* @__PURE__ */ new Set(["application"]),
2572
2609
  wbr: /* @__PURE__ */ new Set(["none", "presentation"])
2573
2610
  };
2574
- function Ut(t) {
2611
+ function Kt(t) {
2575
2612
  var e;
2576
2613
  const a = t.tagName.toLowerCase();
2577
- if (Vt.has(a))
2614
+ if (Xt.has(a))
2578
2615
  return "none";
2579
2616
  if (a === "a" && t.hasAttribute("href"))
2580
2617
  return k["a[href]"];
@@ -2586,7 +2623,7 @@ function Ut(t) {
2586
2623
  }
2587
2624
  return k[a] || "any";
2588
2625
  }
2589
- const jt = {
2626
+ const Yt = {
2590
2627
  id: "aria-allowed-role",
2591
2628
  wcag: ["4.1.2"],
2592
2629
  level: "A",
@@ -2600,9 +2637,9 @@ const jt = {
2600
2637
  if (m(i)) continue;
2601
2638
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2602
2639
  if (!n) continue;
2603
- const r = Y(i);
2640
+ const r = J(i);
2604
2641
  if (r && n === r) continue;
2605
- const o = Ut(i);
2642
+ const o = Kt(i);
2606
2643
  o === "none" ? a.push({
2607
2644
  ruleId: "aria-allowed-role",
2608
2645
  selector: c(i),
@@ -2619,7 +2656,7 @@ const jt = {
2619
2656
  }
2620
2657
  return a;
2621
2658
  }
2622
- }, z = {
2659
+ }, X = {
2623
2660
  // Each array is an OR group - at least one of each inner array must be present
2624
2661
  combobox: [["listbox", "tree", "grid", "dialog", "textbox"]],
2625
2662
  // Must own/contain one of these
@@ -2636,7 +2673,7 @@ const jt = {
2636
2673
  tablist: [["tab"]],
2637
2674
  tree: [["treeitem", "group"]],
2638
2675
  treegrid: [["row", "rowgroup"]]
2639
- }, G = {
2676
+ }, K = {
2640
2677
  caption: ["figure", "table", "grid", "treegrid"],
2641
2678
  // cell/gridcell/columnheader/rowheader must be in a row
2642
2679
  // but we skip checking native td/th since they're handled by HTML semantics
@@ -2650,17 +2687,17 @@ const jt = {
2650
2687
  tab: ["tablist"],
2651
2688
  treeitem: ["tree", "group"]
2652
2689
  };
2653
- function zt(t, a) {
2690
+ function Qt(t, a) {
2654
2691
  var r;
2655
2692
  const e = ((r = t.getAttribute("aria-owns")) == null ? void 0 : r.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
2656
2693
  for (const o of t.querySelectorAll("*")) {
2657
- const s = T(o);
2694
+ const s = E(o);
2658
2695
  s && !m(o) && n.add(s);
2659
2696
  }
2660
2697
  for (const o of e) {
2661
2698
  const s = i.getElementById(o);
2662
2699
  if (s) {
2663
- const u = T(s);
2700
+ const u = E(s);
2664
2701
  u && !m(s) && n.add(u);
2665
2702
  }
2666
2703
  }
@@ -2668,7 +2705,7 @@ function zt(t, a) {
2668
2705
  if (!o.some((u) => n.has(u))) return !1;
2669
2706
  return !0;
2670
2707
  }
2671
- const Gt = {
2708
+ const Jt = {
2672
2709
  id: "aria-required-children",
2673
2710
  wcag: ["4.1.2"],
2674
2711
  level: "A",
@@ -2681,9 +2718,9 @@ const Gt = {
2681
2718
  for (const i of t.querySelectorAll("[role]")) {
2682
2719
  if (m(i)) continue;
2683
2720
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2684
- if (!n || !(n in z)) continue;
2685
- const r = z[n];
2686
- if (!zt(i, r)) {
2721
+ if (!n || !(n in X)) continue;
2722
+ const r = X[n];
2723
+ if (!Qt(i, r)) {
2687
2724
  const o = r.map((s) => s.join(" or ")).join(", ");
2688
2725
  a.push({
2689
2726
  ruleId: "aria-required-children",
@@ -2696,7 +2733,7 @@ const Gt = {
2696
2733
  }
2697
2734
  return a;
2698
2735
  }
2699
- }, Xt = {
2736
+ }, Zt = {
2700
2737
  id: "aria-required-parent",
2701
2738
  wcag: ["4.1.2"],
2702
2739
  level: "A",
@@ -2709,11 +2746,11 @@ const Gt = {
2709
2746
  for (const i of t.querySelectorAll("[role]")) {
2710
2747
  if (m(i)) continue;
2711
2748
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
2712
- if (!n || !(n in G)) continue;
2713
- const r = G[n];
2749
+ if (!n || !(n in K)) continue;
2750
+ const r = K[n];
2714
2751
  let o = i.parentElement, s = !1;
2715
2752
  for (; o && o !== t.documentElement; ) {
2716
- const u = T(o);
2753
+ const u = E(o);
2717
2754
  if (u && r.includes(u)) {
2718
2755
  s = !0;
2719
2756
  break;
@@ -2730,7 +2767,7 @@ const Gt = {
2730
2767
  }
2731
2768
  return a;
2732
2769
  }
2733
- }, Kt = [
2770
+ }, ea = [
2734
2771
  "a[href]",
2735
2772
  "button:not([disabled])",
2736
2773
  'input:not([disabled]):not([type="hidden"])',
@@ -2746,7 +2783,7 @@ const Gt = {
2746
2783
  "embed",
2747
2784
  "area[href]"
2748
2785
  ].join(", ");
2749
- function Yt(t) {
2786
+ function ta(t) {
2750
2787
  let a = t;
2751
2788
  const e = t.ownerDocument, i = e.defaultView;
2752
2789
  for (; a && a !== e.body; ) {
@@ -2759,7 +2796,7 @@ function Yt(t) {
2759
2796
  }
2760
2797
  return !0;
2761
2798
  }
2762
- const Qt = {
2799
+ const aa = {
2763
2800
  id: "aria-hidden-body",
2764
2801
  selector: 'body[aria-hidden="true"]',
2765
2802
  check: { type: "selector-exists" },
@@ -2771,7 +2808,7 @@ const Qt = {
2771
2808
  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.",
2772
2809
  prompt: "Instruct to remove aria-hidden='true' from the body element.",
2773
2810
  skipAriaHidden: !1
2774
- }, Jt = x(Qt), Zt = {
2811
+ }, ia = x(aa), na = {
2775
2812
  id: "aria-hidden-focus",
2776
2813
  wcag: ["4.1.2"],
2777
2814
  level: "A",
@@ -2782,10 +2819,10 @@ const Qt = {
2782
2819
  const a = [];
2783
2820
  for (const e of t.querySelectorAll('[aria-hidden="true"]')) {
2784
2821
  if (e === t.body) continue;
2785
- const i = e.querySelectorAll(Kt);
2822
+ const i = e.querySelectorAll(ea);
2786
2823
  for (const n of i)
2787
2824
  if (n instanceof HTMLElement) {
2788
- if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Yt(n)) continue;
2825
+ if (n.getAttribute("tabindex") === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !ta(n)) continue;
2789
2826
  a.push({
2790
2827
  ruleId: "aria-hidden-focus",
2791
2828
  selector: c(n),
@@ -2797,7 +2834,7 @@ const Qt = {
2797
2834
  }
2798
2835
  return a;
2799
2836
  }
2800
- }, ea = {
2837
+ }, ra = {
2801
2838
  id: "aria-command-name",
2802
2839
  wcag: ["4.1.2"],
2803
2840
  level: "A",
@@ -2823,7 +2860,7 @@ const Qt = {
2823
2860
  }
2824
2861
  return a;
2825
2862
  }
2826
- }, ta = {
2863
+ }, oa = {
2827
2864
  id: "aria-input-field-name",
2828
2865
  wcag: ["4.1.2"],
2829
2866
  level: "A",
@@ -2844,7 +2881,7 @@ const Qt = {
2844
2881
  }
2845
2882
  return a;
2846
2883
  }
2847
- }, aa = {
2884
+ }, sa = {
2848
2885
  id: "aria-toggle-field-name",
2849
2886
  wcag: ["4.1.2"],
2850
2887
  level: "A",
@@ -2865,7 +2902,7 @@ const Qt = {
2865
2902
  }
2866
2903
  return a;
2867
2904
  }
2868
- }, ia = {
2905
+ }, la = {
2869
2906
  id: "aria-meter-name",
2870
2907
  wcag: ["4.1.2"],
2871
2908
  level: "A",
@@ -2886,7 +2923,7 @@ const Qt = {
2886
2923
  }
2887
2924
  return a;
2888
2925
  }
2889
- }, na = {
2926
+ }, ca = {
2890
2927
  id: "aria-progressbar-name",
2891
2928
  wcag: ["4.1.2"],
2892
2929
  level: "A",
@@ -2907,7 +2944,7 @@ const Qt = {
2907
2944
  }
2908
2945
  return a;
2909
2946
  }
2910
- }, ra = {
2947
+ }, da = {
2911
2948
  id: "aria-dialog-name",
2912
2949
  wcag: ["4.1.2"],
2913
2950
  level: "A",
@@ -2928,7 +2965,7 @@ const Qt = {
2928
2965
  }
2929
2966
  return a;
2930
2967
  }
2931
- }, oa = {
2968
+ }, ua = {
2932
2969
  id: "aria-tooltip-name",
2933
2970
  wcag: ["4.1.2"],
2934
2971
  level: "A",
@@ -2949,7 +2986,7 @@ const Qt = {
2949
2986
  }
2950
2987
  return a;
2951
2988
  }
2952
- }, sa = {
2989
+ }, ma = {
2953
2990
  id: "aria-treeitem-name",
2954
2991
  wcag: ["4.1.2"],
2955
2992
  level: "A",
@@ -2970,7 +3007,7 @@ const Qt = {
2970
3007
  }
2971
3008
  return a;
2972
3009
  }
2973
- }, la = {
3010
+ }, pa = {
2974
3011
  id: "aria-prohibited-attr",
2975
3012
  wcag: ["4.1.2"],
2976
3013
  level: "A",
@@ -2978,16 +3015,16 @@ const Qt = {
2978
3015
  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.",
2979
3016
  prompt: "Identify the prohibited attribute and recommend removing it from this element.",
2980
3017
  run(t) {
2981
- return O(t).prohibitedAttr;
3018
+ return _(t).prohibitedAttr;
2982
3019
  }
2983
- }, ca = [
3020
+ }, ha = [
2984
3021
  "a[href]",
2985
3022
  "button:not([disabled])",
2986
3023
  'input:not([disabled]):not([type="hidden"])',
2987
3024
  "select:not([disabled])",
2988
3025
  "textarea:not([disabled])",
2989
3026
  '[tabindex]:not([tabindex="-1"])'
2990
- ].join(", "), da = [
3027
+ ].join(", "), ga = [
2991
3028
  "aria-atomic",
2992
3029
  "aria-busy",
2993
3030
  "aria-controls",
@@ -3001,7 +3038,7 @@ const Qt = {
3001
3038
  "aria-live",
3002
3039
  "aria-owns",
3003
3040
  "aria-relevant"
3004
- ], ua = {
3041
+ ], ba = {
3005
3042
  id: "presentation-role-conflict",
3006
3043
  wcag: ["4.1.2"],
3007
3044
  level: "A",
@@ -3013,8 +3050,8 @@ const Qt = {
3013
3050
  for (const e of t.querySelectorAll('[role="presentation"], [role="none"]')) {
3014
3051
  if (m(e)) continue;
3015
3052
  const i = [];
3016
- e.matches(ca) && i.push("element is focusable");
3017
- for (const n of da)
3053
+ e.matches(ha) && i.push("element is focusable");
3054
+ for (const n of ga)
3018
3055
  if (e.hasAttribute(n)) {
3019
3056
  i.push(`has ${n}`);
3020
3057
  break;
@@ -3029,7 +3066,7 @@ const Qt = {
3029
3066
  }
3030
3067
  return a;
3031
3068
  }
3032
- }, ma = {
3069
+ }, fa = {
3033
3070
  id: "summary-name",
3034
3071
  wcag: ["4.1.2"],
3035
3072
  level: "A",
@@ -3051,7 +3088,7 @@ const Qt = {
3051
3088
  return a;
3052
3089
  }
3053
3090
  };
3054
- function pa(t) {
3091
+ function va(t) {
3055
3092
  var n, r;
3056
3093
  const a = [], e = t.getAttribute("href");
3057
3094
  e && a.push(`href: ${e}`);
@@ -3068,7 +3105,7 @@ function pa(t) {
3068
3105
  return a.length > 0 ? a.join(`
3069
3106
  `) : void 0;
3070
3107
  }
3071
- const ha = {
3108
+ const ya = {
3072
3109
  id: "link-name",
3073
3110
  wcag: ["2.4.4", "4.1.2"],
3074
3111
  level: "A",
@@ -3085,12 +3122,12 @@ const ha = {
3085
3122
  html: l(e),
3086
3123
  impact: "serious",
3087
3124
  message: "Link has no discernible text.",
3088
- context: pa(e)
3125
+ context: va(e)
3089
3126
  });
3090
3127
  }
3091
3128
  return a;
3092
3129
  }
3093
- }, ga = {
3130
+ }, wa = {
3094
3131
  id: "skip-link",
3095
3132
  wcag: ["2.4.1"],
3096
3133
  level: "A",
@@ -3116,7 +3153,7 @@ const ha = {
3116
3153
  }
3117
3154
  return a;
3118
3155
  }
3119
- }, ba = {
3156
+ }, Aa = {
3120
3157
  id: "link-in-text-block",
3121
3158
  wcag: ["1.4.1"],
3122
3159
  level: "A",
@@ -3143,7 +3180,7 @@ const ha = {
3143
3180
  }
3144
3181
  return a;
3145
3182
  }
3146
- }, fa = {
3183
+ }, Sa = {
3147
3184
  id: "html-has-lang",
3148
3185
  wcag: ["3.1.1"],
3149
3186
  level: "A",
@@ -3161,7 +3198,7 @@ const ha = {
3161
3198
  message: "<html> element missing lang attribute."
3162
3199
  }];
3163
3200
  }
3164
- }, te = /^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i, va = {
3201
+ }, re = /^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i, xa = {
3165
3202
  id: "html-lang-valid",
3166
3203
  wcag: ["3.1.1"],
3167
3204
  level: "A",
@@ -3171,7 +3208,7 @@ const ha = {
3171
3208
  run(t) {
3172
3209
  var e;
3173
3210
  const a = (e = t.documentElement.getAttribute("lang")) == null ? void 0 : e.trim();
3174
- return a && !te.test(a) ? [{
3211
+ return a && !re.test(a) ? [{
3175
3212
  ruleId: "html-lang-valid",
3176
3213
  selector: "html",
3177
3214
  html: l(t.documentElement),
@@ -3179,7 +3216,7 @@ const ha = {
3179
3216
  message: `Invalid lang attribute value "${a}".`
3180
3217
  }] : [];
3181
3218
  }
3182
- }, ya = {
3219
+ }, ka = {
3183
3220
  id: "valid-lang",
3184
3221
  wcag: ["3.1.2"],
3185
3222
  level: "AA",
@@ -3192,7 +3229,7 @@ const ha = {
3192
3229
  for (const i of t.querySelectorAll("[lang]")) {
3193
3230
  if (m(i) || i === t.documentElement) continue;
3194
3231
  const n = (e = i.getAttribute("lang")) == null ? void 0 : e.trim();
3195
- n && !te.test(n) && a.push({
3232
+ n && !re.test(n) && a.push({
3196
3233
  ruleId: "valid-lang",
3197
3234
  selector: c(i),
3198
3235
  html: l(i),
@@ -3202,7 +3239,7 @@ const ha = {
3202
3239
  }
3203
3240
  return a;
3204
3241
  }
3205
- }, wa = {
3242
+ }, Ia = {
3206
3243
  id: "html-xml-lang-mismatch",
3207
3244
  wcag: ["3.1.1"],
3208
3245
  level: "A",
@@ -3225,7 +3262,7 @@ const ha = {
3225
3262
  }
3226
3263
  return [];
3227
3264
  }
3228
- }, Aa = {
3265
+ }, qa = {
3229
3266
  id: "td-headers-attr",
3230
3267
  wcag: ["1.3.1"],
3231
3268
  level: "A",
@@ -3253,7 +3290,7 @@ const ha = {
3253
3290
  }
3254
3291
  return a;
3255
3292
  }
3256
- }, Sa = {
3293
+ }, Ca = {
3257
3294
  id: "th-has-data-cells",
3258
3295
  wcag: ["1.3.1"],
3259
3296
  level: "A",
@@ -3275,7 +3312,7 @@ const ha = {
3275
3312
  }
3276
3313
  return a;
3277
3314
  }
3278
- }, xa = {
3315
+ }, Ta = {
3279
3316
  id: "td-has-header",
3280
3317
  wcag: ["1.3.1"],
3281
3318
  level: "A",
@@ -3305,9 +3342,9 @@ const ha = {
3305
3342
  if (!g) continue;
3306
3343
  const f = g.querySelector("th") !== null, v = Array.from(g.children).indexOf(p);
3307
3344
  let y = !1;
3308
- const C = n.querySelector("thead");
3309
- if (C) {
3310
- const A = C.querySelector("tr");
3345
+ const T = n.querySelector("thead");
3346
+ if (T) {
3347
+ const A = T.querySelector("tr");
3311
3348
  A && ((e = A.querySelectorAll("th, td")[v]) == null ? void 0 : e.tagName.toLowerCase()) === "th" && (y = !0);
3312
3349
  }
3313
3350
  if (!y) {
@@ -3328,7 +3365,7 @@ const ha = {
3328
3365
  }
3329
3366
  return a;
3330
3367
  }
3331
- }, ka = {
3368
+ }, Ea = {
3332
3369
  id: "scope-attr-valid",
3333
3370
  wcag: ["1.3.1"],
3334
3371
  level: "A",
@@ -3351,7 +3388,7 @@ const ha = {
3351
3388
  }
3352
3389
  return a;
3353
3390
  }
3354
- }, Ia = {
3391
+ }, La = {
3355
3392
  id: "empty-table-header",
3356
3393
  wcag: [],
3357
3394
  level: "A",
@@ -3374,7 +3411,7 @@ const ha = {
3374
3411
  }
3375
3412
  return a;
3376
3413
  }
3377
- }, N = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], qa = {
3414
+ }, N = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], Ra = {
3378
3415
  id: "duplicate-id-aria",
3379
3416
  wcag: ["4.1.2"],
3380
3417
  level: "A",
@@ -3422,7 +3459,7 @@ Referenced by: ${h}` : ""}`
3422
3459
  }
3423
3460
  return a;
3424
3461
  }
3425
- }, Ca = {
3462
+ }, Na = {
3426
3463
  id: "video-caption",
3427
3464
  wcag: ["1.2.2"],
3428
3465
  level: "A",
@@ -3443,7 +3480,7 @@ Referenced by: ${h}` : ""}`
3443
3480
  }
3444
3481
  return a;
3445
3482
  }
3446
- }, Ta = {
3483
+ }, Ma = {
3447
3484
  id: "audio-caption",
3448
3485
  wcag: ["1.2.1"],
3449
3486
  level: "A",
@@ -3465,7 +3502,7 @@ Referenced by: ${h}` : ""}`
3465
3502
  }
3466
3503
  return a;
3467
3504
  }
3468
- }, Ea = /* @__PURE__ */ new Set([
3505
+ }, $a = /* @__PURE__ */ new Set([
3469
3506
  "SCRIPT",
3470
3507
  "STYLE",
3471
3508
  "NOSCRIPT",
@@ -3481,23 +3518,23 @@ Referenced by: ${h}` : ""}`
3481
3518
  "BR",
3482
3519
  "HR"
3483
3520
  ]);
3484
- function X([t, a, e]) {
3521
+ function Y([t, a, e]) {
3485
3522
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3486
3523
  }
3487
- function La(t) {
3524
+ function Ha(t) {
3488
3525
  return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!t.closest("fieldset[disabled]");
3489
3526
  }
3490
- function Ra(t) {
3527
+ function Da(t) {
3528
+ if (m(t)) return !0;
3491
3529
  let a = t;
3492
3530
  for (; a; ) {
3493
- if (a.getAttribute("aria-hidden") === "true") return !0;
3494
- const e = E(a);
3531
+ const e = C(a);
3495
3532
  if (e.display === "none" || e.visibility === "hidden") return !0;
3496
3533
  a = a.parentElement;
3497
3534
  }
3498
3535
  return !1;
3499
3536
  }
3500
- const Na = {
3537
+ const Ba = {
3501
3538
  id: "color-contrast",
3502
3539
  wcag: ["1.4.3"],
3503
3540
  level: "AA",
@@ -3512,138 +3549,138 @@ const Na = {
3512
3549
  for (; r = i.nextNode(); ) {
3513
3550
  if (!r.textContent || !r.textContent.trim()) continue;
3514
3551
  const o = r.parentElement;
3515
- if (!o || n.has(o) || (n.add(o), Ea.has(o.tagName)) || La(o) || Ra(o)) continue;
3516
- const s = E(o);
3552
+ if (!o || n.has(o) || (n.add(o), $a.has(o.tagName)) || Ha(o) || Da(o)) continue;
3553
+ const s = C(o);
3517
3554
  if (parseFloat(s.opacity) === 0) continue;
3518
- const u = ee(s.color);
3555
+ const u = ne(s.color);
3519
3556
  if (!u) continue;
3520
3557
  const h = s.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/);
3521
3558
  if (h && parseFloat(h[1]) === 0) continue;
3522
- const d = we(o);
3559
+ const d = Ie(o);
3523
3560
  if (!d) continue;
3524
- const p = P(u[0], u[1], u[2]), g = P(d[0], d[1], d[2]), f = ye(p, g), v = Se(o) ? 3 : 4.5;
3561
+ const p = U(u[0], u[1], u[2]), g = U(d[0], d[1], d[2]), f = ke(p, g), v = Ce(o) ? 3 : 4.5;
3525
3562
  if (f < v) {
3526
- const y = Math.round(f * 100) / 100, C = X(u), A = X(d);
3563
+ const y = Math.round(f * 100) / 100, T = Y(u), A = Y(d);
3527
3564
  a.push({
3528
3565
  ruleId: "color-contrast",
3529
3566
  selector: c(o),
3530
3567
  html: l(o),
3531
3568
  impact: "serious",
3532
3569
  message: `Insufficient color contrast ratio of ${y}:1 (required ${v}:1).`,
3533
- context: `foreground: ${C} rgb(${u.join(", ")}), background: ${A} rgb(${d.join(", ")}), ratio: ${y}:1, required: ${v}:1`
3570
+ context: `foreground: ${T} rgb(${u.join(", ")}), background: ${A} rgb(${d.join(", ")}), ratio: ${y}:1, required: ${v}:1`
3534
3571
  });
3535
3572
  }
3536
3573
  }
3537
3574
  return a;
3538
3575
  }
3539
- }, ae = [
3576
+ }, oe = [
3540
3577
  // Document Structure
3541
- wt,
3542
- At,
3543
- St,
3544
- xt,
3545
- kt,
3578
+ It,
3546
3579
  qt,
3547
3580
  Ct,
3581
+ Tt,
3548
3582
  Et,
3549
3583
  Rt,
3584
+ Nt,
3585
+ $t,
3586
+ Dt,
3550
3587
  // Images
3551
- ke,
3552
- Ie,
3553
- qe,
3554
- Ce,
3555
3588
  Ee,
3556
3589
  Le,
3557
3590
  Re,
3558
3591
  Ne,
3592
+ $e,
3593
+ He,
3559
3594
  De,
3560
- // Forms
3561
3595
  Be,
3562
- Oe,
3563
- We,
3564
3596
  Fe,
3597
+ // Forms
3565
3598
  Pe,
3566
3599
  Ve,
3567
3600
  Ue,
3568
- // Keyboard
3569
- ze,
3601
+ je,
3602
+ Ge,
3570
3603
  Xe,
3571
- tt,
3572
- at,
3573
- it,
3574
- // Structure
3575
- nt,
3576
- It,
3577
- Nt,
3578
- rt,
3604
+ Ke,
3605
+ // Keyboard
3606
+ Qe,
3607
+ Ze,
3579
3608
  ot,
3580
3609
  st,
3581
3610
  lt,
3611
+ // Structure
3582
3612
  ct,
3613
+ Lt,
3614
+ Bt,
3583
3615
  dt,
3584
3616
  ut,
3585
3617
  mt,
3586
3618
  pt,
3587
3619
  ht,
3620
+ gt,
3588
3621
  bt,
3589
3622
  ft,
3623
+ vt,
3590
3624
  yt,
3625
+ At,
3626
+ St,
3627
+ kt,
3591
3628
  // ARIA
3592
- $t,
3593
- Mt,
3594
- Ht,
3595
- Bt,
3629
+ Ot,
3630
+ Wt,
3631
+ _t,
3596
3632
  Pt,
3597
- jt,
3598
3633
  Gt,
3599
- Xt,
3634
+ Yt,
3600
3635
  Jt,
3601
3636
  Zt,
3602
- ea,
3603
- ta,
3604
- aa,
3605
3637
  ia,
3606
3638
  na,
3607
3639
  ra,
3608
3640
  oa,
3609
3641
  sa,
3610
3642
  la,
3643
+ ca,
3644
+ da,
3611
3645
  ua,
3612
- Wt,
3613
3646
  ma,
3614
- // Links
3615
- ha,
3616
- ga,
3647
+ pa,
3617
3648
  ba,
3618
- // Language
3649
+ Ut,
3619
3650
  fa,
3620
- va,
3651
+ // Links
3621
3652
  ya,
3622
3653
  wa,
3623
- // Tables
3624
3654
  Aa,
3655
+ // Language
3625
3656
  Sa,
3626
3657
  xa,
3627
3658
  ka,
3628
3659
  Ia,
3629
- // Parsing
3660
+ // Tables
3630
3661
  qa,
3631
- // Media
3632
3662
  Ca,
3633
3663
  Ta,
3664
+ Ea,
3665
+ La,
3666
+ // Parsing
3667
+ Ra,
3668
+ // Media
3669
+ Na,
3670
+ Ma,
3634
3671
  // Color
3635
- Na
3672
+ Ba
3636
3673
  ];
3637
- let W = [], ie = /* @__PURE__ */ new Set();
3638
- function Da(t) {
3639
- t.additionalRules && (W = t.additionalRules), t.disabledRules && (ie = new Set(t.disabledRules));
3674
+ let F = [], se = /* @__PURE__ */ new Set();
3675
+ function Fa(t) {
3676
+ t.additionalRules && (F = t.additionalRules), t.disabledRules && (se = new Set(t.disabledRules));
3640
3677
  }
3641
- function ne() {
3642
- return ae.filter((a) => !ie.has(a.id)).concat(W);
3678
+ function le() {
3679
+ return oe.filter((a) => !se.has(a.id)).concat(F);
3643
3680
  }
3644
- function Ba(t) {
3645
- Q(), K(), Z(), J();
3646
- const a = ne(), e = [];
3681
+ function Pa(t) {
3682
+ ee(), Q(), Z(), ie(), ae(), te();
3683
+ const a = le(), e = [];
3647
3684
  let i = 0;
3648
3685
  return {
3649
3686
  processChunk(n) {
@@ -3662,10 +3699,10 @@ function Ba(t) {
3662
3699
  }
3663
3700
  };
3664
3701
  }
3665
- function Oa(t) {
3702
+ function Va(t) {
3666
3703
  var i;
3667
- Q(), K(), Z(), J();
3668
- const a = ne(), e = [];
3704
+ ee(), Q(), Z(), ie(), ae(), te();
3705
+ const a = le(), e = [];
3669
3706
  for (const n of a)
3670
3707
  try {
3671
3708
  e.push(...n.run(t));
@@ -3678,31 +3715,31 @@ function Oa(t) {
3678
3715
  ruleCount: a.length
3679
3716
  };
3680
3717
  }
3681
- const $a = new Map(ae.map((t) => [t.id, t]));
3682
- function Wa(t) {
3683
- const a = $a.get(t);
3684
- return a || W.find((e) => e.id === t);
3718
+ const Oa = new Map(oe.map((t) => [t.id, t]));
3719
+ function Ua(t) {
3720
+ const a = Oa.get(t);
3721
+ return a || F.find((e) => e.id === t);
3685
3722
  }
3686
3723
  export {
3687
- J as clearAriaAttrAuditCache,
3688
- Q as clearAriaHiddenCache,
3689
- Z as clearColorCaches,
3690
- K as clearComputedRoleCache,
3724
+ ae as clearAriaAttrAuditCache,
3725
+ ee as clearAriaHiddenCache,
3726
+ ie as clearColorCaches,
3727
+ Q as clearComputedRoleCache,
3691
3728
  x as compileDeclarativeRule,
3692
- Da as configureRules,
3693
- Ba as createChunkedAudit,
3729
+ Fa as configureRules,
3730
+ Pa as createChunkedAudit,
3694
3731
  b as getAccessibleName,
3695
3732
  w as getAccessibleTextContent,
3696
- ne as getActiveRules,
3697
- T as getComputedRole,
3733
+ le as getActiveRules,
3734
+ E as getComputedRole,
3698
3735
  l as getHtmlSnippet,
3699
- Y as getImplicitRole,
3700
- Wa as getRuleById,
3736
+ J as getImplicitRole,
3737
+ Ua as getRuleById,
3701
3738
  c as getSelector,
3702
3739
  m as isAriaHidden,
3703
- se as isValidRole,
3704
- Ma as querySelectorShadowAware,
3705
- ae as rules,
3706
- Oa as runAudit,
3707
- Ha as validateDeclarativeRule
3740
+ me as isValidRole,
3741
+ Wa as querySelectorShadowAware,
3742
+ oe as rules,
3743
+ Va as runAudit,
3744
+ _a as validateDeclarativeRule
3708
3745
  };