@accesslint/core 0.6.1 → 0.6.3

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 G = /* @__PURE__ */ new WeakMap();
2
- function Ge() {
3
- G = /* @__PURE__ */ new WeakMap();
1
+ let K = /* @__PURE__ */ new WeakMap();
2
+ function Qe() {
3
+ K = /* @__PURE__ */ new WeakMap();
4
4
  }
5
- function Re(t) {
5
+ function Ne(t) {
6
6
  var n;
7
7
  const a = t.tagName.toLowerCase(), e = (n = t.getAttribute("type")) == null ? void 0 : n.toLowerCase();
8
8
  switch (a) {
@@ -117,29 +117,29 @@ function Re(t) {
117
117
  return null;
118
118
  }
119
119
  }
120
- function F(t) {
120
+ function H(t) {
121
121
  var i;
122
- const a = G.get(t);
122
+ const a = K.get(t);
123
123
  if (a !== void 0) return a;
124
- const n = ((i = t.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase()) || null || Re(t);
125
- return G.set(t, n), n;
124
+ const n = ((i = t.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase()) || null || Ne(t);
125
+ return K.set(t, n), n;
126
126
  }
127
- let Y = /* @__PURE__ */ new WeakMap();
128
- function Ye() {
129
- Y = /* @__PURE__ */ new WeakMap();
127
+ let J = /* @__PURE__ */ new WeakMap();
128
+ function Ze() {
129
+ J = /* @__PURE__ */ new WeakMap();
130
130
  }
131
- function y(t) {
132
- const a = Y.get(t);
131
+ function v(t) {
132
+ const a = J.get(t);
133
133
  if (a !== void 0) return a;
134
- const e = Xe(t);
135
- return Y.set(t, e), e;
134
+ const e = et(t);
135
+ return J.set(t, e), e;
136
136
  }
137
- function Xe(t) {
138
- var s, o, r, l, m;
137
+ function et(t) {
138
+ var s, o, r, l, d;
139
139
  const a = t.getAttribute("aria-labelledby");
140
140
  if (a) {
141
- const c = a.split(/\s+/).map((d) => {
142
- const h = t.ownerDocument.getElementById(d);
141
+ const c = a.split(/\s+/).map((u) => {
142
+ const h = t.ownerDocument.getElementById(u);
143
143
  return h ? k(h).trim() : "";
144
144
  }).filter(Boolean);
145
145
  if (c.length) return c.join(" ");
@@ -151,8 +151,8 @@ function Xe(t) {
151
151
  const h = t.ownerDocument.querySelector(`label[for="${CSS.escape(t.id)}"]`), g = h ? k(h).trim() : "";
152
152
  if (g) return g;
153
153
  }
154
- const c = t.closest("label"), d = c ? k(c).trim() : "";
155
- if (d) return d;
154
+ const c = t.closest("label"), u = c ? k(c).trim() : "";
155
+ if (u) return u;
156
156
  }
157
157
  const n = (o = t.getAttribute("title")) == null ? void 0 : o.trim();
158
158
  if (n) return n;
@@ -164,24 +164,24 @@ function Xe(t) {
164
164
  if (i === "fieldset") {
165
165
  const c = t.querySelector(":scope > legend");
166
166
  if (c) {
167
- const d = k(c).trim();
168
- if (d) return d;
167
+ const u = k(c).trim();
168
+ if (u) return u;
169
169
  }
170
170
  }
171
171
  if (i === "table") {
172
172
  const c = t.querySelector(":scope > caption");
173
173
  if (c) {
174
- const d = k(c).trim();
175
- if (d) return d;
174
+ const u = k(c).trim();
175
+ if (u) return u;
176
176
  }
177
177
  }
178
178
  if (!(t instanceof HTMLInputElement)) {
179
179
  const c = k(t).trim();
180
180
  if (c) return c;
181
181
  }
182
- return t instanceof HTMLImageElement || t instanceof HTMLAreaElement ? ((l = t.alt) == null ? void 0 : l.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((m = t.alt) == null ? void 0 : m.trim()) ?? "" : "";
182
+ return t instanceof HTMLImageElement || t instanceof HTMLAreaElement ? ((l = t.alt) == null ? void 0 : l.trim()) ?? "" : t instanceof HTMLInputElement && t.type === "image" ? ((d = t.alt) == null ? void 0 : d.trim()) ?? "" : "";
183
183
  }
184
- const Ke = /* @__PURE__ */ new Set([
184
+ const tt = /* @__PURE__ */ new Set([
185
185
  "alert",
186
186
  "alertdialog",
187
187
  "application",
@@ -265,29 +265,29 @@ const Ke = /* @__PURE__ */ new Set([
265
265
  "treegrid",
266
266
  "treeitem"
267
267
  ]);
268
- function Je(t) {
268
+ function at(t) {
269
269
  const a = t.trim().toLowerCase().replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "");
270
- return Ke.has(a);
270
+ return tt.has(a);
271
271
  }
272
- function T(t) {
272
+ function N(t) {
273
273
  let a = t;
274
274
  for (; a; ) {
275
- if (Ce(a)) return !0;
275
+ if ($e(a)) return !0;
276
276
  a = a.parentElement;
277
277
  }
278
278
  return !1;
279
279
  }
280
- let X = /* @__PURE__ */ new WeakMap();
281
- function Qe() {
282
- X = /* @__PURE__ */ new WeakMap();
280
+ let Q = /* @__PURE__ */ new WeakMap();
281
+ function nt() {
282
+ Q = /* @__PURE__ */ new WeakMap();
283
283
  }
284
284
  function b(t) {
285
- const a = X.get(t);
285
+ const a = Q.get(t);
286
286
  if (a !== void 0) return a;
287
287
  let e;
288
- return t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none") ? e = !0 : t.parentElement ? e = b(t.parentElement) : e = !1, X.set(t, e), e;
288
+ return t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && (t.hidden || t.style.display === "none") ? e = !0 : t.parentElement ? e = b(t.parentElement) : e = !1, Q.set(t, e), e;
289
289
  }
290
- function Ce(t) {
290
+ function $e(t) {
291
291
  if (t.getAttribute("aria-hidden") === "true" || t instanceof HTMLElement && t.hidden) return !0;
292
292
  if (typeof getComputedStyle == "function") {
293
293
  const a = getComputedStyle(t);
@@ -304,42 +304,42 @@ function k(t) {
304
304
  a += r.textContent ?? "";
305
305
  else if (r.nodeType === 1) {
306
306
  const l = r;
307
- if (!Ce(l)) {
308
- const m = (e = l.tagName) == null ? void 0 : e.toLowerCase();
309
- if (m === "img" || m === "area") {
307
+ if (!$e(l)) {
308
+ const d = (e = l.tagName) == null ? void 0 : e.toLowerCase();
309
+ if (d === "img" || d === "area") {
310
310
  const c = l.getAttribute("aria-labelledby");
311
311
  if (c) {
312
- const d = c.split(/\s+/).map((h) => {
312
+ const u = c.split(/\s+/).map((h) => {
313
313
  var g, f;
314
314
  return ((f = (g = l.ownerDocument.getElementById(h)) == null ? void 0 : g.textContent) == null ? void 0 : f.trim()) ?? "";
315
315
  }).filter(Boolean);
316
- if (d.length) {
317
- a += d.join(" ");
316
+ if (u.length) {
317
+ a += u.join(" ");
318
318
  continue;
319
319
  }
320
320
  }
321
321
  a += ((n = l.getAttribute("aria-label")) == null ? void 0 : n.trim()) ?? l.getAttribute("alt") ?? ((i = l.getAttribute("title")) == null ? void 0 : i.trim()) ?? "";
322
- } else if (m === "svg") {
322
+ } else if (d === "svg") {
323
323
  const c = (s = l.getAttribute("aria-label")) == null ? void 0 : s.trim();
324
324
  if (c)
325
325
  a += c;
326
326
  else {
327
- const d = l.querySelector("title");
328
- d && (a += d.textContent ?? "");
327
+ const u = l.querySelector("title");
328
+ u && (a += u.textContent ?? "");
329
329
  }
330
330
  } else (o = l.getAttribute("aria-label")) != null && o.trim() ? a += l.getAttribute("aria-label").trim() : a += k(l);
331
331
  }
332
332
  }
333
333
  return a;
334
334
  }
335
- let K = /* @__PURE__ */ new WeakMap();
336
- function Ze() {
337
- K = /* @__PURE__ */ new WeakMap();
335
+ let Z = /* @__PURE__ */ new WeakMap();
336
+ function it() {
337
+ Z = /* @__PURE__ */ new WeakMap();
338
338
  }
339
- function et(t) {
339
+ function st(t) {
340
340
  return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
341
341
  }
342
- const tt = [
342
+ const ot = [
343
343
  "data-testid",
344
344
  "data-test-id",
345
345
  "data-cy",
@@ -349,12 +349,12 @@ const tt = [
349
349
  "for",
350
350
  "aria-label"
351
351
  ];
352
- function at(t) {
352
+ function rt(t) {
353
353
  const a = t.tagName.toLowerCase();
354
- for (const n of tt) {
354
+ for (const n of ot) {
355
355
  const i = t.getAttribute(n);
356
356
  if (i != null && i.length > 0 && i.length < 100)
357
- return `${a}[${n}="${et(i)}"]`;
357
+ return `${a}[${n}="${st(i)}"]`;
358
358
  }
359
359
  const e = t.parentElement;
360
360
  if (e) {
@@ -366,7 +366,7 @@ function at(t) {
366
366
  }
367
367
  return a;
368
368
  }
369
- function B(t) {
369
+ function _(t) {
370
370
  if (t.id) return `#${CSS.escape(t.id)}`;
371
371
  const a = t.getRootNode(), e = a instanceof ShadowRoot ? null : a.documentElement, n = [];
372
372
  let i = t;
@@ -375,7 +375,7 @@ function B(t) {
375
375
  n.unshift(`#${CSS.escape(i.id)}`);
376
376
  break;
377
377
  }
378
- if (n.unshift(at(i)), n.length >= 2) {
378
+ if (n.unshift(rt(i)), n.length >= 2) {
379
379
  const s = n.join(" > ");
380
380
  try {
381
381
  const o = a.querySelectorAll(s);
@@ -389,28 +389,28 @@ function B(t) {
389
389
  }
390
390
  function p(t) {
391
391
  var s;
392
- const a = K.get(t);
392
+ const a = Z.get(t);
393
393
  if (a !== void 0) return a;
394
394
  const e = [];
395
395
  let n = t;
396
396
  for (; n; ) {
397
397
  const o = n.getRootNode();
398
398
  if (o instanceof ShadowRoot)
399
- e.unshift({ selector: B(n), delimiter: " >>> " }), n = o.host;
399
+ e.unshift({ selector: _(n), delimiter: " >>> " }), n = o.host;
400
400
  else {
401
401
  const r = (s = o.defaultView) == null ? void 0 : s.frameElement;
402
402
  if (r)
403
- e.unshift({ selector: B(n), delimiter: " >>>iframe> " }), n = r;
403
+ e.unshift({ selector: _(n), delimiter: " >>>iframe> " }), n = r;
404
404
  else {
405
- e.unshift({ selector: B(n), delimiter: "" });
405
+ e.unshift({ selector: _(n), delimiter: "" });
406
406
  break;
407
407
  }
408
408
  }
409
409
  }
410
410
  const i = e.map((o, r) => (r === 0 ? "" : o.delimiter) + o.selector).join("");
411
- return K.set(t, i), i;
411
+ return Z.set(t, i), i;
412
412
  }
413
- function Ii(t) {
413
+ function $i(t) {
414
414
  const a = [], e = [];
415
415
  let n = t;
416
416
  for (; n; ) {
@@ -443,11 +443,11 @@ function Ii(t) {
443
443
  }
444
444
  return null;
445
445
  }
446
- function u(t) {
446
+ function m(t) {
447
447
  const a = t.outerHTML;
448
448
  return a.length > 200 ? a.slice(0, 200) + "..." : a;
449
449
  }
450
- const nt = /* @__PURE__ */ new Set([
450
+ const lt = /* @__PURE__ */ new Set([
451
451
  "aria-activedescendant",
452
452
  "aria-atomic",
453
453
  "aria-autocomplete",
@@ -501,7 +501,7 @@ const nt = /* @__PURE__ */ new Set([
501
501
  "aria-valuemin",
502
502
  "aria-valuenow",
503
503
  "aria-valuetext"
504
- ]), de = /* @__PURE__ */ new Set([
504
+ ]), me = /* @__PURE__ */ new Set([
505
505
  "aria-atomic",
506
506
  "aria-busy",
507
507
  "aria-disabled",
@@ -512,7 +512,7 @@ const nt = /* @__PURE__ */ new Set([
512
512
  "aria-multiselectable",
513
513
  "aria-readonly",
514
514
  "aria-required"
515
- ]), ue = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), it = /* @__PURE__ */ new Set([
515
+ ]), pe = /* @__PURE__ */ new Set(["aria-checked", "aria-pressed"]), ct = /* @__PURE__ */ new Set([
516
516
  "aria-colcount",
517
517
  "aria-colindex",
518
518
  "aria-colspan",
@@ -522,11 +522,11 @@ const nt = /* @__PURE__ */ new Set([
522
522
  "aria-rowindex",
523
523
  "aria-rowspan",
524
524
  "aria-setsize"
525
- ]), st = /* @__PURE__ */ new Set([
525
+ ]), dt = /* @__PURE__ */ new Set([
526
526
  "aria-valuemax",
527
527
  "aria-valuemin",
528
528
  "aria-valuenow"
529
- ]), me = {
529
+ ]), he = {
530
530
  "aria-autocomplete": /* @__PURE__ */ new Set(["inline", "list", "both", "none"]),
531
531
  "aria-expanded": /* @__PURE__ */ new Set(["true", "false", "undefined"]),
532
532
  "aria-current": /* @__PURE__ */ new Set(["page", "step", "location", "date", "time", "true", "false"]),
@@ -537,7 +537,7 @@ const nt = /* @__PURE__ */ new Set([
537
537
  "aria-orientation": /* @__PURE__ */ new Set(["horizontal", "vertical", "undefined"]),
538
538
  "aria-relevant": /* @__PURE__ */ new Set(["additions", "all", "removals", "text"]),
539
539
  "aria-sort": /* @__PURE__ */ new Set(["ascending", "descending", "none", "other"])
540
- }, pe = /* @__PURE__ */ new Set([
540
+ }, be = /* @__PURE__ */ new Set([
541
541
  "caption",
542
542
  "code",
543
543
  "deletion",
@@ -554,7 +554,7 @@ const nt = /* @__PURE__ */ new Set([
554
554
  "suggestion",
555
555
  "term",
556
556
  "time"
557
- ]), ot = {
557
+ ]), ut = {
558
558
  abbr: !0,
559
559
  bdi: !0,
560
560
  bdo: !0,
@@ -582,7 +582,7 @@ const nt = /* @__PURE__ */ new Set([
582
582
  u: !0,
583
583
  var: !0,
584
584
  wbr: !0
585
- }, rt = {
585
+ }, mt = {
586
586
  alert: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
587
587
  article: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
588
588
  banner: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
@@ -615,13 +615,13 @@ const nt = /* @__PURE__ */ new Set([
615
615
  time: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"]),
616
616
  tooltip: /* @__PURE__ */ new Set(["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"])
617
617
  };
618
- let N = null, $ = null;
619
- function lt() {
620
- N = null, $ = null;
618
+ let D = null, F = null;
619
+ function pt() {
620
+ D = null, F = null;
621
621
  }
622
- function ne(t) {
622
+ function oe(t) {
623
623
  var i;
624
- if ($ && (N == null ? void 0 : N.deref()) === t) return $;
624
+ if (F && (D == null ? void 0 : D.deref()) === t) return F;
625
625
  const a = [], e = [], n = [];
626
626
  for (const s of t.querySelectorAll("*")) {
627
627
  let o = !1;
@@ -632,14 +632,14 @@ function ne(t) {
632
632
  }
633
633
  if (!o) continue;
634
634
  let r, l;
635
- const m = () => (r === void 0 && (r = p(s), l = u(s)), { selector: r, html: l });
635
+ const d = () => (r === void 0 && (r = p(s), l = m(s)), { selector: r, html: l });
636
636
  for (const c of s.attributes)
637
- if (c.name.startsWith("aria-") && !nt.has(c.name)) {
638
- const d = m();
637
+ if (c.name.startsWith("aria-") && !lt.has(c.name)) {
638
+ const u = d();
639
639
  a.push({
640
640
  ruleId: "accesslint-055",
641
- selector: d.selector,
642
- html: d.html,
641
+ selector: u.selector,
642
+ html: u.html,
643
643
  impact: "critical",
644
644
  message: `Invalid ARIA attribute "${c.name}".`
645
645
  });
@@ -647,63 +647,63 @@ function ne(t) {
647
647
  }
648
648
  for (const c of s.attributes) {
649
649
  if (!c.name.startsWith("aria-")) continue;
650
- const d = c.value.trim();
651
- if (!(d === "" && !de.has(c.name) && !ue.has(c.name))) {
652
- if (de.has(c.name)) {
653
- if (d !== "true" && d !== "false") {
654
- const h = m();
650
+ const u = c.value.trim();
651
+ if (!(u === "" && !me.has(c.name) && !pe.has(c.name))) {
652
+ if (me.has(c.name)) {
653
+ if (u !== "true" && u !== "false") {
654
+ const h = d();
655
655
  e.push({
656
656
  ruleId: "accesslint-056",
657
657
  selector: h.selector,
658
658
  html: h.html,
659
659
  impact: "critical",
660
- message: `${c.name} must be "true" or "false", got "${d}".`
660
+ message: `${c.name} must be "true" or "false", got "${u}".`
661
661
  });
662
662
  }
663
- } else if (ue.has(c.name)) {
664
- if (d !== "true" && d !== "false" && d !== "mixed") {
665
- const h = m();
663
+ } else if (pe.has(c.name)) {
664
+ if (u !== "true" && u !== "false" && u !== "mixed") {
665
+ const h = d();
666
666
  e.push({
667
667
  ruleId: "accesslint-056",
668
668
  selector: h.selector,
669
669
  html: h.html,
670
670
  impact: "critical",
671
- message: `${c.name} must be "true", "false", or "mixed", got "${d}".`
671
+ message: `${c.name} must be "true", "false", or "mixed", got "${u}".`
672
672
  });
673
673
  }
674
- } else if (it.has(c.name)) {
675
- if (d === "" || !/^-?\d+$/.test(d)) {
676
- const h = m();
674
+ } else if (ct.has(c.name)) {
675
+ if (u === "" || !/^-?\d+$/.test(u)) {
676
+ const h = d();
677
677
  e.push({
678
678
  ruleId: "accesslint-056",
679
679
  selector: h.selector,
680
680
  html: h.html,
681
681
  impact: "critical",
682
- message: `${c.name} must be an integer, got "${d}".`
682
+ message: `${c.name} must be an integer, got "${u}".`
683
683
  });
684
684
  }
685
- } else if (st.has(c.name)) {
686
- if (d === "" || isNaN(Number(d))) {
687
- const h = m();
685
+ } else if (dt.has(c.name)) {
686
+ if (u === "" || isNaN(Number(u))) {
687
+ const h = d();
688
688
  e.push({
689
689
  ruleId: "accesslint-056",
690
690
  selector: h.selector,
691
691
  html: h.html,
692
692
  impact: "critical",
693
- message: `${c.name} must be a number, got "${d}".`
693
+ message: `${c.name} must be a number, got "${u}".`
694
694
  });
695
695
  }
696
- } else if (me[c.name]) {
697
- const h = d.split(/\s+/);
696
+ } else if (he[c.name]) {
697
+ const h = u.split(/\s+/);
698
698
  for (const g of h)
699
- if (!me[c.name].has(g)) {
700
- const f = m();
699
+ if (!he[c.name].has(g)) {
700
+ const f = d();
701
701
  e.push({
702
702
  ruleId: "accesslint-056",
703
703
  selector: f.selector,
704
704
  html: f.html,
705
705
  impact: "critical",
706
- message: `Invalid value "${d}" for ${c.name}.`
706
+ message: `Invalid value "${u}" for ${c.name}.`
707
707
  });
708
708
  break;
709
709
  }
@@ -711,40 +711,40 @@ function ne(t) {
711
711
  }
712
712
  }
713
713
  if (!b(s)) {
714
- const c = (i = s.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase(), d = s.tagName.toLowerCase();
715
- if (!c && ot[d]) {
714
+ const c = (i = s.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase(), u = s.tagName.toLowerCase();
715
+ if (!c && ut[u]) {
716
716
  const h = s.hasAttribute("aria-label"), g = s.hasAttribute("aria-labelledby");
717
717
  if (h || g) {
718
- const f = m();
718
+ const f = d();
719
719
  n.push({
720
720
  ruleId: "accesslint-072",
721
721
  selector: f.selector,
722
722
  html: f.html,
723
723
  impact: "serious",
724
- message: `aria-label and aria-labelledby are prohibited on <${d}> elements.`
724
+ message: `aria-label and aria-labelledby are prohibited on <${u}> elements.`
725
725
  });
726
726
  }
727
727
  } else if (c) {
728
- if (pe.has(c)) {
728
+ if (be.has(c)) {
729
729
  const g = s.hasAttribute("aria-label"), f = s.hasAttribute("aria-labelledby");
730
730
  if (g || f) {
731
- const v = m();
731
+ const y = d();
732
732
  n.push({
733
733
  ruleId: "accesslint-072",
734
- selector: v.selector,
735
- html: v.html,
734
+ selector: y.selector,
735
+ html: y.html,
736
736
  impact: "serious",
737
737
  message: `aria-label and aria-labelledby are prohibited on role "${c}".`
738
738
  });
739
739
  }
740
740
  }
741
- const h = rt[c];
741
+ const h = mt[c];
742
742
  if (h) {
743
743
  for (const g of s.attributes)
744
744
  if (g.name.startsWith("aria-") && h.has(g.name)) {
745
- if ((g.name === "aria-label" || g.name === "aria-labelledby") && pe.has(c))
745
+ if ((g.name === "aria-label" || g.name === "aria-labelledby") && be.has(c))
746
746
  continue;
747
- const f = m();
747
+ const f = d();
748
748
  n.push({
749
749
  ruleId: "accesslint-072",
750
750
  selector: f.selector,
@@ -757,28 +757,28 @@ function ne(t) {
757
757
  }
758
758
  }
759
759
  }
760
- return N = new WeakRef(t), $ = { validAttr: a, validAttrValue: e, prohibitedAttr: n }, $;
760
+ return D = new WeakRef(t), F = { validAttr: a, validAttrValue: e, prohibitedAttr: n }, F;
761
761
  }
762
- let J = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap();
763
- function ct() {
764
- J = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap();
762
+ let ee = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap();
763
+ function ht() {
764
+ ee = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap();
765
765
  }
766
- function x(t) {
767
- let a = J.get(t);
768
- return a || (a = getComputedStyle(t), J.set(t, a), a);
766
+ function w(t) {
767
+ let a = ee.get(t);
768
+ return a || (a = getComputedStyle(t), ee.set(t, a), a);
769
769
  }
770
- function R(t, a, e) {
770
+ function I(t, a, e) {
771
771
  const [n, i, s] = [t, a, e].map((o) => {
772
772
  const r = o / 255;
773
773
  return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
774
774
  });
775
775
  return 0.2126 * n + 0.7152 * i + 0.0722 * s;
776
776
  }
777
- function ie(t, a) {
777
+ function M(t, a) {
778
778
  const e = Math.max(t, a), n = Math.min(t, a);
779
779
  return (e + 0.05) / (n + 0.05);
780
780
  }
781
- const he = {
781
+ const ge = {
782
782
  black: [0, 0, 0],
783
783
  white: [255, 255, 255],
784
784
  red: [255, 0, 0],
@@ -798,9 +798,9 @@ const he = {
798
798
  lime: [0, 255, 0],
799
799
  olive: [128, 128, 0]
800
800
  };
801
- function C(t) {
801
+ function R(t) {
802
802
  const a = t.trim().toLowerCase();
803
- if (he[a]) return he[a];
803
+ if (ge[a]) return ge[a];
804
804
  const e = a.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/);
805
805
  if (e)
806
806
  return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)];
@@ -817,7 +817,7 @@ function C(t) {
817
817
  );
818
818
  return s ? [parseInt(s[1]), parseInt(s[2]), parseInt(s[3])] : null;
819
819
  }
820
- function Te(t) {
820
+ function z(t) {
821
821
  const a = t.match(/rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*([\d.]+)\s*\)/);
822
822
  if (a) return parseFloat(a[1]);
823
823
  const e = t.match(/rgba?\([^)]+\/\s*([\d.]+%?)\s*\)/);
@@ -834,42 +834,62 @@ function L(t, a, e) {
834
834
  Math.round(t[2] * e + a[2] * (1 - e))
835
835
  ];
836
836
  }
837
- function be(t) {
838
- const a = Q.get(t);
837
+ function fe(t) {
838
+ const a = te.get(t);
839
839
  if (a !== void 0) return a;
840
- const e = dt(t);
841
- return Q.set(t, e), e;
840
+ const e = bt(t);
841
+ return te.set(t, e), e;
842
842
  }
843
- function dt(t) {
844
- let a = t;
845
- for (; a; ) {
846
- const e = x(a), n = e.backgroundImage;
847
- if (n && n !== "none" && n !== "initial") {
848
- const o = e.backgroundColor;
849
- return o && o !== "transparent" && o !== "rgba(0, 0, 0, 0)" && o !== "rgba(0 0 0 / 0)" ? C(o) : null;
843
+ function G(t, a) {
844
+ let e = a;
845
+ for (let n = t.length - 1; n >= 0; n--)
846
+ e = L(t[n].color, e, t[n].alpha);
847
+ return e;
848
+ }
849
+ function bt(t) {
850
+ const a = [];
851
+ let e = t;
852
+ for (; e; ) {
853
+ const i = w(e), s = i.backgroundImage;
854
+ if (s && s !== "none" && s !== "initial") {
855
+ const d = i.backgroundColor;
856
+ if (d && d !== "transparent" && d !== "rgba(0, 0, 0, 0)" && d !== "rgba(0 0 0 / 0)") {
857
+ const c = R(d);
858
+ if (c)
859
+ return a.length > 0 ? G(a, c) : c;
860
+ }
861
+ return null;
850
862
  }
851
- const i = e.backgroundColor;
852
- if (i === "transparent" || i === "rgba(0, 0, 0, 0)" || i === "rgba(0 0 0 / 0)") {
853
- a = a.parentElement;
863
+ const o = i.backgroundColor;
864
+ if (o === "transparent" || o === "rgba(0, 0, 0, 0)" || o === "rgba(0 0 0 / 0)") {
865
+ e = e.parentElement;
854
866
  continue;
855
867
  }
856
- const s = i.match(/rgba\(.+?,\s*([\d.]+)\s*\)/) || i.match(/rgba?\(.+?\/\s*([\d.]+%?)\s*\)/);
857
- if (s && (s[1].endsWith("%") ? parseFloat(s[1]) / 100 : parseFloat(s[1])) < 0.1) {
858
- a = a.parentElement;
868
+ const r = z(o);
869
+ if (r < 0.01) {
870
+ e = e.parentElement;
859
871
  continue;
860
872
  }
861
- return C(i);
873
+ const l = R(o);
874
+ if (!l) {
875
+ e = e.parentElement;
876
+ continue;
877
+ }
878
+ if (r >= 1)
879
+ return a.length > 0 ? G(a, l) : l;
880
+ a.push({ color: l, alpha: r }), e = e.parentElement;
862
881
  }
863
- return [255, 255, 255];
882
+ const n = [255, 255, 255];
883
+ return a.length > 0 ? G(a, n) : n;
864
884
  }
865
- function ut(t) {
885
+ function De(t) {
866
886
  const a = [];
867
887
  let e = 0, n = 0;
868
888
  for (let i = 0; i < t.length; i++)
869
889
  t[i] === "(" ? e++ : t[i] === ")" ? e-- : t[i] === "," && e === 0 && (a.push(t.slice(n, i).trim()), n = i + 1);
870
890
  return a.push(t.slice(n).trim()), a;
871
891
  }
872
- function mt(t, a = [255, 255, 255]) {
892
+ function gt(t, a = [255, 255, 255]) {
873
893
  const e = [], n = t.search(/(?:linear|radial|conic)-gradient\(/);
874
894
  if (n === -1) return e;
875
895
  const i = t.indexOf("(", n);
@@ -877,57 +897,106 @@ function mt(t, a = [255, 255, 255]) {
877
897
  let s = 1, o = i + 1;
878
898
  for (; o < t.length && s > 0; o++)
879
899
  t[o] === "(" ? s++ : t[o] === ")" && s--;
880
- const r = t.slice(i + 1, o - 1), l = ut(r);
881
- for (const m of l) {
882
- const c = m.trim();
900
+ const r = t.slice(i + 1, o - 1), l = De(r);
901
+ for (const d of l) {
902
+ const c = d.trim();
883
903
  if (/^(to\s|[\d.]+deg|[\d.]+turn|[\d.]+rad)/i.test(c)) continue;
884
904
  if (c === "transparent" || c.startsWith("transparent ")) {
885
905
  e.push(a);
886
906
  continue;
887
907
  }
888
- const d = c.replace(/\s+[\d.]+(%|em|px|rem|vh|vw).*$/i, "").trim(), h = C(d);
908
+ const u = c.replace(/\s+[\d.]+(%|em|px|rem|vh|vw).*$/i, "").trim(), h = R(u);
889
909
  h && e.push(h);
890
910
  }
891
911
  return e;
892
912
  }
893
- const pt = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
894
- function ht(t) {
895
- const a = Z.get(t);
913
+ const ft = /* @__PURE__ */ new Set(["IMG", "PICTURE", "VIDEO", "SVG"]);
914
+ function vt(t) {
915
+ const a = ae.get(t);
896
916
  if (a !== void 0) return a;
897
- const e = bt(t);
898
- return Z.set(t, e), e;
917
+ const e = wt(t);
918
+ return ae.set(t, e), e;
899
919
  }
900
- function bt(t) {
920
+ function yt(t) {
921
+ return ft.has(t.tagName) ? !0 : !!t.querySelector("img, picture, video, svg");
922
+ }
923
+ function wt(t) {
901
924
  let a = t, e = !1;
902
925
  for (; a; ) {
903
- const n = x(a).position;
926
+ const n = w(a).position;
904
927
  if ((n === "absolute" || n === "fixed") && (e = !0), a !== t && n !== "static") {
905
- for (const i of a.children)
906
- if (!(i === t || i.contains(t)) && pt.has(i.tagName)) {
928
+ for (const i of a.children) {
929
+ if (i === t || i.contains(t)) continue;
930
+ if (yt(i)) {
907
931
  if (e) return !0;
908
- const s = x(i).position;
909
- if (s === "absolute" || s === "fixed") return !0;
932
+ const o = w(i).position;
933
+ if (o === "absolute" || o === "fixed") return !0;
934
+ }
935
+ const s = w(i);
936
+ if (s.position === "absolute" || s.position === "fixed") {
937
+ const o = s.backgroundImage;
938
+ if (o && o !== "none" && o !== "initial") return !0;
910
939
  }
940
+ }
911
941
  if (e) break;
912
942
  }
913
943
  a = a.parentElement;
914
944
  }
915
945
  return !1;
916
946
  }
917
- function gt(t) {
947
+ function At(t) {
918
948
  const a = parseFloat(t);
919
949
  return t.endsWith("pt") ? a * (4 / 3) : a;
920
950
  }
921
- function ge(t) {
922
- const a = x(t), e = gt(a.fontSize), n = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
951
+ function ve(t) {
952
+ const a = w(t), e = At(a.fontSize), n = parseInt(a.fontWeight) || (a.fontWeight === "bold" ? 700 : 400);
923
953
  return e >= 23.5 || e >= 18.5 && n >= 700;
924
954
  }
925
- const j = /* @__PURE__ */ new Map();
926
- function Ei(t, a) {
927
- j.set(t, a), ee.delete(t);
955
+ function xt(t) {
956
+ const a = De(t), e = [];
957
+ for (const n of a) {
958
+ const i = n.trim();
959
+ if (!i) continue;
960
+ const s = i.match(/rgba?\([^)]+\)/), o = s ? R(s[0]) : null;
961
+ if (!o) return null;
962
+ const r = i.replace(/rgba?\([^)]+\)/, "").match(/[\d.]+px/g), l = r && r.length >= 3 ? parseFloat(r[2]) : 0;
963
+ e.push({ color: o, blur: l });
964
+ }
965
+ return e.length > 0 ? e : null;
966
+ }
967
+ function ye(t) {
968
+ return t === "transparent" || t === "rgba(0, 0, 0, 0)" || t === "rgba(0 0 0 / 0)";
969
+ }
970
+ function kt(t) {
971
+ let a = t;
972
+ for (; a; ) {
973
+ for (const i of ["::before", "::after"])
974
+ try {
975
+ const s = getComputedStyle(a, i), o = s.content;
976
+ if (!o || o === "none" || o === "normal" || o === '""') continue;
977
+ const r = s.backgroundColor;
978
+ if (r && !ye(r) && z(r) >= 0.1) return !0;
979
+ const l = s.backgroundImage;
980
+ if (l && l !== "none" && l !== "initial") return !0;
981
+ const d = s.position;
982
+ if (d === "absolute" || d === "fixed") {
983
+ const c = parseFloat(s.width), u = parseFloat(s.height);
984
+ if (c > 1 && u > 1) return !0;
985
+ }
986
+ } catch {
987
+ }
988
+ const n = w(a).backgroundColor;
989
+ if (n && !ye(n) && z(n) >= 1) break;
990
+ a = a.parentElement;
991
+ }
992
+ return !1;
993
+ }
994
+ const O = /* @__PURE__ */ new Map();
995
+ function Di(t, a) {
996
+ O.set(t, a), ne.delete(t);
928
997
  }
929
- function ft(t, a) {
930
- const e = j.get(a);
998
+ function St(t, a) {
999
+ const e = O.get(a);
931
1000
  return e ? t.map((n) => {
932
1001
  const i = e[n.id];
933
1002
  return i ? {
@@ -937,21 +1006,21 @@ function ft(t, a) {
937
1006
  } : n;
938
1007
  }) : t;
939
1008
  }
940
- const ee = /* @__PURE__ */ new Map();
941
- function vt(t) {
1009
+ const ne = /* @__PURE__ */ new Map();
1010
+ function It(t) {
942
1011
  return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
943
1012
  }
944
- function yt(t) {
1013
+ function Et(t) {
945
1014
  const a = t.split(/\{(\d+)\}/);
946
1015
  let e = "^";
947
1016
  for (let n = 0; n < a.length; n++)
948
- n % 2 === 0 ? e += vt(a[n]) : e += "(.+?)";
1017
+ n % 2 === 0 ? e += It(a[n]) : e += "(.+?)";
949
1018
  return e += "$", new RegExp(e);
950
1019
  }
951
- function wt(t, a) {
952
- let e = ee.get(t);
953
- if (e || (e = /* @__PURE__ */ new Map(), ee.set(t, e)), e.has(a)) return e.get(a);
954
- const n = j.get(t);
1020
+ function qt(t, a) {
1021
+ let e = ne.get(t);
1022
+ if (e || (e = /* @__PURE__ */ new Map(), ne.set(t, e)), e.has(a)) return e.get(a);
1023
+ const n = O.get(t);
955
1024
  if (!n) return;
956
1025
  const i = n[a];
957
1026
  if (!(i != null && i.messages))
@@ -959,31 +1028,31 @@ function wt(t, a) {
959
1028
  const s = [];
960
1029
  for (const [o, r] of Object.entries(i.messages))
961
1030
  s.push({
962
- regex: yt(o),
1031
+ regex: Et(o),
963
1032
  translated: r
964
1033
  });
965
1034
  return e.set(a, s), s;
966
1035
  }
967
- function At(t, a, e) {
968
- const n = wt(e, t);
1036
+ function Lt(t, a, e) {
1037
+ const n = qt(e, t);
969
1038
  if (!n) return a;
970
1039
  for (const { regex: i, translated: s } of n) {
971
1040
  const o = a.match(i);
972
1041
  if (o)
973
1042
  return s.replace(/\{(\d+)\}/g, (r, l) => {
974
- const m = parseInt(l, 10);
975
- return m + 1 < o.length ? o[m + 1] : `{${l}}`;
1043
+ const d = parseInt(l, 10);
1044
+ return d + 1 < o.length ? o[d + 1] : `{${l}}`;
976
1045
  });
977
1046
  }
978
1047
  return a;
979
1048
  }
980
- function Me(t, a) {
981
- return j.has(a) ? t.map((e) => {
982
- const n = At(e.ruleId, e.message, a);
1049
+ function Fe(t, a) {
1050
+ return O.has(a) ? t.map((e) => {
1051
+ const n = Lt(e.ruleId, e.message, a);
983
1052
  return n === e.message ? e : { ...e, message: n };
984
1053
  }) : t;
985
1054
  }
986
- function V(t) {
1055
+ function Y(t) {
987
1056
  var s, o;
988
1057
  const a = [], e = t.closest("a");
989
1058
  if (e) {
@@ -1003,7 +1072,7 @@ function V(t) {
1003
1072
  return a.length > 0 ? a.join(`
1004
1073
  `) : void 0;
1005
1074
  }
1006
- function fe(t) {
1075
+ function we(t) {
1007
1076
  let a = t;
1008
1077
  for (; a; ) {
1009
1078
  if (a instanceof HTMLElement && a.style.visibility === "hidden") return !0;
@@ -1011,7 +1080,7 @@ function fe(t) {
1011
1080
  }
1012
1081
  return !1;
1013
1082
  }
1014
- const xt = {
1083
+ const Rt = {
1015
1084
  id: "accesslint-011",
1016
1085
  actRuleIds: ["23a2a8"],
1017
1086
  wcag: ["1.1.1"],
@@ -1022,7 +1091,7 @@ const xt = {
1022
1091
  run(t) {
1023
1092
  const a = [];
1024
1093
  for (const e of t.querySelectorAll("img")) {
1025
- if (b(e) || fe(e)) continue;
1094
+ if (b(e) || we(e)) continue;
1026
1095
  const n = e.getAttribute("role");
1027
1096
  if (n === "presentation" || n === "none") {
1028
1097
  const s = e.getAttribute("tabindex");
@@ -1033,41 +1102,41 @@ const xt = {
1033
1102
  a.push({
1034
1103
  ruleId: "accesslint-011",
1035
1104
  selector: p(e),
1036
- html: u(e),
1105
+ html: m(e),
1037
1106
  impact: "critical",
1038
1107
  message: 'Image has whitespace-only alt text. Use alt="" for decorative images or provide descriptive text.',
1039
- context: V(e)
1108
+ context: Y(e)
1040
1109
  });
1041
1110
  continue;
1042
1111
  }
1043
- !e.hasAttribute("alt") && !y(e) && a.push({
1112
+ !e.hasAttribute("alt") && !v(e) && a.push({
1044
1113
  ruleId: "accesslint-011",
1045
1114
  selector: p(e),
1046
- html: u(e),
1115
+ html: m(e),
1047
1116
  impact: "critical",
1048
1117
  message: "Image element missing alt attribute.",
1049
- context: V(e)
1118
+ context: Y(e)
1050
1119
  });
1051
1120
  }
1052
1121
  for (const e of t.querySelectorAll('[role="img"]:not(img):not(svg)'))
1053
- b(e) || fe(e) || y(e) || a.push({
1122
+ b(e) || we(e) || v(e) || a.push({
1054
1123
  ruleId: "accesslint-011",
1055
1124
  selector: p(e),
1056
- html: u(e),
1125
+ html: m(e),
1057
1126
  impact: "critical",
1058
1127
  message: 'Element with role="img" has no accessible name. Add aria-label or aria-labelledby.',
1059
- context: V(e)
1128
+ context: Y(e)
1060
1129
  });
1061
1130
  return a;
1062
1131
  }
1063
1132
  };
1064
- function kt(t) {
1133
+ function Ct(t) {
1065
1134
  var s, o, r;
1066
1135
  const a = t.getAttribute("aria-labelledby");
1067
1136
  if (a) {
1068
- const l = a.split(/\s+/).map((m) => {
1069
- var c, d;
1070
- return ((d = (c = t.ownerDocument.getElementById(m)) == null ? void 0 : c.textContent) == null ? void 0 : d.trim()) ?? "";
1137
+ const l = a.split(/\s+/).map((d) => {
1138
+ var c, u;
1139
+ return ((u = (c = t.ownerDocument.getElementById(d)) == null ? void 0 : c.textContent) == null ? void 0 : u.trim()) ?? "";
1071
1140
  }).filter(Boolean);
1072
1141
  if (l.length) return l.join(" ");
1073
1142
  }
@@ -1078,7 +1147,7 @@ function kt(t) {
1078
1147
  const i = (r = t.getAttribute("title")) == null ? void 0 : r.trim();
1079
1148
  return i || "";
1080
1149
  }
1081
- const St = {
1150
+ const Tt = {
1082
1151
  id: "accesslint-012",
1083
1152
  actRuleIds: ["7d6734"],
1084
1153
  wcag: ["1.1.1"],
@@ -1090,12 +1159,12 @@ const St = {
1090
1159
  const a = [], e = 'svg[role="img"], [role="graphics-document"], [role="graphics-symbol"]';
1091
1160
  for (const n of t.querySelectorAll(e)) {
1092
1161
  if (b(n)) continue;
1093
- if (!kt(n)) {
1162
+ if (!Ct(n)) {
1094
1163
  const s = n.getAttribute("role");
1095
1164
  a.push({
1096
1165
  ruleId: "accesslint-012",
1097
1166
  selector: p(n),
1098
- html: u(n),
1167
+ html: m(n),
1099
1168
  impact: "serious",
1100
1169
  message: `${n.tagName.toLowerCase()} with role='${s}' has no accessible name.`
1101
1170
  });
@@ -1103,7 +1172,7 @@ const St = {
1103
1172
  }
1104
1173
  return a;
1105
1174
  }
1106
- }, It = {
1175
+ }, Mt = {
1107
1176
  id: "accesslint-013",
1108
1177
  actRuleIds: ["59796f"],
1109
1178
  wcag: ["1.1.1", "4.1.2"],
@@ -1114,16 +1183,16 @@ const St = {
1114
1183
  run(t) {
1115
1184
  const a = [];
1116
1185
  for (const e of t.querySelectorAll('input[type="image"]'))
1117
- b(e) || y(e) || a.push({
1186
+ b(e) || v(e) || a.push({
1118
1187
  ruleId: "accesslint-013",
1119
1188
  selector: p(e),
1120
- html: u(e),
1189
+ html: m(e),
1121
1190
  impact: "critical",
1122
1191
  message: "Image input missing alt text."
1123
1192
  });
1124
1193
  return a;
1125
1194
  }
1126
- }, Et = {
1195
+ }, Nt = {
1127
1196
  id: "accesslint-014",
1128
1197
  wcag: [],
1129
1198
  level: "A",
@@ -1145,7 +1214,7 @@ const St = {
1145
1214
  a.push({
1146
1215
  ruleId: "accesslint-014",
1147
1216
  selector: p(n),
1148
- html: u(n),
1217
+ html: m(n),
1149
1218
  impact: "minor",
1150
1219
  message: `Alt text "${n.getAttribute("alt")}" duplicates surrounding ${r} text.`,
1151
1220
  context: `Duplicated text: "${n.getAttribute("alt")}", parent element: <${r}>${l ? ` href="${l}"` : ""}`
@@ -1155,7 +1224,7 @@ const St = {
1155
1224
  }
1156
1225
  return a;
1157
1226
  }
1158
- }, qt = ["image", "picture", "photo", "graphic", "icon", "img"], Lt = {
1227
+ }, $t = ["image", "picture", "photo", "graphic", "icon", "img"], Dt = {
1159
1228
  id: "accesslint-015",
1160
1229
  wcag: [],
1161
1230
  level: "A",
@@ -1168,11 +1237,11 @@ const St = {
1168
1237
  for (const e of t.querySelectorAll("img[alt]")) {
1169
1238
  const n = e.getAttribute("alt").toLowerCase();
1170
1239
  if (!n) continue;
1171
- const i = qt.filter((s) => n.split(/\s+/).includes(s));
1240
+ const i = $t.filter((s) => n.split(/\s+/).includes(s));
1172
1241
  i.length > 0 && a.push({
1173
1242
  ruleId: "accesslint-015",
1174
1243
  selector: p(e),
1175
- html: u(e),
1244
+ html: m(e),
1176
1245
  impact: "minor",
1177
1246
  message: `Alt text "${e.getAttribute("alt")}" contains redundant word(s): ${i.join(", ")}.`,
1178
1247
  context: `Current alt: "${e.getAttribute("alt")}", redundant word(s): ${i.join(", ")}`
@@ -1180,7 +1249,7 @@ const St = {
1180
1249
  }
1181
1250
  return a;
1182
1251
  }
1183
- }, Rt = {
1252
+ }, Ft = {
1184
1253
  id: "accesslint-016",
1185
1254
  wcag: ["1.1.1", "4.1.2"],
1186
1255
  level: "A",
@@ -1191,10 +1260,10 @@ const St = {
1191
1260
  const a = [];
1192
1261
  for (const e of t.querySelectorAll("area[href]")) {
1193
1262
  if (b(e)) continue;
1194
- y(e) || a.push({
1263
+ v(e) || a.push({
1195
1264
  ruleId: "accesslint-016",
1196
1265
  selector: p(e),
1197
- html: u(e),
1266
+ html: m(e),
1198
1267
  impact: "critical",
1199
1268
  message: "Image map <area> element is missing alternative text."
1200
1269
  });
@@ -1202,13 +1271,13 @@ const St = {
1202
1271
  return a;
1203
1272
  }
1204
1273
  };
1205
- function Ct(t) {
1274
+ function Pt(t) {
1206
1275
  var i, s;
1207
1276
  const a = t.getAttribute("aria-labelledby");
1208
1277
  if (a) {
1209
1278
  const o = a.split(/\s+/).map((r) => {
1210
- var l, m;
1211
- return ((m = (l = t.ownerDocument.getElementById(r)) == null ? void 0 : l.textContent) == null ? void 0 : m.trim()) ?? "";
1279
+ var l, d;
1280
+ return ((d = (l = t.ownerDocument.getElementById(r)) == null ? void 0 : l.textContent) == null ? void 0 : d.trim()) ?? "";
1212
1281
  }).filter(Boolean);
1213
1282
  if (o.length) return o.join(" ");
1214
1283
  }
@@ -1217,7 +1286,7 @@ function Ct(t) {
1217
1286
  const n = (s = t.getAttribute("title")) == null ? void 0 : s.trim();
1218
1287
  return n || "";
1219
1288
  }
1220
- const Tt = {
1289
+ const Ht = {
1221
1290
  id: "accesslint-017",
1222
1291
  actRuleIds: ["8fc3b6"],
1223
1292
  wcag: ["1.1.1"],
@@ -1238,23 +1307,23 @@ const Tt = {
1238
1307
  }
1239
1308
  i = i.parentElement;
1240
1309
  }
1241
- if (s || n.getAttribute("role") === "presentation" || n.getAttribute("role") === "none" || Ct(n)) continue;
1310
+ if (s || n.getAttribute("role") === "presentation" || n.getAttribute("role") === "none" || Pt(n)) continue;
1242
1311
  const o = n.getAttribute("data") || "";
1243
1312
  if (!((n.getAttribute("type") || "").startsWith("image/") || /\.(png|jpg|jpeg|gif|svg|webp|bmp|ico)$/i.test(o))) {
1244
- const m = n.querySelector("img[alt]");
1245
- if (m && ((e = m.getAttribute("alt")) != null && e.trim())) continue;
1313
+ const d = n.querySelector("img[alt]");
1314
+ if (d && ((e = d.getAttribute("alt")) != null && e.trim())) continue;
1246
1315
  }
1247
1316
  a.push({
1248
1317
  ruleId: "accesslint-017",
1249
1318
  selector: p(n),
1250
- html: u(n),
1319
+ html: m(n),
1251
1320
  impact: "serious",
1252
1321
  message: "<object> element is missing alternative text. Add aria-label, aria-labelledby, or a title attribute."
1253
1322
  });
1254
1323
  }
1255
1324
  return a;
1256
1325
  }
1257
- }, Mt = {
1326
+ }, zt = {
1258
1327
  id: "accesslint-018",
1259
1328
  wcag: ["1.1.1"],
1260
1329
  level: "A",
@@ -1265,10 +1334,10 @@ const Tt = {
1265
1334
  const a = [];
1266
1335
  for (const e of t.querySelectorAll('[role="img"]')) {
1267
1336
  if (b(e) || e.tagName.toLowerCase() === "svg" || e.tagName.toLowerCase() === "img") continue;
1268
- y(e) || a.push({
1337
+ v(e) || a.push({
1269
1338
  ruleId: "accesslint-018",
1270
1339
  selector: p(e),
1271
- html: u(e),
1340
+ html: m(e),
1272
1341
  impact: "serious",
1273
1342
  message: "Element with role='img' has no accessible name. Add aria-label or aria-labelledby."
1274
1343
  });
@@ -1276,7 +1345,7 @@ const Tt = {
1276
1345
  return a;
1277
1346
  }
1278
1347
  };
1279
- function qi(t) {
1348
+ function Fi(t) {
1280
1349
  if (typeof t != "object" || t === null)
1281
1350
  return "Rule spec must be an object";
1282
1351
  const a = t;
@@ -1306,10 +1375,10 @@ function qi(t) {
1306
1375
  return "Rule must have a wcag array";
1307
1376
  if (typeof a.level != "string" || !["A", "AA"].includes(a.level))
1308
1377
  return "Rule must have level A or AA";
1309
- const i = Nt(e);
1378
+ const i = jt(e);
1310
1379
  return i || null;
1311
1380
  }
1312
- function Nt(t) {
1381
+ function jt(t) {
1313
1382
  switch (t.type) {
1314
1383
  case "selector-exists":
1315
1384
  return null;
@@ -1327,7 +1396,7 @@ function Nt(t) {
1327
1396
  return `Unknown check type: ${String(t.type)}`;
1328
1397
  }
1329
1398
  }
1330
- function I(t, a, e) {
1399
+ function q(t, a, e) {
1331
1400
  let n = t;
1332
1401
  if (n.includes("{{tag}}") && (n = n.replace(/\{\{tag\}\}/g, a.tagName.toLowerCase())), n.includes("{{value}}")) {
1333
1402
  let i = "";
@@ -1335,7 +1404,7 @@ function I(t, a, e) {
1335
1404
  }
1336
1405
  return n;
1337
1406
  }
1338
- function q(t) {
1407
+ function T(t) {
1339
1408
  const a = t.skipAriaHidden !== !1;
1340
1409
  return {
1341
1410
  id: t.id,
@@ -1355,25 +1424,25 @@ function q(t) {
1355
1424
  a && b(o) || n.push({
1356
1425
  ruleId: t.id,
1357
1426
  selector: p(o),
1358
- html: u(o),
1427
+ html: m(o),
1359
1428
  impact: t.impact,
1360
- message: I(t.message, o, t.check),
1429
+ message: q(t.message, o, t.check),
1361
1430
  element: o
1362
1431
  });
1363
1432
  break;
1364
1433
  }
1365
1434
  case "attribute-value": {
1366
1435
  const { attribute: o, operator: r, value: l } = t.check;
1367
- for (const m of e.querySelectorAll(t.selector)) {
1368
- if (a && b(m)) continue;
1369
- const c = m.getAttribute(o);
1370
- c !== null && $t(c, r, l) && n.push({
1436
+ for (const d of e.querySelectorAll(t.selector)) {
1437
+ if (a && b(d)) continue;
1438
+ const c = d.getAttribute(o);
1439
+ c !== null && Ut(c, r, l) && n.push({
1371
1440
  ruleId: t.id,
1372
- selector: p(m),
1373
- html: u(m),
1441
+ selector: p(d),
1442
+ html: m(d),
1374
1443
  impact: t.impact,
1375
- message: I(t.message, m, t.check),
1376
- element: m
1444
+ message: q(t.message, d, t.check),
1445
+ element: d
1377
1446
  });
1378
1447
  }
1379
1448
  break;
@@ -1384,40 +1453,40 @@ function q(t) {
1384
1453
  a && b(r) || r.hasAttribute(o) || n.push({
1385
1454
  ruleId: t.id,
1386
1455
  selector: p(r),
1387
- html: u(r),
1456
+ html: m(r),
1388
1457
  impact: t.impact,
1389
- message: I(t.message, r, t.check),
1458
+ message: q(t.message, r, t.check),
1390
1459
  element: r
1391
1460
  });
1392
1461
  break;
1393
1462
  }
1394
1463
  case "attribute-regex": {
1395
- const { attribute: o, pattern: r, flags: l, shouldMatch: m } = t.check;
1464
+ const { attribute: o, pattern: r, flags: l, shouldMatch: d } = t.check;
1396
1465
  let c;
1397
1466
  try {
1398
1467
  c = new RegExp(r, l);
1399
1468
  } catch {
1400
1469
  break;
1401
1470
  }
1402
- for (const d of e.querySelectorAll(t.selector)) {
1403
- if (a && b(d)) continue;
1404
- const h = d.getAttribute(o);
1471
+ for (const u of e.querySelectorAll(t.selector)) {
1472
+ if (a && b(u)) continue;
1473
+ const h = u.getAttribute(o);
1405
1474
  if (h === null) continue;
1406
1475
  const g = c.test(h);
1407
- m && !g ? n.push({
1476
+ d && !g ? n.push({
1408
1477
  ruleId: t.id,
1409
- selector: p(d),
1410
- html: u(d),
1478
+ selector: p(u),
1479
+ html: m(u),
1411
1480
  impact: t.impact,
1412
- message: I(t.message, d, t.check),
1413
- element: d
1414
- }) : !m && g && n.push({
1481
+ message: q(t.message, u, t.check),
1482
+ element: u
1483
+ }) : !d && g && n.push({
1415
1484
  ruleId: t.id,
1416
- selector: p(d),
1417
- html: u(d),
1485
+ selector: p(u),
1486
+ html: m(u),
1418
1487
  impact: t.impact,
1419
- message: I(t.message, d, t.check),
1420
- element: d
1488
+ message: q(t.message, u, t.check),
1489
+ element: u
1421
1490
  });
1422
1491
  }
1423
1492
  break;
@@ -1428,9 +1497,9 @@ function q(t) {
1428
1497
  a && b(r) || r.querySelector(o) || n.push({
1429
1498
  ruleId: t.id,
1430
1499
  selector: p(r),
1431
- html: u(r),
1500
+ html: m(r),
1432
1501
  impact: t.impact,
1433
- message: I(t.message, r, t.check),
1502
+ message: q(t.message, r, t.check),
1434
1503
  element: r
1435
1504
  });
1436
1505
  break;
@@ -1441,19 +1510,19 @@ function q(t) {
1441
1510
  ), r = t.check.allowedChildRoles ? new Set(t.check.allowedChildRoles.map((l) => l.toLowerCase())) : null;
1442
1511
  for (const l of e.querySelectorAll(t.selector)) {
1443
1512
  if (a && b(l)) continue;
1444
- const m = (i = l.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase();
1445
- if (m === "presentation" || m === "none") continue;
1513
+ const d = (i = l.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase();
1514
+ if (d === "presentation" || d === "none") continue;
1446
1515
  let c = !1;
1447
- const d = t.check.allowedChildren.filter(
1516
+ const u = t.check.allowedChildren.filter(
1448
1517
  (h) => h !== "script" && h !== "template"
1449
1518
  );
1450
1519
  for (const h of l.childNodes)
1451
1520
  if (h.nodeType === 3 && h.textContent && h.textContent.trim()) {
1452
- const g = d.map((f) => `<${f}>`).join(" or ");
1521
+ const g = u.map((f) => `<${f}>`).join(" or ");
1453
1522
  n.push({
1454
1523
  ruleId: t.id,
1455
1524
  selector: p(l),
1456
- html: u(l),
1525
+ html: m(l),
1457
1526
  impact: t.impact,
1458
1527
  message: `<${l.tagName.toLowerCase()}> contains direct text content. Wrap in ${g}.`,
1459
1528
  element: l
@@ -1468,9 +1537,9 @@ function q(t) {
1468
1537
  n.push({
1469
1538
  ruleId: t.id,
1470
1539
  selector: p(h),
1471
- html: u(h),
1540
+ html: m(h),
1472
1541
  impact: t.impact,
1473
- message: I(t.message, h, t.check),
1542
+ message: q(t.message, h, t.check),
1474
1543
  element: h
1475
1544
  });
1476
1545
  break;
@@ -1484,7 +1553,7 @@ function q(t) {
1484
1553
  }
1485
1554
  };
1486
1555
  }
1487
- function $t(t, a, e) {
1556
+ function Ut(t, a, e) {
1488
1557
  switch (a) {
1489
1558
  case ">":
1490
1559
  return parseFloat(t) > e;
@@ -1502,7 +1571,7 @@ function $t(t, a, e) {
1502
1571
  return !1;
1503
1572
  }
1504
1573
  }
1505
- const Dt = {
1574
+ const Wt = {
1506
1575
  id: "accesslint-019",
1507
1576
  selector: "img[ismap], input[type='image'][ismap]",
1508
1577
  check: { type: "selector-exists" },
@@ -1513,7 +1582,7 @@ const Dt = {
1513
1582
  level: "A",
1514
1583
  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.",
1515
1584
  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."
1516
- }, Ft = q(Dt), Pt = [
1585
+ }, Ot = T(Wt), Bt = [
1517
1586
  '[role="checkbox"]',
1518
1587
  '[role="combobox"]',
1519
1588
  '[role="listbox"]',
@@ -1525,13 +1594,13 @@ const Dt = {
1525
1594
  '[role="spinbutton"]',
1526
1595
  '[role="switch"]',
1527
1596
  '[role="textbox"]'
1528
- ].join(", "), Ht = /* @__PURE__ */ new Set([
1597
+ ].join(", "), Vt = /* @__PURE__ */ new Set([
1529
1598
  "checkbox",
1530
1599
  "menuitemcheckbox",
1531
1600
  "menuitemradio",
1532
1601
  "radio",
1533
1602
  "switch"
1534
- ]), zt = /* @__PURE__ */ new Set([
1603
+ ]), _t = /* @__PURE__ */ new Set([
1535
1604
  "combobox",
1536
1605
  "listbox",
1537
1606
  "searchbox",
@@ -1539,15 +1608,15 @@ const Dt = {
1539
1608
  "spinbutton",
1540
1609
  "textbox"
1541
1610
  ]);
1542
- function jt(t) {
1543
- var o, r, l, m;
1611
+ function Gt(t) {
1612
+ var o, r, l, d;
1544
1613
  const a = (o = t.getAttribute("role")) == null ? void 0 : o.trim().toLowerCase();
1545
- if (a && Ht.has(a) || (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && !(a && zt.has(a)))
1546
- return y(t);
1614
+ if (a && Vt.has(a) || (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && !(a && _t.has(a)))
1615
+ return v(t);
1547
1616
  const n = t.getAttribute("aria-labelledby");
1548
1617
  if (n) {
1549
- const c = n.split(/\s+/).map((d) => {
1550
- const h = t.ownerDocument.getElementById(d);
1618
+ const c = n.split(/\s+/).map((u) => {
1619
+ const h = t.ownerDocument.getElementById(u);
1551
1620
  return h ? k(h).trim() : "";
1552
1621
  }).filter(Boolean);
1553
1622
  if (c.length) return c.join(" ");
@@ -1556,27 +1625,27 @@ function jt(t) {
1556
1625
  if (i) return i;
1557
1626
  if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) {
1558
1627
  if (t.id) {
1559
- const d = t.ownerDocument.querySelector(`label[for="${CSS.escape(t.id)}"]`);
1560
- if (d) {
1561
- const h = k(d).trim();
1628
+ const u = t.ownerDocument.querySelector(`label[for="${CSS.escape(t.id)}"]`);
1629
+ if (u) {
1630
+ const h = k(u).trim();
1562
1631
  if (h) return h;
1563
1632
  }
1564
1633
  }
1565
1634
  const c = t.closest("label");
1566
1635
  if (c) {
1567
- const d = k(c).trim();
1568
- if (d) return d;
1636
+ const u = k(c).trim();
1637
+ if (u) return u;
1569
1638
  }
1570
1639
  }
1571
1640
  const s = (l = t.getAttribute("title")) == null ? void 0 : l.trim();
1572
1641
  if (s) return s;
1573
1642
  if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) {
1574
- const c = (m = t.getAttribute("placeholder")) == null ? void 0 : m.trim();
1643
+ const c = (d = t.getAttribute("placeholder")) == null ? void 0 : d.trim();
1575
1644
  if (c) return c;
1576
1645
  }
1577
1646
  return "";
1578
1647
  }
1579
- const Ut = {
1648
+ const Yt = {
1580
1649
  id: "accesslint-020",
1581
1650
  actRuleIds: ["e086e5"],
1582
1651
  wcag: ["4.1.2"],
@@ -1586,23 +1655,23 @@ const Ut = {
1586
1655
  prompt: `This form field has no accessible label. Based on the context (input type, name attribute, placeholder, or surrounding elements), suggest adding a <label for="id"> element with descriptive text, or an aria-label attribute. The label should describe what information the user should enter, not the field type. For example: 'Email address', 'Search', 'Phone number'.`,
1587
1656
  run(t) {
1588
1657
  var i;
1589
- const a = [], n = t.querySelectorAll(`input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, ${Pt}`);
1658
+ const a = [], n = t.querySelectorAll(`input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, ${Bt}`);
1590
1659
  for (const s of n) {
1591
- if (b(s) || T(s)) continue;
1660
+ if (b(s) || N(s)) continue;
1592
1661
  const o = (i = s.getAttribute("role")) == null ? void 0 : i.trim().toLowerCase();
1593
1662
  if (o === "presentation" || o === "none") continue;
1594
- if (!jt(s)) {
1595
- const l = [], m = s.tagName.toLowerCase(), c = s.getAttribute("type");
1596
- c && m === "input" && l.push(`type: ${c}`);
1597
- const d = s.getAttribute("name");
1598
- d && l.push(`name: "${d}"`);
1663
+ if (!Gt(s)) {
1664
+ const l = [], d = s.tagName.toLowerCase(), c = s.getAttribute("type");
1665
+ c && d === "input" && l.push(`type: ${c}`);
1666
+ const u = s.getAttribute("name");
1667
+ u && l.push(`name: "${u}"`);
1599
1668
  const h = s.getAttribute("placeholder");
1600
1669
  h && l.push(`placeholder: "${h}"`), o && l.push(`role: ${o}`);
1601
1670
  const g = s.getAttribute("id");
1602
1671
  g && l.push(`id: "${g}"`), a.push({
1603
1672
  ruleId: "accesslint-020",
1604
1673
  selector: p(s),
1605
- html: u(s),
1674
+ html: m(s),
1606
1675
  impact: "critical",
1607
1676
  message: "Form element has no accessible label.",
1608
1677
  context: l.length > 0 ? l.join(", ") : void 0
@@ -1611,7 +1680,7 @@ const Ut = {
1611
1680
  }
1612
1681
  return a;
1613
1682
  }
1614
- }, Wt = {
1683
+ }, Xt = {
1615
1684
  id: "accesslint-021",
1616
1685
  wcag: [],
1617
1686
  level: "A",
@@ -1636,14 +1705,14 @@ const Ut = {
1636
1705
  r > 1 && a.push({
1637
1706
  ruleId: "accesslint-021",
1638
1707
  selector: p(n),
1639
- html: u(n),
1708
+ html: m(n),
1640
1709
  impact: "moderate",
1641
1710
  message: `Form field has ${r} labels. Use a single label element.`
1642
1711
  });
1643
1712
  }
1644
1713
  return a;
1645
1714
  }
1646
- }, Ot = {
1715
+ }, Kt = {
1647
1716
  id: "accesslint-022",
1648
1717
  wcag: ["4.1.2"],
1649
1718
  level: "A",
@@ -1653,16 +1722,16 @@ const Ut = {
1653
1722
  run(t) {
1654
1723
  const a = [];
1655
1724
  for (const e of t.querySelectorAll("select"))
1656
- b(e) || y(e) || a.push({
1725
+ b(e) || v(e) || a.push({
1657
1726
  ruleId: "accesslint-022",
1658
1727
  selector: p(e),
1659
- html: u(e),
1728
+ html: m(e),
1660
1729
  impact: "critical",
1661
1730
  message: "Select element has no accessible name."
1662
1731
  });
1663
1732
  return a;
1664
1733
  }
1665
- }, Bt = {
1734
+ }, Jt = {
1666
1735
  id: "accesslint-023",
1667
1736
  wcag: ["4.1.2"],
1668
1737
  level: "A",
@@ -1677,17 +1746,17 @@ const Ut = {
1677
1746
  )) {
1678
1747
  if (b(i)) continue;
1679
1748
  const s = (e = i.getAttribute("value")) == null ? void 0 : e.trim(), o = (n = i.getAttribute("type")) == null ? void 0 : n.toLowerCase(), r = (o === "submit" || o === "reset") && !i.hasAttribute("value");
1680
- !s && !r && !y(i) && a.push({
1749
+ !s && !r && !v(i) && a.push({
1681
1750
  ruleId: "accesslint-023",
1682
1751
  selector: p(i),
1683
- html: u(i),
1752
+ html: m(i),
1684
1753
  impact: "critical",
1685
1754
  message: "Input button has no discernible text."
1686
1755
  });
1687
1756
  }
1688
1757
  return a;
1689
1758
  }
1690
- }, Vt = /* @__PURE__ */ new Set([
1759
+ }, Qt = /* @__PURE__ */ new Set([
1691
1760
  "off",
1692
1761
  "on",
1693
1762
  "name",
@@ -1742,7 +1811,7 @@ const Ut = {
1742
1811
  "impp",
1743
1812
  "url",
1744
1813
  "photo"
1745
- ]), _t = /* @__PURE__ */ new Set([
1814
+ ]), Zt = /* @__PURE__ */ new Set([
1746
1815
  "tel",
1747
1816
  "tel-country-code",
1748
1817
  "tel-national",
@@ -1751,18 +1820,18 @@ const Ut = {
1751
1820
  "tel-extension",
1752
1821
  "email",
1753
1822
  "impp"
1754
- ]), Gt = /* @__PURE__ */ new Set(["home", "work", "mobile", "fax", "pager"]), Yt = /* @__PURE__ */ new Set(["shipping", "billing"]), Xt = /* @__PURE__ */ new Set(["webauthn"]);
1755
- function Kt(t) {
1823
+ ]), ea = /* @__PURE__ */ new Set(["home", "work", "mobile", "fax", "pager"]), ta = /* @__PURE__ */ new Set(["shipping", "billing"]), aa = /* @__PURE__ */ new Set(["webauthn"]);
1824
+ function na(t) {
1756
1825
  const a = t.toLowerCase().split(/\s+/).filter(Boolean);
1757
1826
  if (a.length === 0) return !0;
1758
1827
  let e = 0;
1759
- a[e].startsWith("section-") && e++, e < a.length && Yt.has(a[e]) && e++;
1828
+ a[e].startsWith("section-") && e++, e < a.length && ta.has(a[e]) && e++;
1760
1829
  let n = !1;
1761
- if (e < a.length && Gt.has(a[e]) && (n = !0, e++), e >= a.length) return !1;
1830
+ if (e < a.length && ea.has(a[e]) && (n = !0, e++), e >= a.length) return !1;
1762
1831
  const i = a[e];
1763
- return !Vt.has(i) || n && !_t.has(i) ? !1 : (e++, e < a.length && Xt.has(a[e]) && e++, e === a.length);
1832
+ return !Qt.has(i) || n && !Zt.has(i) ? !1 : (e++, e < a.length && aa.has(a[e]) && e++, e === a.length);
1764
1833
  }
1765
- const Jt = {
1834
+ const ia = {
1766
1835
  id: "accesslint-024",
1767
1836
  actRuleIds: ["73f2c2"],
1768
1837
  wcag: ["1.3.5"],
@@ -1775,10 +1844,10 @@ const Jt = {
1775
1844
  for (const e of t.querySelectorAll("[autocomplete]")) {
1776
1845
  if (b(e) || e instanceof HTMLElement && e.style.display === "none" || e.disabled || e.getAttribute("aria-disabled") === "true") continue;
1777
1846
  const n = e.getAttribute("autocomplete").trim();
1778
- n && (Kt(n) || a.push({
1847
+ n && (na(n) || a.push({
1779
1848
  ruleId: "accesslint-024",
1780
1849
  selector: p(e),
1781
- html: u(e),
1850
+ html: m(e),
1782
1851
  impact: "serious",
1783
1852
  message: `Invalid autocomplete value "${n}".`
1784
1853
  }));
@@ -1786,16 +1855,16 @@ const Jt = {
1786
1855
  return a;
1787
1856
  }
1788
1857
  };
1789
- function ve(t) {
1858
+ function Ae(t) {
1790
1859
  return t.toLowerCase().replace(/\s+/g, " ").trim();
1791
1860
  }
1792
- function ye(t, a) {
1793
- const e = ve(t), n = ve(a);
1861
+ function xe(t, a) {
1862
+ const e = Ae(t), n = Ae(a);
1794
1863
  if (!e || !n || e.includes(n) || n.includes(e)) return !0;
1795
1864
  const i = n.split(/\s+/).map((s) => s.replace(/[.,;:!?\u2026]+$/g, "")).filter((s) => s.length > 2);
1796
1865
  return i.length >= 2 && i.filter((o) => e.includes(o)).length / i.length > 0.5;
1797
1866
  }
1798
- function te(t) {
1867
+ function ie(t) {
1799
1868
  let a = "";
1800
1869
  for (const e of t.childNodes)
1801
1870
  if (e.nodeType === 3)
@@ -1805,11 +1874,11 @@ function te(t) {
1805
1874
  if (i === "style" || i === "script" || i === "svg" || n.getAttribute("aria-hidden") === "true" || n instanceof HTMLElement && n.style.display === "none") continue;
1806
1875
  const s = n.getAttribute("role");
1807
1876
  if (s === "img" || s === "presentation" || s === "none") continue;
1808
- a += te(n);
1877
+ a += ie(n);
1809
1878
  }
1810
1879
  return a;
1811
1880
  }
1812
- const Qt = {
1881
+ const sa = {
1813
1882
  id: "accesslint-025",
1814
1883
  actRuleIds: ["2ee8b8"],
1815
1884
  wcag: [],
@@ -1822,42 +1891,42 @@ const Qt = {
1822
1891
  const a = [];
1823
1892
  for (const e of t.querySelectorAll('button, [role="button"], a[href], input[type="submit"], input[type="button"]')) {
1824
1893
  if (b(e)) continue;
1825
- const n = y(e);
1894
+ const n = v(e);
1826
1895
  if (!n) continue;
1827
1896
  let i = "";
1828
- e instanceof HTMLInputElement ? i = e.value || "" : i = te(e);
1897
+ e instanceof HTMLInputElement ? i = e.value || "" : i = ie(e);
1829
1898
  const s = i.trim();
1830
1899
  if (!s || s.length <= 2) continue;
1831
1900
  const o = e.hasAttribute("aria-label"), r = e.hasAttribute("aria-labelledby");
1832
- !o && !r || ye(n, i) || a.push({
1901
+ !o && !r || xe(n, i) || a.push({
1833
1902
  ruleId: "accesslint-025",
1834
1903
  selector: p(e),
1835
- html: u(e),
1904
+ html: m(e),
1836
1905
  impact: "serious",
1837
1906
  message: `Accessible name "${n}" does not contain visible text "${i.trim()}".`
1838
1907
  });
1839
1908
  }
1840
1909
  for (const e of t.querySelectorAll("input, select, textarea")) {
1841
1910
  if (b(e) || e instanceof HTMLInputElement && ["hidden", "submit", "button", "image"].includes(e.type)) continue;
1842
- const n = y(e);
1911
+ const n = v(e);
1843
1912
  if (!n || !e.hasAttribute("aria-label")) continue;
1844
1913
  const s = e.id;
1845
1914
  let o = "";
1846
1915
  if (s) {
1847
1916
  const r = t.querySelector(`label[for="${CSS.escape(s)}"]`);
1848
- r && (o = te(r));
1917
+ r && (o = ie(r));
1849
1918
  }
1850
- o.trim() && (ye(n, o) || a.push({
1919
+ o.trim() && (xe(n, o) || a.push({
1851
1920
  ruleId: "accesslint-025",
1852
1921
  selector: p(e),
1853
- html: u(e),
1922
+ html: m(e),
1854
1923
  impact: "serious",
1855
1924
  message: `Accessible name "${n}" does not contain visible label "${o.trim()}".`
1856
1925
  }));
1857
1926
  }
1858
1927
  return a;
1859
1928
  }
1860
- }, Zt = {
1929
+ }, oa = {
1861
1930
  id: "accesslint-026",
1862
1931
  wcag: [],
1863
1932
  level: "A",
@@ -1872,25 +1941,25 @@ const Qt = {
1872
1941
  );
1873
1942
  for (const r of e) {
1874
1943
  if (b(r)) continue;
1875
- const l = r.hasAttribute("title") && ((n = r.getAttribute("title")) == null ? void 0 : n.trim()), m = r.hasAttribute("aria-label") && ((i = r.getAttribute("aria-label")) == null ? void 0 : i.trim()), c = r.hasAttribute("aria-labelledby");
1876
- let d = !1;
1944
+ const l = r.hasAttribute("title") && ((n = r.getAttribute("title")) == null ? void 0 : n.trim()), d = r.hasAttribute("aria-label") && ((i = r.getAttribute("aria-label")) == null ? void 0 : i.trim()), c = r.hasAttribute("aria-labelledby");
1945
+ let u = !1;
1877
1946
  const h = r.id;
1878
1947
  if (h) {
1879
1948
  const f = r.ownerDocument.querySelector(`label[for="${CSS.escape(h)}"]`);
1880
- (s = f == null ? void 0 : f.textContent) != null && s.trim() && (d = !0);
1949
+ (s = f == null ? void 0 : f.textContent) != null && s.trim() && (u = !0);
1881
1950
  }
1882
1951
  const g = r.closest("label");
1883
- (o = g == null ? void 0 : g.textContent) != null && o.trim() && (d = !0), l && !m && !c && !d && a.push({
1952
+ (o = g == null ? void 0 : g.textContent) != null && o.trim() && (u = !0), l && !d && !c && !u && a.push({
1884
1953
  ruleId: "accesslint-026",
1885
1954
  selector: p(r),
1886
- html: u(r),
1955
+ html: m(r),
1887
1956
  impact: "serious",
1888
1957
  message: "Form element uses title attribute as only label. Use <label>, aria-label, or aria-labelledby instead."
1889
1958
  });
1890
1959
  }
1891
1960
  return a;
1892
1961
  }
1893
- }, ea = {
1962
+ }, ra = {
1894
1963
  id: "accesslint-027",
1895
1964
  selector: "[tabindex]",
1896
1965
  check: { type: "attribute-value", attribute: "tabindex", operator: ">", value: 0 },
@@ -1902,7 +1971,7 @@ const Qt = {
1902
1971
  tags: ["best-practice"],
1903
1972
  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.",
1904
1973
  prompt: "Change the positive tabindex value to tabindex='0' and rely on DOM order for tab sequence instead."
1905
- }, ta = q(ea), aa = /* @__PURE__ */ new Set([
1974
+ }, la = T(ra), ca = /* @__PURE__ */ new Set([
1906
1975
  "div",
1907
1976
  "span",
1908
1977
  "p",
@@ -1929,7 +1998,7 @@ const Qt = {
1929
1998
  "tr",
1930
1999
  "td",
1931
2000
  "th"
1932
- ]), na = {
2001
+ ]), da = {
1933
2002
  id: "accesslint-028",
1934
2003
  wcag: [],
1935
2004
  tags: ["best-practice"],
@@ -1941,18 +2010,18 @@ const Qt = {
1941
2010
  const a = [];
1942
2011
  for (const e of t.querySelectorAll('[tabindex="0"]')) {
1943
2012
  const n = e.tagName.toLowerCase();
1944
- if (!aa.has(n)) continue;
2013
+ if (!ca.has(n)) continue;
1945
2014
  e.getAttribute("role") || a.push({
1946
2015
  ruleId: "accesslint-028",
1947
2016
  selector: p(e),
1948
- html: u(e),
2017
+ html: m(e),
1949
2018
  impact: "moderate",
1950
2019
  message: `Non-interactive <${n}> with tabindex="0" has no interactive role.`
1951
2020
  });
1952
2021
  }
1953
2022
  return a;
1954
2023
  }
1955
- }, ia = /* @__PURE__ */ new Set([
2024
+ }, ua = /* @__PURE__ */ new Set([
1956
2025
  "a",
1957
2026
  "audio",
1958
2027
  "button",
@@ -1961,7 +2030,7 @@ const Qt = {
1961
2030
  "select",
1962
2031
  "textarea",
1963
2032
  "video"
1964
- ]), sa = /* @__PURE__ */ new Set([
2033
+ ]), ma = /* @__PURE__ */ new Set([
1965
2034
  "button",
1966
2035
  "checkbox",
1967
2036
  "combobox",
@@ -1985,7 +2054,7 @@ const Qt = {
1985
2054
  "tabpanel",
1986
2055
  "textbox",
1987
2056
  "treeitem"
1988
- ]), oa = {
2057
+ ]), pa = {
1989
2058
  grid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader"]),
1990
2059
  listbox: /* @__PURE__ */ new Set(["option"]),
1991
2060
  menu: /* @__PURE__ */ new Set(["menuitem", "menuitemcheckbox", "menuitemradio"]),
@@ -1995,26 +2064,26 @@ const Qt = {
1995
2064
  tree: /* @__PURE__ */ new Set(["treeitem"]),
1996
2065
  treegrid: /* @__PURE__ */ new Set(["gridcell", "row", "columnheader", "rowheader", "treeitem"])
1997
2066
  };
1998
- function ra(t, a) {
2067
+ function ha(t, a) {
1999
2068
  var i, s, o;
2000
2069
  const e = (i = t.getAttribute("role")) == null ? void 0 : i.toLowerCase(), n = (s = a.getAttribute("role")) == null ? void 0 : s.toLowerCase();
2001
- return !e || !n ? !1 : ((o = oa[e]) == null ? void 0 : o.has(n)) ?? !1;
2070
+ return !e || !n ? !1 : ((o = pa[e]) == null ? void 0 : o.has(n)) ?? !1;
2002
2071
  }
2003
- function la(t) {
2072
+ function ba(t) {
2004
2073
  var i;
2005
2074
  const a = t.tagName.toLowerCase();
2006
- if (ia.has(a))
2075
+ if (ua.has(a))
2007
2076
  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);
2008
2077
  const e = (i = t.getAttribute("role")) == null ? void 0 : i.toLowerCase();
2009
- if (e && sa.has(e)) return !0;
2078
+ if (e && ma.has(e)) return !0;
2010
2079
  const n = t.getAttribute("tabindex");
2011
2080
  return n !== null && n !== "-1" || t.getAttribute("contenteditable") === "true";
2012
2081
  }
2013
- function ca(t) {
2082
+ function ga(t) {
2014
2083
  const a = t.tagName.toLowerCase();
2015
2084
  return !!(a === "a" && t.hasAttribute("href") || a === "button" && !t.disabled);
2016
2085
  }
2017
- const da = {
2086
+ const fa = {
2018
2087
  id: "accesslint-029",
2019
2088
  wcag: ["4.1.2"],
2020
2089
  level: "A",
@@ -2029,24 +2098,24 @@ const da = {
2029
2098
  for (; o; ) {
2030
2099
  for (; s.length > 0 && !s[s.length - 1].contains(o); )
2031
2100
  s.pop();
2032
- if (!b(o) && la(o)) {
2101
+ if (!b(o) && ba(o)) {
2033
2102
  if (s.length > 0) {
2034
2103
  const r = s[s.length - 1];
2035
- ra(r, o) || a.push({
2104
+ ha(r, o) || a.push({
2036
2105
  ruleId: "accesslint-029",
2037
2106
  selector: p(o),
2038
- html: u(o),
2107
+ html: m(o),
2039
2108
  impact: "serious",
2040
2109
  message: `Interactive element <${o.tagName.toLowerCase()}> is nested inside <${r.tagName.toLowerCase()}>.`
2041
2110
  });
2042
2111
  }
2043
- ca(o) && s.push(o);
2112
+ ga(o) && s.push(o);
2044
2113
  }
2045
2114
  o = i.nextNode();
2046
2115
  }
2047
2116
  return a;
2048
2117
  }
2049
- }, ua = {
2118
+ }, va = {
2050
2119
  id: "accesslint-030",
2051
2120
  actRuleIds: ["0ssw9k"],
2052
2121
  wcag: ["2.1.1"],
@@ -2055,39 +2124,37 @@ const da = {
2055
2124
  guidance: "Content that scrolls must be accessible to keyboard users. If a region has overflow:scroll or overflow:auto and contains scrollable content, it needs either tabindex='0' to be focusable, or it must contain focusable elements. Without this, keyboard users cannot scroll the content.",
2056
2125
  prompt: "Explain how to make this scrollable region keyboard accessible.",
2057
2126
  run(t) {
2058
- var e, n;
2127
+ var e;
2059
2128
  const a = [];
2060
- for (const i of t.querySelectorAll("*")) {
2061
- if (b(i) || !(i instanceof HTMLElement)) continue;
2062
- const s = i.tagName.toLowerCase();
2063
- if (s === "body" || s === "html") continue;
2064
- const o = i.getAttribute("role");
2065
- if (o === "presentation" || o === "none") continue;
2066
- const r = x(i), l = r.overflowX, m = r.overflowY;
2067
- if (!(l === "scroll" || l === "auto" || m === "scroll" || m === "auto")) continue;
2068
- if (i.scrollHeight > 0 || i.clientHeight > 0) {
2069
- const f = i.scrollHeight - i.clientHeight, v = i.scrollWidth - i.clientWidth;
2070
- if (f <= 0 && v <= 0 || f < 14 && v < 14 || i.clientWidth < 64 && i.clientHeight < 64) continue;
2071
- const A = ((e = i.textContent) == null ? void 0 : e.trim().length) ?? 0, w = i.querySelector("img, svg, video, canvas, picture") !== null;
2072
- if (A === 0 && !w) continue;
2073
- } else {
2074
- const f = r.height !== "" || r.maxHeight !== "", v = ((n = i.textContent) == null ? void 0 : n.trim().length) ?? 0;
2075
- if (!f || v <= 50) continue;
2076
- }
2077
- const h = i.getAttribute("tabindex");
2078
- h !== null && h !== "-1" || i.querySelector(
2129
+ for (const n of t.querySelectorAll("*")) {
2130
+ if (b(n) || !(n instanceof HTMLElement)) continue;
2131
+ const i = n.tagName.toLowerCase();
2132
+ if (i === "body" || i === "html") continue;
2133
+ const s = n.getAttribute("role");
2134
+ if (s === "presentation" || s === "none" || s === "listbox" || s === "menu" || s === "tree" || s === "tabpanel") continue;
2135
+ const o = w(n), r = o.overflowX, l = o.overflowY;
2136
+ if (!(r === "scroll" || r === "auto" || l === "scroll" || l === "auto")) continue;
2137
+ if (n.scrollHeight > 0 || n.clientHeight > 0) {
2138
+ const g = n.scrollHeight - n.clientHeight, f = n.scrollWidth - n.clientWidth;
2139
+ if (g <= 0 && f <= 0 || g < 14 && f < 14 || n.clientWidth < 64 && n.clientHeight < 64) continue;
2140
+ const y = ((e = n.textContent) == null ? void 0 : e.trim().length) ?? 0, A = n.querySelector("img, svg, video, canvas, picture") !== null;
2141
+ if (y === 0 && !A) continue;
2142
+ } else
2143
+ continue;
2144
+ const u = n.getAttribute("tabindex");
2145
+ u !== null && u !== "-1" || n.querySelector(
2079
2146
  'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
2080
2147
  ) || a.push({
2081
2148
  ruleId: "accesslint-030",
2082
- selector: p(i),
2083
- html: u(i),
2149
+ selector: p(n),
2150
+ html: m(n),
2084
2151
  impact: "serious",
2085
2152
  message: "Scrollable region is not keyboard accessible. Add tabindex='0' or include focusable elements."
2086
2153
  });
2087
2154
  }
2088
2155
  return a;
2089
2156
  }
2090
- }, ma = {
2157
+ }, ya = {
2091
2158
  id: "accesslint-031",
2092
2159
  wcag: [],
2093
2160
  level: "A",
@@ -2111,20 +2178,20 @@ const da = {
2111
2178
  a.push({
2112
2179
  ruleId: "accesslint-031",
2113
2180
  selector: p(o),
2114
- html: u(o),
2181
+ html: m(o),
2115
2182
  impact: "serious",
2116
2183
  message: `Duplicate accesskey "${i}". Each accesskey must be unique.`
2117
2184
  });
2118
2185
  return a;
2119
2186
  }
2120
- }, pa = [
2187
+ }, wa = [
2121
2188
  "a[href]",
2122
2189
  "button:not([disabled])",
2123
2190
  'input:not([disabled]):not([type="hidden"])',
2124
2191
  "select:not([disabled])",
2125
2192
  "textarea:not([disabled])",
2126
2193
  '[tabindex]:not([tabindex="-1"])'
2127
- ].join(", "), ha = {
2194
+ ].join(", "), Aa = {
2128
2195
  id: "accesslint-032",
2129
2196
  actRuleIds: ["oj04fd"],
2130
2197
  wcag: ["2.4.7"],
@@ -2133,7 +2200,7 @@ const da = {
2133
2200
  guidance: "Keyboard users need to see which element has focus. Do not remove the default focus outline (outline: none) without providing an alternative visible indicator. Use :focus-visible or :focus styles to ensure focus is always perceivable.",
2134
2201
  run(t) {
2135
2202
  const a = [];
2136
- for (const e of t.querySelectorAll(pa)) {
2203
+ for (const e of t.querySelectorAll(wa)) {
2137
2204
  if (b(e) || !(e instanceof HTMLElement)) continue;
2138
2205
  const n = e.getAttribute("style") || "";
2139
2206
  if (/outline\s*:\s*(none|0)\s*(;|$|!)/i.test(n)) {
@@ -2141,7 +2208,7 @@ const da = {
2141
2208
  !s && !o && a.push({
2142
2209
  ruleId: "accesslint-032",
2143
2210
  selector: p(e),
2144
- html: u(e),
2211
+ html: m(e),
2145
2212
  impact: "serious",
2146
2213
  message: "Focusable element has outline removed without a visible focus alternative."
2147
2214
  });
@@ -2149,7 +2216,7 @@ const da = {
2149
2216
  }
2150
2217
  return a;
2151
2218
  }
2152
- }, ba = {
2219
+ }, xa = {
2153
2220
  id: "accesslint-033",
2154
2221
  wcag: [],
2155
2222
  level: "A",
@@ -2166,15 +2233,15 @@ const da = {
2166
2233
  s.hasAttribute("aria-level") ? o = parseInt(s.getAttribute("aria-level"), 10) : o = parseInt(s.tagName[1], 10), n > 0 && o > n + 1 && a.push({
2167
2234
  ruleId: "accesslint-033",
2168
2235
  selector: p(s),
2169
- html: u(s),
2236
+ html: m(s),
2170
2237
  impact: "moderate",
2171
2238
  message: `Heading level ${o} skipped from level ${n}.`,
2172
- context: i ? `Previous heading: ${u(i)}` : void 0
2239
+ context: i ? `Previous heading: ${m(i)}` : void 0
2173
2240
  }), n = o, i = s;
2174
2241
  }
2175
2242
  return a;
2176
2243
  }
2177
- }, U = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', we = '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"]', ga = {
2244
+ }, B = 'article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]', ke = '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"]', ka = {
2178
2245
  id: "accesslint-036",
2179
2246
  wcag: [],
2180
2247
  level: "A",
@@ -2193,12 +2260,12 @@ const da = {
2193
2260
  }] : a.length > 1 ? Array.from(a).slice(1).map((e) => ({
2194
2261
  ruleId: "accesslint-036",
2195
2262
  selector: p(e),
2196
- html: u(e),
2263
+ html: m(e),
2197
2264
  impact: "moderate",
2198
2265
  message: "Page has multiple main landmarks."
2199
2266
  })) : [];
2200
2267
  }
2201
- }, fa = {
2268
+ }, Sa = {
2202
2269
  id: "accesslint-037",
2203
2270
  wcag: [],
2204
2271
  level: "A",
@@ -2207,18 +2274,18 @@ const da = {
2207
2274
  guidance: "The banner landmark (typically <header>) identifies site-oriented content like logos and search. Only one top-level banner is allowed per page. If you need multiple headers, nest them inside sectioning elements (article, section, aside) where they become scoped headers rather than page-level banners.",
2208
2275
  prompt: "Explain whether to remove this duplicate banner or nest it inside a sectioning element.",
2209
2276
  run(t) {
2210
- const a = [], e = t.querySelectorAll('header, [role="banner"]'), n = Array.from(e).filter((i) => !i.closest(U));
2277
+ const a = [], e = t.querySelectorAll('header, [role="banner"]'), n = Array.from(e).filter((i) => !i.closest(B));
2211
2278
  return n.length > 1 && n.slice(1).forEach(
2212
2279
  (i) => a.push({
2213
2280
  ruleId: "accesslint-037",
2214
2281
  selector: p(i),
2215
- html: u(i),
2282
+ html: m(i),
2216
2283
  impact: "moderate",
2217
2284
  message: "Page has multiple banner landmarks."
2218
2285
  })
2219
2286
  ), a;
2220
2287
  }
2221
- }, va = {
2288
+ }, Ia = {
2222
2289
  id: "accesslint-038",
2223
2290
  wcag: [],
2224
2291
  level: "A",
@@ -2227,18 +2294,18 @@ const da = {
2227
2294
  guidance: "The contentinfo landmark (typically <footer>) contains information about the page like copyright and contact info. Only one top-level contentinfo is allowed per page. Nest additional footers inside sectioning elements to scope them.",
2228
2295
  prompt: "Explain whether to remove this duplicate footer or nest it inside a sectioning element.",
2229
2296
  run(t) {
2230
- const a = [], e = t.querySelectorAll('footer, [role="contentinfo"]'), n = Array.from(e).filter((i) => !i.closest(U));
2297
+ const a = [], e = t.querySelectorAll('footer, [role="contentinfo"]'), n = Array.from(e).filter((i) => !i.closest(B));
2231
2298
  return n.length > 1 && n.slice(1).forEach(
2232
2299
  (i) => a.push({
2233
2300
  ruleId: "accesslint-038",
2234
2301
  selector: p(i),
2235
- html: u(i),
2302
+ html: m(i),
2236
2303
  impact: "moderate",
2237
2304
  message: "Page has multiple contentinfo landmarks."
2238
2305
  })
2239
2306
  ), a;
2240
2307
  }
2241
- }, ya = {
2308
+ }, Ea = {
2242
2309
  id: "accesslint-039",
2243
2310
  wcag: [],
2244
2311
  level: "A",
@@ -2252,13 +2319,13 @@ const da = {
2252
2319
  (n) => a.push({
2253
2320
  ruleId: "accesslint-039",
2254
2321
  selector: p(n),
2255
- html: u(n),
2322
+ html: m(n),
2256
2323
  impact: "moderate",
2257
2324
  message: "Page has multiple main landmarks."
2258
2325
  })
2259
2326
  ), a;
2260
2327
  }
2261
- }, wa = {
2328
+ }, qa = {
2262
2329
  id: "accesslint-040",
2263
2330
  wcag: [],
2264
2331
  level: "A",
@@ -2269,16 +2336,16 @@ const da = {
2269
2336
  run(t) {
2270
2337
  const a = [], e = t.querySelectorAll('[role="banner"]');
2271
2338
  for (const n of e)
2272
- n.closest(U) && a.push({
2339
+ n.closest(B) && a.push({
2273
2340
  ruleId: "accesslint-040",
2274
2341
  selector: p(n),
2275
- html: u(n),
2342
+ html: m(n),
2276
2343
  impact: "moderate",
2277
2344
  message: "Banner landmark is nested within another landmark."
2278
2345
  });
2279
2346
  return a;
2280
2347
  }
2281
- }, Aa = {
2348
+ }, La = {
2282
2349
  id: "accesslint-041",
2283
2350
  wcag: [],
2284
2351
  level: "A",
@@ -2289,16 +2356,16 @@ const da = {
2289
2356
  run(t) {
2290
2357
  const a = [], e = t.querySelectorAll('[role="contentinfo"]');
2291
2358
  for (const n of e)
2292
- n.closest(U) && a.push({
2359
+ n.closest(B) && a.push({
2293
2360
  ruleId: "accesslint-041",
2294
2361
  selector: p(n),
2295
- html: u(n),
2362
+ html: m(n),
2296
2363
  impact: "moderate",
2297
2364
  message: "Contentinfo landmark is nested within another landmark."
2298
2365
  });
2299
2366
  return a;
2300
2367
  }
2301
- }, xa = {
2368
+ }, Ra = {
2302
2369
  id: "accesslint-042",
2303
2370
  wcag: [],
2304
2371
  level: "A",
@@ -2310,17 +2377,17 @@ const da = {
2310
2377
  const a = [], e = t.querySelectorAll('main, [role="main"]');
2311
2378
  for (const n of e) {
2312
2379
  const i = n.parentElement;
2313
- i != null && i.closest('article, aside, nav, section, [role="article"], [role="complementary"], [role="navigation"], [role="region"]') && a.push({
2380
+ i != null && i.closest('article, aside, nav, section[aria-label], section[aria-labelledby], [role="article"], [role="complementary"], [role="navigation"], [role="region"]') && a.push({
2314
2381
  ruleId: "accesslint-042",
2315
2382
  selector: p(n),
2316
- html: u(n),
2383
+ html: m(n),
2317
2384
  impact: "moderate",
2318
2385
  message: "Main landmark is nested within another landmark."
2319
2386
  });
2320
2387
  }
2321
2388
  return a;
2322
2389
  }
2323
- }, ka = {
2390
+ }, Ca = {
2324
2391
  id: "accesslint-043",
2325
2392
  wcag: [],
2326
2393
  level: "A",
@@ -2332,17 +2399,17 @@ const da = {
2332
2399
  const a = [], e = t.querySelectorAll('aside, [role="complementary"]');
2333
2400
  for (const n of e) {
2334
2401
  const i = n.parentElement;
2335
- i && !i.matches('body, main, [role="main"]') && n.closest('article, nav, section, [role="article"], [role="navigation"], [role="region"]') && a.push({
2402
+ i && !i.matches('body, main, [role="main"]') && n.closest('article, nav, section[aria-label], section[aria-labelledby], [role="article"], [role="navigation"], [role="region"]') && a.push({
2336
2403
  ruleId: "accesslint-043",
2337
2404
  selector: p(n),
2338
- html: u(n),
2405
+ html: m(n),
2339
2406
  impact: "moderate",
2340
2407
  message: "Complementary landmark should be top-level."
2341
2408
  });
2342
2409
  }
2343
2410
  return a;
2344
2411
  }
2345
- }, Sa = {
2412
+ }, Ta = {
2346
2413
  id: "accesslint-044",
2347
2414
  wcag: [],
2348
2415
  level: "A",
@@ -2362,23 +2429,23 @@ const da = {
2362
2429
  if (s.length <= 1) continue;
2363
2430
  const o = /* @__PURE__ */ new Map();
2364
2431
  for (const r of s) {
2365
- const l = y(r).toLowerCase() || "", m = o.get(l) || [];
2366
- m.push(r), o.set(l, m);
2432
+ const l = v(r).toLowerCase() || "", d = o.get(l) || [];
2433
+ d.push(r), o.set(l, d);
2367
2434
  }
2368
2435
  for (const [r, l] of o)
2369
2436
  if (l.length > 1)
2370
- for (const m of l.slice(1))
2437
+ for (const d of l.slice(1))
2371
2438
  a.push({
2372
2439
  ruleId: "accesslint-044",
2373
- selector: p(m),
2374
- html: u(m),
2440
+ selector: p(d),
2441
+ html: m(d),
2375
2442
  impact: "moderate",
2376
2443
  message: r ? `Multiple ${i} landmarks have the same label "${r}".` : `Multiple ${i} landmarks have no label. Add unique aria-label attributes.`
2377
2444
  });
2378
2445
  }
2379
2446
  return a;
2380
2447
  }
2381
- }, Ia = {
2448
+ }, Ma = {
2382
2449
  id: "accesslint-045",
2383
2450
  wcag: [],
2384
2451
  level: "A",
@@ -2392,18 +2459,18 @@ const da = {
2392
2459
  if (!e) return [];
2393
2460
  for (const i of e.children) {
2394
2461
  if (b(i) || i instanceof HTMLScriptElement || i instanceof HTMLStyleElement || i.tagName === "NOSCRIPT" || i instanceof HTMLElement && i.hidden || i.matches('a[href^="#"]')) continue;
2395
- const s = i.matches(we), o = (n = i.textContent) == null ? void 0 : n.trim();
2396
- !s && o && (i.querySelector(we) || a.push({
2462
+ const s = i.matches(ke), o = (n = i.textContent) == null ? void 0 : n.trim();
2463
+ !s && o && (i.querySelector(ke) || a.push({
2397
2464
  ruleId: "accesslint-045",
2398
2465
  selector: p(i),
2399
- html: u(i),
2466
+ html: m(i),
2400
2467
  impact: "moderate",
2401
2468
  message: "Content is not contained within a landmark region."
2402
2469
  }));
2403
2470
  }
2404
2471
  return a;
2405
2472
  }
2406
- }, Ea = {
2473
+ }, Na = {
2407
2474
  id: "accesslint-046",
2408
2475
  selector: "ul, ol",
2409
2476
  check: { type: "child-invalid", allowedChildren: ["li", "script", "template"], allowedChildRoles: ["listitem"] },
@@ -2414,7 +2481,7 @@ const da = {
2414
2481
  level: "A",
2415
2482
  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.",
2416
2483
  prompt: "Explain how to restructure this element within the list properly."
2417
- }, qa = q(Ea), La = {
2484
+ }, $a = T(Na), Da = {
2418
2485
  id: "accesslint-048",
2419
2486
  wcag: ["1.3.1"],
2420
2487
  level: "A",
@@ -2427,13 +2494,13 @@ const da = {
2427
2494
  (!e.parentElement || e.parentElement.tagName.toLowerCase() !== "dl") && a.push({
2428
2495
  ruleId: "accesslint-048",
2429
2496
  selector: p(e),
2430
- html: u(e),
2497
+ html: m(e),
2431
2498
  impact: "serious",
2432
2499
  message: `<${e.tagName.toLowerCase()}> is not contained in a <dl>.`
2433
2500
  });
2434
2501
  return a;
2435
2502
  }
2436
- }, Ra = {
2503
+ }, Fa = {
2437
2504
  id: "accesslint-049",
2438
2505
  selector: "dl",
2439
2506
  check: { type: "child-invalid", allowedChildren: ["dt", "dd", "div", "script", "template"] },
@@ -2444,7 +2511,7 @@ const da = {
2444
2511
  level: "A",
2445
2512
  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.",
2446
2513
  prompt: "Explain whether to move this element outside the <dl> or convert it to dt/dd."
2447
- }, Ca = q(Ra), Ta = {
2514
+ }, Pa = T(Fa), Ha = {
2448
2515
  id: "accesslint-047",
2449
2516
  wcag: ["1.3.1"],
2450
2517
  level: "A",
@@ -2462,14 +2529,14 @@ const da = {
2462
2529
  s === "ul" || s === "ol" || s === "menu" || ((e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase()) === "list" || a.push({
2463
2530
  ruleId: "accesslint-047",
2464
2531
  selector: p(n),
2465
- html: u(n),
2532
+ html: m(n),
2466
2533
  impact: "serious",
2467
2534
  message: "<li> is not contained in a <ul>, <ol>, or <menu>."
2468
2535
  });
2469
2536
  }
2470
2537
  return a;
2471
2538
  }
2472
- }, Ma = {
2539
+ }, za = {
2473
2540
  id: "accesslint-001",
2474
2541
  actRuleIds: ["2779a5"],
2475
2542
  wcag: ["2.4.2"],
@@ -2500,7 +2567,7 @@ const da = {
2500
2567
  }
2501
2568
  return [];
2502
2569
  }
2503
- }, Na = {
2570
+ }, ja = {
2504
2571
  id: "accesslint-002",
2505
2572
  actRuleIds: ["cf77f2"],
2506
2573
  wcag: [],
@@ -2532,7 +2599,7 @@ const da = {
2532
2599
  context: `Missing: ${i.join(", ")}`
2533
2600
  }];
2534
2601
  }
2535
- }, $a = {
2602
+ }, Ua = {
2536
2603
  id: "accesslint-003",
2537
2604
  wcag: [],
2538
2605
  level: "A",
@@ -2543,16 +2610,16 @@ const da = {
2543
2610
  run(t) {
2544
2611
  var o, r, l;
2545
2612
  const a = t.querySelector("h1");
2546
- if (a && y(a)) return [];
2613
+ if (a && v(a)) return [];
2547
2614
  const e = t.querySelectorAll('[role="heading"][aria-level="1"]');
2548
- for (const m of e)
2549
- if (y(m)) return [];
2615
+ for (const d of e)
2616
+ if (v(d)) return [];
2550
2617
  const n = [], i = (r = (o = t.querySelector("title")) == null ? void 0 : o.textContent) == null ? void 0 : r.trim();
2551
2618
  i && n.push(`Page title: "${i}"`);
2552
2619
  const s = t.querySelector("main");
2553
2620
  if (s) {
2554
- const m = ((l = s.textContent) == null ? void 0 : l.trim().replace(/\s+/g, " ")) || "";
2555
- m && n.push(`Main content: "${m.slice(0, 100)}"`);
2621
+ const d = ((l = s.textContent) == null ? void 0 : l.trim().replace(/\s+/g, " ")) || "";
2622
+ d && n.push(`Main content: "${d.slice(0, 100)}"`);
2556
2623
  }
2557
2624
  return [{
2558
2625
  ruleId: "accesslint-003",
@@ -2564,13 +2631,13 @@ const da = {
2564
2631
  }];
2565
2632
  }
2566
2633
  };
2567
- function Ne(t) {
2634
+ function Pe(t) {
2568
2635
  if (!(t instanceof HTMLElement)) return !1;
2569
2636
  if (t.style.display === "none" || t.style.visibility === "hidden") return !0;
2570
2637
  const a = t.getAttribute("width"), e = t.getAttribute("height");
2571
2638
  return (a === "0" || a === "1") && (e === "0" || e === "1");
2572
2639
  }
2573
- const Da = {
2640
+ const Wa = {
2574
2641
  id: "accesslint-004",
2575
2642
  actRuleIds: ["cae760"],
2576
2643
  wcag: ["4.1.2"],
@@ -2581,13 +2648,13 @@ const Da = {
2581
2648
  run(t) {
2582
2649
  const a = [];
2583
2650
  for (const e of t.querySelectorAll("iframe, frame")) {
2584
- if (b(e) || Ne(e)) continue;
2585
- if (!y(e)) {
2651
+ if (b(e) || Pe(e)) continue;
2652
+ if (!v(e)) {
2586
2653
  const i = e.getAttribute("src");
2587
2654
  a.push({
2588
2655
  ruleId: "accesslint-004",
2589
2656
  selector: p(e),
2590
- html: u(e),
2657
+ html: m(e),
2591
2658
  impact: "serious",
2592
2659
  message: "Frame is missing an accessible name. Add a title attribute.",
2593
2660
  context: i ? `src: "${i}"` : void 0
@@ -2596,7 +2663,7 @@ const Da = {
2596
2663
  }
2597
2664
  return a;
2598
2665
  }
2599
- }, Fa = {
2666
+ }, Oa = {
2600
2667
  id: "accesslint-005",
2601
2668
  wcag: ["4.1.2"],
2602
2669
  level: "A",
@@ -2608,7 +2675,7 @@ const Da = {
2608
2675
  var i;
2609
2676
  const a = [], e = Array.from(t.querySelectorAll("iframe[title], frame[title]")), n = /* @__PURE__ */ new Map();
2610
2677
  for (const s of e) {
2611
- if (b(s) || Ne(s)) continue;
2678
+ if (b(s) || Pe(s)) continue;
2612
2679
  const o = (i = s.getAttribute("title")) == null ? void 0 : i.trim().toLowerCase();
2613
2680
  if (o) {
2614
2681
  const r = n.get(o) || [];
@@ -2621,13 +2688,13 @@ const Da = {
2621
2688
  a.push({
2622
2689
  ruleId: "accesslint-005",
2623
2690
  selector: p(o),
2624
- html: u(o),
2691
+ html: m(o),
2625
2692
  impact: "moderate",
2626
2693
  message: "Frame title is not unique. Use a distinct title for each frame."
2627
2694
  });
2628
2695
  return a;
2629
2696
  }
2630
- }, Pa = {
2697
+ }, Ba = {
2631
2698
  id: "accesslint-034",
2632
2699
  actRuleIds: ["ffd0e9"],
2633
2700
  wcag: [],
@@ -2640,7 +2707,7 @@ const Da = {
2640
2707
  var n;
2641
2708
  const a = [], e = t.querySelectorAll('h1, h2, h3, h4, h5, h6, [role="heading"]');
2642
2709
  for (const i of e)
2643
- if (!b(i) && !y(i)) {
2710
+ if (!b(i) && !v(i)) {
2644
2711
  let s;
2645
2712
  const o = i.nextElementSibling;
2646
2713
  if (o) {
@@ -2650,7 +2717,7 @@ const Da = {
2650
2717
  a.push({
2651
2718
  ruleId: "accesslint-034",
2652
2719
  selector: p(i),
2653
- html: u(i),
2720
+ html: m(i),
2654
2721
  impact: "minor",
2655
2722
  message: "Heading is empty. Add text content or remove the heading element.",
2656
2723
  context: s ? `Following content: "${s}"` : void 0
@@ -2658,7 +2725,7 @@ const Da = {
2658
2725
  }
2659
2726
  return a;
2660
2727
  }
2661
- }, Ha = {
2728
+ }, Va = {
2662
2729
  id: "accesslint-006",
2663
2730
  actRuleIds: ["b4f0c3"],
2664
2731
  wcag: ["1.4.4"],
@@ -2675,7 +2742,7 @@ const Da = {
2675
2742
  (r === "no" || !isNaN(l) && l > -1 && l < 1) && a.push({
2676
2743
  ruleId: "accesslint-006",
2677
2744
  selector: p(e),
2678
- html: u(e),
2745
+ html: m(e),
2679
2746
  impact: "critical",
2680
2747
  message: `Viewport disables user scaling (user-scalable=${r}). Remove this restriction.`,
2681
2748
  context: `content: "${n}"`
@@ -2687,7 +2754,7 @@ const Da = {
2687
2754
  l < 2 && a.push({
2688
2755
  ruleId: "accesslint-006",
2689
2756
  selector: p(e),
2690
- html: u(e),
2757
+ html: m(e),
2691
2758
  impact: "critical",
2692
2759
  message: `Viewport maximum-scale=${l} restricts zooming. Set to at least 2 or remove.`,
2693
2760
  context: `content: "${n}"`
@@ -2695,10 +2762,10 @@ const Da = {
2695
2762
  }
2696
2763
  return a;
2697
2764
  }
2698
- }, za = {
2765
+ }, _a = {
2699
2766
  id: "accesslint-008",
2700
2767
  actRuleIds: ["bisz58"],
2701
- wcag: ["2.2.1", "3.2.5"],
2768
+ wcag: ["2.2.1"],
2702
2769
  level: "A",
2703
2770
  description: "Meta refresh must not be used with a delay (no exceptions).",
2704
2771
  guidance: "Automatic page refreshes and delayed redirects disorient users. Instant redirects (delay=0) are acceptable, but any positive delay is not. Use server-side redirects instead.",
@@ -2711,7 +2778,7 @@ const Da = {
2711
2778
  return i > 0 ? [{
2712
2779
  ruleId: "accesslint-008",
2713
2780
  selector: p(a),
2714
- html: u(a),
2781
+ html: m(a),
2715
2782
  impact: "critical",
2716
2783
  message: `Page has a ${i}-second meta refresh delay.`
2717
2784
  }] : [];
@@ -2719,17 +2786,17 @@ const Da = {
2719
2786
  return [{
2720
2787
  ruleId: "accesslint-008",
2721
2788
  selector: p(a),
2722
- html: u(a),
2789
+ html: m(a),
2723
2790
  impact: "critical",
2724
2791
  message: `Page has a ${i}-second meta refresh delay.`
2725
2792
  }];
2726
2793
  }
2727
2794
  return [];
2728
2795
  }
2729
- }, ja = {
2796
+ }, Ga = {
2730
2797
  id: "accesslint-007",
2731
2798
  actRuleIds: ["bc659a"],
2732
- wcag: ["2.2.1", "2.2.4", "3.2.5"],
2799
+ wcag: ["2.2.1"],
2733
2800
  level: "A",
2734
2801
  description: "Meta refresh must not redirect or refresh automatically.",
2735
2802
  guidance: "Automatic page refreshes or redirects can disorient users, especially those using screen readers or with cognitive disabilities. They may lose their place or not have time to read content. If a redirect is needed, use a server-side redirect (HTTP 301/302) instead. For timed refreshes, provide user controls.",
@@ -2743,7 +2810,7 @@ const Da = {
2743
2810
  return i > 0 && i <= 72e3 ? [{
2744
2811
  ruleId: "accesslint-007",
2745
2812
  selector: p(a),
2746
- html: u(a),
2813
+ html: m(a),
2747
2814
  impact: "critical",
2748
2815
  message: `Page redirects after ${i} seconds without warning. Use server-side redirect.`
2749
2816
  }] : [];
@@ -2751,7 +2818,7 @@ const Da = {
2751
2818
  return [{
2752
2819
  ruleId: "accesslint-007",
2753
2820
  selector: p(a),
2754
- html: u(a),
2821
+ html: m(a),
2755
2822
  impact: "critical",
2756
2823
  message: `Page auto-refreshes after ${i} seconds. Provide user control over refresh.`
2757
2824
  }];
@@ -2759,14 +2826,14 @@ const Da = {
2759
2826
  return [];
2760
2827
  }
2761
2828
  };
2762
- function se(t) {
2829
+ function re(t) {
2763
2830
  return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
2764
2831
  }
2765
- function $e(t, a) {
2832
+ function He(t, a) {
2766
2833
  const e = t.getAttribute("style");
2767
2834
  if (!e) return null;
2768
2835
  const n = new RegExp(
2769
- `${se(a)}\\s*:\\s*([^;!]+)\\s*!\\s*important`,
2836
+ `${re(a)}\\s*:\\s*([^;!]+)\\s*!\\s*important`,
2770
2837
  "gi"
2771
2838
  );
2772
2839
  let i = null, s;
@@ -2780,27 +2847,27 @@ function $e(t, a) {
2780
2847
  if (r) return { em: parseFloat(r[1]), px: null };
2781
2848
  const l = o.match(/^(-?[\d.]+)$/);
2782
2849
  if (l) return { em: parseFloat(l[1]), px: null };
2783
- const m = o.match(/^(-?[\d.]+)\s*%$/);
2784
- if (m) return { em: parseFloat(m[1]) / 100, px: null };
2850
+ const d = o.match(/^(-?[\d.]+)\s*%$/);
2851
+ if (d) return { em: parseFloat(d[1]) / 100, px: null };
2785
2852
  const c = o.match(/^(-?[\d.]+)\s*(px|pt|cm|mm|in)$/i);
2786
2853
  if (c) {
2787
- const d = parseFloat(c[1]), h = c[2].toLowerCase();
2854
+ const u = parseFloat(c[1]), h = c[2].toLowerCase();
2788
2855
  let g;
2789
2856
  switch (h) {
2790
2857
  case "px":
2791
- g = d;
2858
+ g = u;
2792
2859
  break;
2793
2860
  case "pt":
2794
- g = d * (4 / 3);
2861
+ g = u * (4 / 3);
2795
2862
  break;
2796
2863
  case "cm":
2797
- g = d * (96 / 2.54);
2864
+ g = u * (96 / 2.54);
2798
2865
  break;
2799
2866
  case "mm":
2800
- g = d * (96 / 25.4);
2867
+ g = u * (96 / 25.4);
2801
2868
  break;
2802
2869
  case "in":
2803
- g = d * 96;
2870
+ g = u * 96;
2804
2871
  break;
2805
2872
  default:
2806
2873
  return null;
@@ -2809,19 +2876,19 @@ function $e(t, a) {
2809
2876
  }
2810
2877
  return null;
2811
2878
  }
2812
- function De(t, a, e, n) {
2879
+ function ze(t, a, e, n) {
2813
2880
  function i(s) {
2814
2881
  var o;
2815
2882
  if (s !== t) {
2816
2883
  const r = s.getAttribute("style") || "";
2817
2884
  if (new RegExp(
2818
- `${se(a)}\\s*:\\s*[^;!]+\\s*!\\s*important`,
2885
+ `${re(a)}\\s*:\\s*[^;!]+\\s*!\\s*important`,
2819
2886
  "i"
2820
2887
  ).test(r)) return !1;
2821
2888
  }
2822
2889
  for (const r of s.childNodes)
2823
2890
  if (r.nodeType === 3 && ((o = r.textContent) != null && o.trim())) {
2824
- const l = parseFloat(x(s).fontSize);
2891
+ const l = parseFloat(w(s).fontSize);
2825
2892
  if (l > 0 && e / l < n) return !0;
2826
2893
  break;
2827
2894
  }
@@ -2831,17 +2898,17 @@ function De(t, a, e, n) {
2831
2898
  }
2832
2899
  return i(t);
2833
2900
  }
2834
- function Ua(t) {
2901
+ function Ya(t) {
2835
2902
  var a;
2836
2903
  for (const e of t.childNodes)
2837
2904
  if (e.nodeType === 3 && ((a = e.textContent) != null && a.trim()))
2838
2905
  return !0;
2839
2906
  return !1;
2840
2907
  }
2841
- function Fe(t) {
2908
+ function je(t) {
2842
2909
  return !t.closest("svg") && !t.closest("math");
2843
2910
  }
2844
- function Pe(t) {
2911
+ function Ue(t) {
2845
2912
  const a = t.getAttribute("style");
2846
2913
  if (!a) return !1;
2847
2914
  if (/position\s*:\s*(absolute|fixed)/i.test(a)) {
@@ -2852,31 +2919,31 @@ function Pe(t) {
2852
2919
  }
2853
2920
  return !1;
2854
2921
  }
2855
- function oe(t, a) {
2856
- if (Ua(t)) return !0;
2922
+ function le(t, a) {
2923
+ if (Ya(t)) return !0;
2857
2924
  for (const e of t.children) {
2858
2925
  const n = e.getAttribute("style") || "";
2859
2926
  if (!new RegExp(
2860
- `${se(a)}\\s*:\\s*[^;!]+\\s*!\\s*important`,
2927
+ `${re(a)}\\s*:\\s*[^;!]+\\s*!\\s*important`,
2861
2928
  "i"
2862
- ).test(n) && oe(e, a))
2929
+ ).test(n) && le(e, a))
2863
2930
  return !0;
2864
2931
  }
2865
2932
  return !1;
2866
2933
  }
2867
- function He(t, a, e, n) {
2934
+ function We(t, a, e, n) {
2868
2935
  const i = [];
2869
2936
  for (const s of t.querySelectorAll("[style]")) {
2870
- if (b(s) || !Fe(s) || Pe(s) || !oe(s, e)) continue;
2871
- const o = $e(s, e);
2937
+ if (b(s) || !je(s) || Ue(s) || !le(s, e)) continue;
2938
+ const o = He(s, e);
2872
2939
  if (!o) continue;
2873
2940
  let r = !1;
2874
- if (o.em !== null ? r = o.em < n : o.px !== null && (r = De(s, e, o.px, n)), r) {
2941
+ if (o.em !== null ? r = o.em < n : o.px !== null && (r = ze(s, e, o.px, n)), r) {
2875
2942
  const l = o.em !== null ? `${o.em}${e === "line-height" ? "" : "em"}` : `${o.px}px`;
2876
2943
  i.push({
2877
2944
  ruleId: a,
2878
2945
  selector: p(s),
2879
- html: u(s),
2946
+ html: m(s),
2880
2947
  impact: "serious",
2881
2948
  message: `${e} ${l} with !important is below the ${n}${e === "line-height" ? "" : "em"} minimum.`
2882
2949
  });
@@ -2884,7 +2951,7 @@ function He(t, a, e, n) {
2884
2951
  }
2885
2952
  return i;
2886
2953
  }
2887
- const Wa = {
2954
+ const Xa = {
2888
2955
  id: "accesslint-050",
2889
2956
  actRuleIds: ["24afc2"],
2890
2957
  wcag: ["1.4.12"],
@@ -2892,13 +2959,13 @@ const Wa = {
2892
2959
  description: "Letter spacing set with !important in style attributes must be at least 0.12em.",
2893
2960
  guidance: "WCAG 1.4.12 requires users to be able to override text spacing. Using !important on letter-spacing with a value below 0.12em prevents this. Either increase the value to at least 0.12em or remove !important.",
2894
2961
  run(t) {
2895
- return He(t, "important-letter-spacing", "letter-spacing", 0.12);
2962
+ return We(t, "important-letter-spacing", "letter-spacing", 0.12);
2896
2963
  }
2897
2964
  };
2898
- function Oa(t) {
2965
+ function Ka(t) {
2899
2966
  let a = t, e = !1;
2900
2967
  for (; a; ) {
2901
- const n = x(a);
2968
+ const n = w(a);
2902
2969
  parseFloat(n.width) > 500 && (e = !0), (n.whiteSpace === "nowrap" || n.whiteSpace === "pre") && (e = !0);
2903
2970
  const s = n.overflowX, o = n.overflowY;
2904
2971
  if ((s === "scroll" || s === "auto") && o !== "scroll" && o !== "auto")
@@ -2907,7 +2974,7 @@ function Oa(t) {
2907
2974
  }
2908
2975
  return !1;
2909
2976
  }
2910
- const Ba = {
2977
+ const Ja = {
2911
2978
  id: "accesslint-051",
2912
2979
  actRuleIds: ["78fd32"],
2913
2980
  wcag: ["1.4.12"],
@@ -2917,20 +2984,20 @@ const Ba = {
2917
2984
  run(t) {
2918
2985
  const a = [];
2919
2986
  for (const e of t.querySelectorAll("[style]")) {
2920
- if (b(e) || !Fe(e) || Pe(e) || !oe(e, "line-height") || Oa(e)) continue;
2987
+ if (b(e) || !je(e) || Ue(e) || !le(e, "line-height") || Ka(e)) continue;
2921
2988
  if (e instanceof HTMLElement && e.scrollHeight > 0) {
2922
- const s = parseFloat(x(e).lineHeight);
2989
+ const s = parseFloat(w(e).lineHeight);
2923
2990
  if (s > 0 && e.scrollHeight <= s * 1.5) continue;
2924
2991
  }
2925
- const n = $e(e, "line-height");
2992
+ const n = He(e, "line-height");
2926
2993
  if (!n) continue;
2927
2994
  let i = !1;
2928
- if (n.em !== null ? i = n.em < 1.5 : n.px !== null && (i = De(e, "line-height", n.px, 1.5)), i) {
2995
+ if (n.em !== null ? i = n.em < 1.5 : n.px !== null && (i = ze(e, "line-height", n.px, 1.5)), i) {
2929
2996
  const s = n.em !== null ? `${n.em}` : `${n.px}px`;
2930
2997
  a.push({
2931
2998
  ruleId: "accesslint-051",
2932
2999
  selector: p(e),
2933
- html: u(e),
3000
+ html: m(e),
2934
3001
  impact: "serious",
2935
3002
  message: `Line height ${s} with !important is below the 1.5 minimum.`
2936
3003
  });
@@ -2938,7 +3005,7 @@ const Ba = {
2938
3005
  }
2939
3006
  return a;
2940
3007
  }
2941
- }, Va = {
3008
+ }, Qa = {
2942
3009
  id: "accesslint-052",
2943
3010
  actRuleIds: ["9e45ec"],
2944
3011
  wcag: ["1.4.12"],
@@ -2946,10 +3013,10 @@ const Ba = {
2946
3013
  description: "Word spacing set with !important in style attributes must be at least 0.16em.",
2947
3014
  guidance: "WCAG 1.4.12 requires users to be able to override text spacing. Using !important on word-spacing with a value below 0.16em prevents this. Either increase the value to at least 0.16em or remove !important.",
2948
3015
  run(t) {
2949
- return He(t, "important-word-spacing", "word-spacing", 0.16);
3016
+ return We(t, "important-word-spacing", "word-spacing", 0.16);
2950
3017
  }
2951
3018
  };
2952
- function ze(t, a) {
3019
+ function Oe(t, a) {
2953
3020
  switch (a.toLowerCase()) {
2954
3021
  case "deg":
2955
3022
  return t;
@@ -2963,40 +3030,40 @@ function ze(t, a) {
2963
3030
  return NaN;
2964
3031
  }
2965
3032
  }
2966
- function z(t) {
3033
+ function W(t) {
2967
3034
  return isNaN(t) ? !1 : (t = (t % 360 + 360) % 360, t >= 85 && t <= 95 || t >= 265 && t <= 275);
2968
3035
  }
2969
- function _a(t) {
3036
+ function Za(t) {
2970
3037
  const a = t.match(
2971
3038
  /rotate[Z]?\(\s*(-?[\d.]+)(deg|rad|turn|grad)\s*\)/i
2972
3039
  );
2973
3040
  if (a) {
2974
- const i = ze(parseFloat(a[1]), a[2]);
2975
- if (z(i)) return !0;
3041
+ const i = Oe(parseFloat(a[1]), a[2]);
3042
+ if (W(i)) return !0;
2976
3043
  }
2977
3044
  const e = t.match(
2978
3045
  /matrix\(\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)/i
2979
3046
  );
2980
3047
  if (e) {
2981
3048
  const i = parseFloat(e[1]), s = parseFloat(e[2]), o = Math.atan2(s, i) * (180 / Math.PI);
2982
- if (z(o)) return !0;
3049
+ if (W(o)) return !0;
2983
3050
  }
2984
3051
  const n = t.match(
2985
3052
  /matrix3d\(\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)\s*,\s*(-?[\d.e]+)/i
2986
3053
  );
2987
3054
  if (n) {
2988
3055
  const i = parseFloat(n[1]), s = parseFloat(n[2]), o = Math.atan2(s, i) * (180 / Math.PI);
2989
- if (z(o)) return !0;
3056
+ if (W(o)) return !0;
2990
3057
  }
2991
3058
  return !1;
2992
3059
  }
2993
- function Ga(t) {
3060
+ function en(t) {
2994
3061
  const a = t.match(/(-?[\d.]+)(deg|rad|turn|grad)/i);
2995
3062
  if (!a) return !1;
2996
- const e = ze(parseFloat(a[1]), a[2]);
2997
- return z(e);
3063
+ const e = Oe(parseFloat(a[1]), a[2]);
3064
+ return W(e);
2998
3065
  }
2999
- const Ya = {
3066
+ const tn = {
3000
3067
  id: "accesslint-053",
3001
3068
  actRuleIds: ["b33eff"],
3002
3069
  wcag: ["1.3.4"],
@@ -3014,16 +3081,16 @@ const Ya = {
3014
3081
  const l = o.match(
3015
3082
  /transform\s*:\s*([^;]+)/i
3016
3083
  );
3017
- if (l && _a(l[1]) && (r = !0), !r) {
3018
- const m = o.match(
3084
+ if (l && Za(l[1]) && (r = !0), !r) {
3085
+ const d = o.match(
3019
3086
  /(?:^|[{;\s])rotate\s*:\s*([^;]+)/i
3020
3087
  );
3021
- m && Ga(m[1]) && (r = !0);
3088
+ d && en(d[1]) && (r = !0);
3022
3089
  }
3023
3090
  r && a.push({
3024
3091
  ruleId: "accesslint-053",
3025
3092
  selector: p(e),
3026
- html: u(e),
3093
+ html: m(e),
3027
3094
  impact: "serious",
3028
3095
  message: `CSS locks page orientation via @media (orientation: ${s[2]}) with a 90° transform.`
3029
3096
  });
@@ -3031,7 +3098,7 @@ const Ya = {
3031
3098
  }
3032
3099
  return a;
3033
3100
  }
3034
- }, Xa = {
3101
+ }, an = {
3035
3102
  id: "accesslint-009",
3036
3103
  selector: "blink",
3037
3104
  check: { type: "selector-exists" },
@@ -3042,7 +3109,7 @@ const Ya = {
3042
3109
  level: "A",
3043
3110
  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.",
3044
3111
  prompt: "Suggest static alternatives to the blinking effect."
3045
- }, Ka = q(Xa), Ja = {
3112
+ }, nn = T(an), sn = {
3046
3113
  id: "accesslint-010",
3047
3114
  selector: "marquee",
3048
3115
  check: { type: "selector-exists" },
@@ -3053,7 +3120,7 @@ const Ya = {
3053
3120
  level: "A",
3054
3121
  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.",
3055
3122
  prompt: "Suggest static alternatives or accessible carousel patterns."
3056
- }, Qa = q(Ja), Za = {
3123
+ }, on = T(sn), rn = {
3057
3124
  id: "accesslint-035",
3058
3125
  wcag: [],
3059
3126
  level: "A",
@@ -3066,13 +3133,13 @@ const Ya = {
3066
3133
  const a = [];
3067
3134
  for (const i of t.querySelectorAll("p")) {
3068
3135
  if (b(i)) continue;
3069
- const s = i.getAttribute("style") || "", o = /font-weight\s*:\s*(bold|[6-9]00)/i.test(s), r = /font-size\s*:\s*(\d+)\s*(px|em|rem)/i.test(s), l = ((e = i.className) == null ? void 0 : e.toLowerCase()) || "", m = /\bh[1-6]\b|\bheading\b/.test(l), c = ((n = i.textContent) == null ? void 0 : n.trim()) || "", d = c.length > 0 && c.length < 50, h = !c.match(/[.!?,;:]$/);
3070
- if ((o && r || o && m) && d && h) {
3071
- const v = i.nextElementSibling;
3072
- v && (v.tagName === "P" || v.tagName === "DIV" || v.tagName === "UL") && a.push({
3136
+ const s = i.getAttribute("style") || "", o = /font-weight\s*:\s*(bold|[6-9]00)/i.test(s), r = /font-size\s*:\s*(\d+)\s*(px|em|rem)/i.test(s), l = ((e = i.className) == null ? void 0 : e.toLowerCase()) || "", d = /\bh[1-6]\b|\bheading\b/.test(l), c = ((n = i.textContent) == null ? void 0 : n.trim()) || "", u = c.length > 0 && c.length < 50, h = !c.match(/[.!?,;:]$/);
3137
+ if ((o && r || o && d) && u && h) {
3138
+ const y = i.nextElementSibling;
3139
+ y && (y.tagName === "P" || y.tagName === "DIV" || y.tagName === "UL") && a.push({
3073
3140
  ruleId: "accesslint-035",
3074
3141
  selector: p(i),
3075
- html: u(i),
3142
+ html: m(i),
3076
3143
  impact: "serious",
3077
3144
  message: "Paragraph appears to be styled as a heading. Use an h1-h6 element instead."
3078
3145
  });
@@ -3080,7 +3147,7 @@ const Ya = {
3080
3147
  }
3081
3148
  return a;
3082
3149
  }
3083
- }, en = {
3150
+ }, ln = {
3084
3151
  id: "accesslint-054",
3085
3152
  actRuleIds: ["674b10"],
3086
3153
  wcag: ["4.1.2"],
@@ -3092,17 +3159,17 @@ const Ya = {
3092
3159
  const a = [];
3093
3160
  for (const e of t.querySelectorAll("[role]")) {
3094
3161
  const s = e.getAttribute("role").replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "").split(/\s+/).filter(Boolean);
3095
- !s.some((r) => Je(r)) && s.length > 0 && a.push({
3162
+ !s.some((r) => at(r)) && s.length > 0 && a.push({
3096
3163
  ruleId: "accesslint-054",
3097
3164
  selector: p(e),
3098
- html: u(e),
3165
+ html: m(e),
3099
3166
  impact: "critical",
3100
3167
  message: `Invalid ARIA role "${s[0]}".`
3101
3168
  });
3102
3169
  }
3103
3170
  return a;
3104
3171
  }
3105
- }, tn = {
3172
+ }, cn = {
3106
3173
  id: "accesslint-055",
3107
3174
  actRuleIds: ["5f99a7"],
3108
3175
  wcag: ["4.1.2"],
@@ -3111,9 +3178,9 @@ const Ya = {
3111
3178
  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+).",
3112
3179
  prompt: "Identify the misspelled attribute and provide the correct spelling.",
3113
3180
  run(t) {
3114
- return ne(t).validAttr;
3181
+ return oe(t).validAttr;
3115
3182
  }
3116
- }, an = {
3183
+ }, dn = {
3117
3184
  id: "accesslint-056",
3118
3185
  actRuleIds: ["6a7281"],
3119
3186
  wcag: ["4.1.2"],
@@ -3122,9 +3189,9 @@ const Ya = {
3122
3189
  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.",
3123
3190
  prompt: "Show the invalid value and list the valid values for this specific attribute.",
3124
3191
  run(t) {
3125
- return ne(t).validAttrValue;
3192
+ return oe(t).validAttrValue;
3126
3193
  }
3127
- }, nn = {
3194
+ }, un = {
3128
3195
  checkbox: ["aria-checked"],
3129
3196
  combobox: ["aria-expanded"],
3130
3197
  heading: ["aria-level"],
@@ -3138,7 +3205,7 @@ const Ya = {
3138
3205
  slider: ["aria-valuenow"],
3139
3206
  spinbutton: ["aria-valuenow"],
3140
3207
  switch: ["aria-checked"]
3141
- }, sn = {
3208
+ }, mn = {
3142
3209
  id: "accesslint-057",
3143
3210
  actRuleIds: ["4e8ab6"],
3144
3211
  wcag: ["4.1.2"],
@@ -3150,7 +3217,7 @@ const Ya = {
3150
3217
  const a = [];
3151
3218
  for (const e of t.querySelectorAll("[role]")) {
3152
3219
  if (b(e) || e instanceof HTMLElement && e.style.display === "none") continue;
3153
- const n = e.getAttribute("role").trim().toLowerCase(), i = nn[n];
3220
+ const n = e.getAttribute("role").trim().toLowerCase(), i = un[n];
3154
3221
  if (i && !(n === "checkbox" && e instanceof HTMLInputElement && e.type === "checkbox") && !(n === "radio" && e instanceof HTMLInputElement && e.type === "radio") && !(n === "option" && e instanceof HTMLOptionElement) && !(n === "heading" && /^h[1-6]$/i.test(e.tagName))) {
3155
3222
  if (n === "separator") {
3156
3223
  const s = e.getAttribute("tabindex");
@@ -3162,7 +3229,7 @@ const Ya = {
3162
3229
  a.push({
3163
3230
  ruleId: "accesslint-057",
3164
3231
  selector: p(e),
3165
- html: u(e),
3232
+ html: m(e),
3166
3233
  impact: "critical",
3167
3234
  message: `Role "${n}" requires attribute "${s}".`
3168
3235
  });
@@ -3174,7 +3241,7 @@ const Ya = {
3174
3241
  return a;
3175
3242
  }
3176
3243
  };
3177
- function on(t) {
3244
+ function pn(t) {
3178
3245
  var s, o, r;
3179
3246
  const a = [], e = t.className;
3180
3247
  e && typeof e == "string" && e.trim() && a.push(`Classes: ${e.trim().slice(0, 100)}`);
@@ -3191,7 +3258,7 @@ function on(t) {
3191
3258
  return a.length > 0 ? a.join(`
3192
3259
  `) : void 0;
3193
3260
  }
3194
- const rn = {
3261
+ const hn = {
3195
3262
  id: "accesslint-075",
3196
3263
  actRuleIds: ["97a4e1"],
3197
3264
  wcag: ["4.1.2"],
@@ -3202,21 +3269,21 @@ const rn = {
3202
3269
  run(t) {
3203
3270
  const a = [];
3204
3271
  for (const e of t.querySelectorAll('button, [role="button"]')) {
3205
- if (b(e) || T(e)) continue;
3272
+ if (b(e) || N(e)) continue;
3206
3273
  const n = e.getAttribute("role");
3207
3274
  if ((n === "none" || n === "presentation") && !(e.matches('button:not([disabled]), [tabindex]:not([tabindex="-1"])') || e.tagName.toLowerCase() === "button" && !e.disabled) || e.getRootNode() instanceof ShadowRoot) continue;
3208
- y(e) || a.push({
3275
+ v(e) || a.push({
3209
3276
  ruleId: "accesslint-075",
3210
3277
  selector: p(e),
3211
- html: u(e),
3278
+ html: m(e),
3212
3279
  impact: "critical",
3213
3280
  message: "Button has no discernible text.",
3214
- context: on(e)
3281
+ context: pn(e)
3215
3282
  });
3216
3283
  }
3217
3284
  return a;
3218
3285
  }
3219
- }, ln = {
3286
+ }, bn = {
3220
3287
  alert: /* @__PURE__ */ new Set(["aria-atomic", "aria-busy", "aria-live", "aria-relevant"]),
3221
3288
  alertdialog: /* @__PURE__ */ new Set(["aria-describedby", "aria-modal"]),
3222
3289
  application: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-invalid"]),
@@ -3288,7 +3355,7 @@ const rn = {
3288
3355
  tree: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-required"]),
3289
3356
  treegrid: /* @__PURE__ */ new Set(["aria-activedescendant", "aria-colcount", "aria-disabled", "aria-errormessage", "aria-invalid", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"]),
3290
3357
  treeitem: /* @__PURE__ */ new Set(["aria-checked", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"])
3291
- }, cn = /* @__PURE__ */ new Set([
3358
+ }, gn = /* @__PURE__ */ new Set([
3292
3359
  "aria-atomic",
3293
3360
  "aria-busy",
3294
3361
  "aria-controls",
@@ -3312,7 +3379,7 @@ const rn = {
3312
3379
  "aria-roledescription",
3313
3380
  "aria-braillelabel",
3314
3381
  "aria-brailleroledescription"
3315
- ]), dn = {
3382
+ ]), fn = {
3316
3383
  id: "accesslint-058",
3317
3384
  actRuleIds: ["5c01ea"],
3318
3385
  wcag: ["4.1.2"],
@@ -3324,17 +3391,17 @@ const rn = {
3324
3391
  const a = [];
3325
3392
  for (const e of t.querySelectorAll("[role], [aria-*]")) {
3326
3393
  if (b(e)) continue;
3327
- const n = F(e);
3394
+ const n = H(e);
3328
3395
  if (!n) continue;
3329
- const i = ln[n];
3396
+ const i = bn[n];
3330
3397
  if (i)
3331
3398
  for (const s of e.attributes) {
3332
- if (!s.name.startsWith("aria-") || cn.has(s.name) || i.has(s.name)) continue;
3399
+ if (!s.name.startsWith("aria-") || gn.has(s.name) || i.has(s.name)) continue;
3333
3400
  const o = i.size > 0 ? [...i].join(", ") : "none (only global ARIA attributes)";
3334
3401
  a.push({
3335
3402
  ruleId: "accesslint-058",
3336
3403
  selector: p(e),
3337
- html: u(e),
3404
+ html: m(e),
3338
3405
  impact: "critical",
3339
3406
  message: `ARIA attribute "${s.name}" is not allowed on role "${n}".`,
3340
3407
  context: `Attribute: ${s.name}="${s.value}", role: ${n}, allowed role-specific attributes: ${o}`
@@ -3343,7 +3410,7 @@ const rn = {
3343
3410
  }
3344
3411
  return a;
3345
3412
  }
3346
- }, un = /* @__PURE__ */ new Set([
3413
+ }, vn = /* @__PURE__ */ new Set([
3347
3414
  "base",
3348
3415
  "col",
3349
3416
  "colgroup",
@@ -3358,7 +3425,7 @@ const rn = {
3358
3425
  "template",
3359
3426
  "title",
3360
3427
  "track"
3361
- ]), M = {
3428
+ ]), $ = {
3362
3429
  a: /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem", "link"]),
3363
3430
  "a[href]": /* @__PURE__ */ new Set(["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem"]),
3364
3431
  abbr: "any",
@@ -3465,22 +3532,22 @@ const rn = {
3465
3532
  video: /* @__PURE__ */ new Set(["application"]),
3466
3533
  wbr: /* @__PURE__ */ new Set(["none", "presentation"])
3467
3534
  };
3468
- function mn(t) {
3535
+ function yn(t) {
3469
3536
  var e;
3470
3537
  const a = t.tagName.toLowerCase();
3471
- if (un.has(a))
3538
+ if (vn.has(a))
3472
3539
  return "none";
3473
3540
  if (a === "a" && t.hasAttribute("href"))
3474
- return M["a[href]"];
3541
+ return $["a[href]"];
3475
3542
  if (a === "img" && t.getAttribute("alt") === "")
3476
- return M["img[alt='']"];
3543
+ return $["img[alt='']"];
3477
3544
  if (a === "input") {
3478
3545
  const i = `input[type=${((e = t.getAttribute("type")) == null ? void 0 : e.toLowerCase()) || "text"}]`;
3479
- return i in M ? M[i] : "none";
3546
+ return i in $ ? $[i] : "none";
3480
3547
  }
3481
- return M[a] || "any";
3548
+ return $[a] || "any";
3482
3549
  }
3483
- const pn = {
3550
+ const wn = {
3484
3551
  id: "accesslint-059",
3485
3552
  wcag: ["4.1.2"],
3486
3553
  level: "A",
@@ -3494,26 +3561,26 @@ const pn = {
3494
3561
  if (b(n)) continue;
3495
3562
  const i = (e = n.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
3496
3563
  if (!i) continue;
3497
- const s = Re(n);
3564
+ const s = Ne(n);
3498
3565
  if (s && i === s) continue;
3499
- const o = mn(n);
3566
+ const o = yn(n);
3500
3567
  o === "none" ? a.push({
3501
3568
  ruleId: "accesslint-059",
3502
3569
  selector: p(n),
3503
- html: u(n),
3570
+ html: m(n),
3504
3571
  impact: "minor",
3505
3572
  message: `Element <${n.tagName.toLowerCase()}> should not have an explicit role.`
3506
3573
  }) : o !== "any" && !o.has(i) && a.push({
3507
3574
  ruleId: "accesslint-059",
3508
3575
  selector: p(n),
3509
- html: u(n),
3576
+ html: m(n),
3510
3577
  impact: "minor",
3511
3578
  message: `Role "${i}" is not allowed on element <${n.tagName.toLowerCase()}>.`
3512
3579
  });
3513
3580
  }
3514
3581
  return a;
3515
3582
  }
3516
- }, Ae = {
3583
+ }, Se = {
3517
3584
  // Each array is an OR group - at least one of each inner array must be present
3518
3585
  combobox: [["listbox", "tree", "grid", "dialog", "textbox"]],
3519
3586
  // Must own/contain one of these
@@ -3530,7 +3597,7 @@ const pn = {
3530
3597
  tablist: [["tab"]],
3531
3598
  tree: [["treeitem", "group"]],
3532
3599
  treegrid: [["row", "rowgroup"]]
3533
- }, hn = /* @__PURE__ */ new Set([
3600
+ }, An = /* @__PURE__ */ new Set([
3534
3601
  "doc-bibliography",
3535
3602
  "doc-endnotes",
3536
3603
  "grid",
@@ -3542,7 +3609,7 @@ const pn = {
3542
3609
  "tablist",
3543
3610
  "tree",
3544
3611
  "treegrid"
3545
- ]), xe = {
3612
+ ]), Ie = {
3546
3613
  caption: ["figure", "table", "grid", "treegrid"],
3547
3614
  cell: ["row"],
3548
3615
  columnheader: ["row"],
@@ -3558,22 +3625,22 @@ const pn = {
3558
3625
  tab: ["tablist"],
3559
3626
  treeitem: ["tree", "group"]
3560
3627
  };
3561
- function bn(t, a) {
3628
+ function xn(t, a) {
3562
3629
  var o;
3563
3630
  const e = ((o = t.getAttribute("aria-owns")) == null ? void 0 : o.split(/\s+/)) || [], n = t.ownerDocument, i = /* @__PURE__ */ new Set();
3564
3631
  let s = !1;
3565
3632
  for (const r of t.querySelectorAll("*")) {
3566
3633
  if (b(r)) continue;
3567
3634
  s = !0;
3568
- const l = F(r);
3635
+ const l = H(r);
3569
3636
  l && i.add(l);
3570
3637
  }
3571
3638
  for (const r of e) {
3572
3639
  const l = n.getElementById(r);
3573
3640
  if (l && !b(l)) {
3574
3641
  s = !0;
3575
- const m = F(l);
3576
- m && i.add(m);
3642
+ const d = H(l);
3643
+ d && i.add(d);
3577
3644
  }
3578
3645
  }
3579
3646
  if (!s) return "empty";
@@ -3581,7 +3648,7 @@ function bn(t, a) {
3581
3648
  if (!r.some((l) => i.has(l))) return "fail";
3582
3649
  return "pass";
3583
3650
  }
3584
- const gn = {
3651
+ const kn = {
3585
3652
  id: "accesslint-060",
3586
3653
  actRuleIds: ["bc4a75"],
3587
3654
  wcag: ["1.3.1"],
@@ -3595,26 +3662,26 @@ const gn = {
3595
3662
  for (const n of t.querySelectorAll("[role]")) {
3596
3663
  if (b(n)) continue;
3597
3664
  const i = (e = n.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
3598
- if (!i || !(i in Ae) || n.getAttribute("aria-busy") === "true") continue;
3665
+ if (!i || !(i in Se) || n.getAttribute("aria-busy") === "true") continue;
3599
3666
  if (i === "combobox") {
3600
3667
  if (n.getAttribute("aria-expanded") !== "true") continue;
3601
3668
  const l = n.tagName.toLowerCase();
3602
3669
  if (l === "input" || l === "textarea") continue;
3603
3670
  }
3604
- const s = Ae[i], o = bn(n, s);
3605
- if (o === "pass" || o === "empty" && hn.has(i)) continue;
3671
+ const s = Se[i], o = xn(n, s);
3672
+ if (o === "pass" || o === "empty" && An.has(i)) continue;
3606
3673
  const r = s.map((l) => l.join(" or ")).join(", ");
3607
3674
  a.push({
3608
3675
  ruleId: "accesslint-060",
3609
3676
  selector: p(n),
3610
- html: u(n),
3677
+ html: m(n),
3611
3678
  impact: "critical",
3612
3679
  message: `Role "${i}" requires children with role: ${r}.`
3613
3680
  });
3614
3681
  }
3615
3682
  return a;
3616
3683
  }
3617
- }, fn = {
3684
+ }, Sn = {
3618
3685
  id: "accesslint-061",
3619
3686
  actRuleIds: ["ff89c9"],
3620
3687
  wcag: ["1.3.1"],
@@ -3628,11 +3695,11 @@ const gn = {
3628
3695
  for (const n of t.querySelectorAll("[role]")) {
3629
3696
  if (b(n)) continue;
3630
3697
  const i = (e = n.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
3631
- if (!i || !(i in xe)) continue;
3632
- const s = xe[i];
3698
+ if (!i || !(i in Ie)) continue;
3699
+ const s = Ie[i];
3633
3700
  let o = n.parentElement, r = !1;
3634
3701
  for (; o && o !== t.documentElement; ) {
3635
- const l = F(o);
3702
+ const l = H(o);
3636
3703
  if (l && s.includes(l)) {
3637
3704
  r = !0;
3638
3705
  break;
@@ -3642,14 +3709,14 @@ const gn = {
3642
3709
  r || a.push({
3643
3710
  ruleId: "accesslint-061",
3644
3711
  selector: p(n),
3645
- html: u(n),
3712
+ html: m(n),
3646
3713
  impact: "critical",
3647
3714
  message: `Role "${i}" must be contained within: ${s.join(", ")}.`
3648
3715
  });
3649
3716
  }
3650
3717
  return a;
3651
3718
  }
3652
- }, ke = [
3719
+ }, Ee = [
3653
3720
  "a[href]",
3654
3721
  "button:not([disabled])",
3655
3722
  'input:not([disabled]):not([type="hidden"])',
@@ -3665,7 +3732,7 @@ const gn = {
3665
3732
  "embed",
3666
3733
  "area[href]"
3667
3734
  ].join(", ");
3668
- function vn(t) {
3735
+ function In(t) {
3669
3736
  let a = t;
3670
3737
  const e = t.ownerDocument, n = e.defaultView;
3671
3738
  for (; a && a !== e.body; ) {
@@ -3678,7 +3745,7 @@ function vn(t) {
3678
3745
  }
3679
3746
  return !0;
3680
3747
  }
3681
- function yn(t) {
3748
+ function En(t) {
3682
3749
  const a = t.ownerDocument.defaultView;
3683
3750
  if (!a) return !1;
3684
3751
  const e = a.getComputedStyle(t), n = e.position;
@@ -3687,16 +3754,16 @@ function yn(t) {
3687
3754
  if (!(!isNaN(i) && i < -500 || !isNaN(s) && s < -500)) return !1;
3688
3755
  const r = t.id;
3689
3756
  if (!r) return !1;
3690
- const l = r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), m = new RegExp(
3757
+ const l = r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), d = new RegExp(
3691
3758
  `getElementById\\s*\\(\\s*['"]${l}['"]\\s*\\)\\s*\\.\\s*addEventListener\\s*\\(\\s*['"]focus['"]`
3692
3759
  );
3693
3760
  for (const c of t.ownerDocument.querySelectorAll("script")) {
3694
- const d = c.textContent || "";
3695
- if (m.test(d) && /\.focus\s*\(/.test(d)) return !0;
3761
+ const u = c.textContent || "";
3762
+ if (d.test(u) && /\.focus\s*\(/.test(u)) return !0;
3696
3763
  }
3697
3764
  return !1;
3698
3765
  }
3699
- const wn = {
3766
+ const qn = {
3700
3767
  id: "accesslint-062",
3701
3768
  selector: 'body[aria-hidden="true"]',
3702
3769
  check: { type: "selector-exists" },
@@ -3708,7 +3775,7 @@ const wn = {
3708
3775
  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.",
3709
3776
  prompt: "Instruct to remove aria-hidden='true' from the body element.",
3710
3777
  skipAriaHidden: !1
3711
- }, An = q(wn), xn = {
3778
+ }, Ln = T(qn), Rn = {
3712
3779
  id: "accesslint-063",
3713
3780
  actRuleIds: ["6cfa84"],
3714
3781
  wcag: ["4.1.2"],
@@ -3720,31 +3787,31 @@ const wn = {
3720
3787
  const a = [];
3721
3788
  for (const e of t.querySelectorAll('[aria-hidden="true"]')) {
3722
3789
  if (e === t.body) continue;
3723
- const n = [...e.querySelectorAll(ke)];
3724
- e.matches(ke) && n.push(e);
3790
+ const n = [...e.querySelectorAll(Ee)];
3791
+ e.matches(Ee) && n.push(e);
3725
3792
  for (const i of n)
3726
3793
  if (i instanceof HTMLElement) {
3727
3794
  const s = i.getAttribute("tabindex");
3728
- if (s === "-1" || i.disabled || i instanceof HTMLInputElement && i.type === "hidden" || !vn(i)) continue;
3795
+ if (s === "-1" || i.disabled || i instanceof HTMLInputElement && i.type === "hidden" || !In(i)) continue;
3729
3796
  const o = i.getAttribute("onfocus") || "";
3730
- if (/\.focus\s*\(/.test(o) || yn(i)) continue;
3797
+ if (/\.focus\s*\(/.test(o) || En(i)) continue;
3731
3798
  const r = i.tagName.toLowerCase();
3732
3799
  let l;
3733
3800
  s !== null ? l = `has tabindex="${s}"` : r === "a" && i.hasAttribute("href") ? l = "is a link with href" : r === "button" ? l = "is a <button>" : r === "input" ? l = `is an <input type="${i.type}">` : r === "select" ? l = "is a <select>" : r === "textarea" ? l = "is a <textarea>" : r === "iframe" ? l = "is an <iframe>" : l = `is a natively focusable <${r}>`;
3734
- const m = i === e ? i : i.closest('[aria-hidden="true"]');
3801
+ const d = i === e ? i : i.closest('[aria-hidden="true"]');
3735
3802
  a.push({
3736
3803
  ruleId: "accesslint-063",
3737
3804
  selector: p(i),
3738
- html: u(i),
3805
+ html: m(i),
3739
3806
  impact: "serious",
3740
3807
  message: "Focusable element is inside an aria-hidden region.",
3741
- context: `Focusable because: ${l}. aria-hidden ancestor: ${m ? u(m) : "unknown"}`
3808
+ context: `Focusable because: ${l}. aria-hidden ancestor: ${d ? m(d) : "unknown"}`
3742
3809
  });
3743
3810
  }
3744
3811
  }
3745
3812
  return a;
3746
3813
  }
3747
- }, kn = {
3814
+ }, Cn = {
3748
3815
  id: "accesslint-064",
3749
3816
  actRuleIds: ["m6b1q3"],
3750
3817
  wcag: ["4.1.2"],
@@ -3756,16 +3823,16 @@ const wn = {
3756
3823
  var e;
3757
3824
  const a = [];
3758
3825
  for (const n of t.querySelectorAll('[role="button"], [role="link"], [role="menuitem"]')) {
3759
- if (b(n) || T(n) || n.getRootNode() instanceof ShadowRoot) continue;
3826
+ if (b(n) || N(n) || n.getRootNode() instanceof ShadowRoot) continue;
3760
3827
  const i = n.getAttribute("role");
3761
3828
  if ((n.tagName.toLowerCase() === "button" || n.tagName.toLowerCase() === "a") && i !== "menuitem") continue;
3762
- if (!y(n)) {
3829
+ if (!v(n)) {
3763
3830
  const o = n.querySelector("img[alt]");
3764
3831
  if ((e = o == null ? void 0 : o.getAttribute("alt")) != null && e.trim()) continue;
3765
3832
  a.push({
3766
3833
  ruleId: "accesslint-064",
3767
3834
  selector: p(n),
3768
- html: u(n),
3835
+ html: m(n),
3769
3836
  impact: "serious",
3770
3837
  message: "ARIA command has no accessible name."
3771
3838
  });
@@ -3773,7 +3840,7 @@ const wn = {
3773
3840
  }
3774
3841
  return a;
3775
3842
  }
3776
- }, Sn = {
3843
+ }, Tn = {
3777
3844
  id: "accesslint-065",
3778
3845
  wcag: ["4.1.2"],
3779
3846
  level: "A",
@@ -3783,18 +3850,18 @@ const wn = {
3783
3850
  run(t) {
3784
3851
  const a = [], e = '[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]';
3785
3852
  for (const n of t.querySelectorAll(e)) {
3786
- if (b(n) || T(n) || n.getRootNode() instanceof ShadowRoot || n.matches("input, select, textarea")) continue;
3787
- y(n) || a.push({
3853
+ if (b(n) || N(n) || n.getRootNode() instanceof ShadowRoot || n.matches("input, select, textarea")) continue;
3854
+ v(n) || a.push({
3788
3855
  ruleId: "accesslint-065",
3789
3856
  selector: p(n),
3790
- html: u(n),
3857
+ html: m(n),
3791
3858
  impact: "serious",
3792
3859
  message: "ARIA input field has no accessible name."
3793
3860
  });
3794
3861
  }
3795
3862
  return a;
3796
3863
  }
3797
- }, In = {
3864
+ }, Mn = {
3798
3865
  id: "accesslint-066",
3799
3866
  wcag: ["4.1.2"],
3800
3867
  level: "A",
@@ -3804,18 +3871,18 @@ const wn = {
3804
3871
  run(t) {
3805
3872
  const a = [], e = '[role="checkbox"], [role="switch"], [role="radio"], [role="menuitemcheckbox"], [role="menuitemradio"]';
3806
3873
  for (const n of t.querySelectorAll(e)) {
3807
- if (b(n) || T(n) || n.getRootNode() instanceof ShadowRoot || n.matches('input[type="checkbox"], input[type="radio"]')) continue;
3808
- y(n) || a.push({
3874
+ if (b(n) || N(n) || n.getRootNode() instanceof ShadowRoot || n.matches('input[type="checkbox"], input[type="radio"]')) continue;
3875
+ v(n) || a.push({
3809
3876
  ruleId: "accesslint-066",
3810
3877
  selector: p(n),
3811
- html: u(n),
3878
+ html: m(n),
3812
3879
  impact: "serious",
3813
3880
  message: "ARIA toggle field has no accessible name."
3814
3881
  });
3815
3882
  }
3816
3883
  return a;
3817
3884
  }
3818
- }, En = {
3885
+ }, Nn = {
3819
3886
  id: "accesslint-067",
3820
3887
  wcag: ["4.1.2"],
3821
3888
  level: "A",
@@ -3826,17 +3893,17 @@ const wn = {
3826
3893
  const a = [];
3827
3894
  for (const e of t.querySelectorAll('[role="meter"], meter')) {
3828
3895
  if (b(e)) continue;
3829
- y(e) || a.push({
3896
+ v(e) || a.push({
3830
3897
  ruleId: "accesslint-067",
3831
3898
  selector: p(e),
3832
- html: u(e),
3899
+ html: m(e),
3833
3900
  impact: "serious",
3834
3901
  message: "Meter has no accessible name."
3835
3902
  });
3836
3903
  }
3837
3904
  return a;
3838
3905
  }
3839
- }, qn = {
3906
+ }, $n = {
3840
3907
  id: "accesslint-068",
3841
3908
  wcag: ["4.1.2"],
3842
3909
  level: "A",
@@ -3847,17 +3914,17 @@ const wn = {
3847
3914
  const a = [];
3848
3915
  for (const e of t.querySelectorAll('[role="progressbar"], progress')) {
3849
3916
  if (b(e)) continue;
3850
- y(e) || a.push({
3917
+ v(e) || a.push({
3851
3918
  ruleId: "accesslint-068",
3852
3919
  selector: p(e),
3853
- html: u(e),
3920
+ html: m(e),
3854
3921
  impact: "serious",
3855
3922
  message: "Progressbar has no accessible name."
3856
3923
  });
3857
3924
  }
3858
3925
  return a;
3859
3926
  }
3860
- }, Ln = {
3927
+ }, Dn = {
3861
3928
  id: "accesslint-069",
3862
3929
  wcag: ["4.1.2"],
3863
3930
  level: "A",
@@ -3868,17 +3935,17 @@ const wn = {
3868
3935
  const a = [];
3869
3936
  for (const e of t.querySelectorAll('[role="dialog"], [role="alertdialog"], dialog')) {
3870
3937
  if (b(e)) continue;
3871
- y(e) || a.push({
3938
+ v(e) || a.push({
3872
3939
  ruleId: "accesslint-069",
3873
3940
  selector: p(e),
3874
- html: u(e),
3941
+ html: m(e),
3875
3942
  impact: "serious",
3876
3943
  message: "Dialog has no accessible name."
3877
3944
  });
3878
3945
  }
3879
3946
  return a;
3880
3947
  }
3881
- }, Rn = {
3948
+ }, Fn = {
3882
3949
  id: "accesslint-070",
3883
3950
  wcag: ["4.1.2"],
3884
3951
  level: "A",
@@ -3889,17 +3956,17 @@ const wn = {
3889
3956
  const a = [];
3890
3957
  for (const e of t.querySelectorAll('[role="tooltip"]')) {
3891
3958
  if (b(e)) continue;
3892
- y(e) || a.push({
3959
+ v(e) || a.push({
3893
3960
  ruleId: "accesslint-070",
3894
3961
  selector: p(e),
3895
- html: u(e),
3962
+ html: m(e),
3896
3963
  impact: "serious",
3897
3964
  message: "Tooltip has no accessible name."
3898
3965
  });
3899
3966
  }
3900
3967
  return a;
3901
3968
  }
3902
- }, Cn = {
3969
+ }, Pn = {
3903
3970
  id: "accesslint-071",
3904
3971
  wcag: ["4.1.2"],
3905
3972
  level: "A",
@@ -3910,17 +3977,17 @@ const wn = {
3910
3977
  const a = [];
3911
3978
  for (const e of t.querySelectorAll('[role="treeitem"]')) {
3912
3979
  if (b(e)) continue;
3913
- y(e) || a.push({
3980
+ v(e) || a.push({
3914
3981
  ruleId: "accesslint-071",
3915
3982
  selector: p(e),
3916
- html: u(e),
3983
+ html: m(e),
3917
3984
  impact: "serious",
3918
3985
  message: "Treeitem has no accessible name."
3919
3986
  });
3920
3987
  }
3921
3988
  return a;
3922
3989
  }
3923
- }, Tn = {
3990
+ }, Hn = {
3924
3991
  id: "accesslint-072",
3925
3992
  actRuleIds: ["kb1m8s"],
3926
3993
  wcag: ["4.1.2"],
@@ -3929,16 +3996,16 @@ const wn = {
3929
3996
  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.",
3930
3997
  prompt: "Identify the prohibited attribute and recommend removing it from this element.",
3931
3998
  run(t) {
3932
- return ne(t).prohibitedAttr;
3999
+ return oe(t).prohibitedAttr;
3933
4000
  }
3934
- }, Mn = [
4001
+ }, zn = [
3935
4002
  "a[href]",
3936
4003
  "button:not([disabled])",
3937
4004
  'input:not([disabled]):not([type="hidden"])',
3938
4005
  "select:not([disabled])",
3939
4006
  "textarea:not([disabled])",
3940
4007
  '[tabindex]:not([tabindex="-1"])'
3941
- ].join(", "), Nn = [
4008
+ ].join(", "), jn = [
3942
4009
  "aria-atomic",
3943
4010
  "aria-busy",
3944
4011
  "aria-controls",
@@ -3953,17 +4020,17 @@ const wn = {
3953
4020
  "aria-owns",
3954
4021
  "aria-relevant"
3955
4022
  ];
3956
- function Se(t) {
4023
+ function qe(t) {
3957
4024
  const a = [];
3958
- t.matches(Mn) && a.push("element is focusable");
3959
- for (const e of Nn)
4025
+ t.matches(zn) && a.push("element is focusable");
4026
+ for (const e of jn)
3960
4027
  if (t.hasAttribute(e)) {
3961
4028
  a.push(`has ${e}`);
3962
4029
  break;
3963
4030
  }
3964
4031
  return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
3965
4032
  }
3966
- const $n = {
4033
+ const Un = {
3967
4034
  id: "accesslint-073",
3968
4035
  actRuleIds: ["46ca7f"],
3969
4036
  wcag: ["4.1.2"],
@@ -3975,29 +4042,29 @@ const $n = {
3975
4042
  const a = [];
3976
4043
  for (const e of t.querySelectorAll('[role="presentation"], [role="none"]')) {
3977
4044
  if (b(e)) continue;
3978
- const n = Se(e);
4045
+ const n = qe(e);
3979
4046
  n.length > 0 && a.push({
3980
4047
  ruleId: "accesslint-073",
3981
4048
  selector: p(e),
3982
- html: u(e),
4049
+ html: m(e),
3983
4050
  impact: "serious",
3984
4051
  message: `Presentation role conflicts with: ${n.join(", ")}. The role will be ignored.`
3985
4052
  });
3986
4053
  }
3987
4054
  for (const e of t.querySelectorAll('img[alt=""]')) {
3988
4055
  if (b(e) || e.hasAttribute("role")) continue;
3989
- const n = Se(e);
4056
+ const n = qe(e);
3990
4057
  n.length > 0 && a.push({
3991
4058
  ruleId: "accesslint-073",
3992
4059
  selector: p(e),
3993
- html: u(e),
4060
+ html: m(e),
3994
4061
  impact: "serious",
3995
4062
  message: `Element with implicit presentation role (alt="") conflicts with: ${n.join(", ")}. The decorative role will be ignored.`
3996
4063
  });
3997
4064
  }
3998
4065
  return a;
3999
4066
  }
4000
- }, Dn = /* @__PURE__ */ new Set([
4067
+ }, Wn = /* @__PURE__ */ new Set([
4001
4068
  "button",
4002
4069
  "checkbox",
4003
4070
  "img",
@@ -4015,7 +4082,7 @@ const $n = {
4015
4082
  "spinbutton",
4016
4083
  "switch",
4017
4084
  "tab"
4018
- ]), Fn = [
4085
+ ]), On = [
4019
4086
  "a[href]",
4020
4087
  "button:not([disabled])",
4021
4088
  'input:not([disabled]):not([type="hidden"])',
@@ -4027,7 +4094,7 @@ const $n = {
4027
4094
  "iframe",
4028
4095
  "embed",
4029
4096
  "object"
4030
- ].join(", "), Pn = {
4097
+ ].join(", "), Bn = {
4031
4098
  id: "accesslint-074",
4032
4099
  actRuleIds: ["307n5z"],
4033
4100
  wcag: ["4.1.2"],
@@ -4038,14 +4105,14 @@ const $n = {
4038
4105
  const a = [];
4039
4106
  for (const e of t.querySelectorAll("*")) {
4040
4107
  if (b(e)) continue;
4041
- const n = F(e);
4042
- if (!(!n || !Dn.has(n))) {
4043
- for (const i of e.querySelectorAll(Fn))
4108
+ const n = H(e);
4109
+ if (!(!n || !Wn.has(n))) {
4110
+ for (const i of e.querySelectorAll(On))
4044
4111
  if (i !== e && !i.disabled) {
4045
4112
  a.push({
4046
4113
  ruleId: "accesslint-074",
4047
4114
  selector: p(i),
4048
- html: u(i),
4115
+ html: m(i),
4049
4116
  impact: "serious",
4050
4117
  message: `Focusable element inside a "${n}" role whose children are presentational.`
4051
4118
  });
@@ -4055,7 +4122,7 @@ const $n = {
4055
4122
  }
4056
4123
  return a;
4057
4124
  }
4058
- }, Hn = {
4125
+ }, Vn = {
4059
4126
  id: "accesslint-076",
4060
4127
  actRuleIds: ["2t702h"],
4061
4128
  wcag: ["4.1.2"],
@@ -4067,10 +4134,10 @@ const $n = {
4067
4134
  const a = [];
4068
4135
  for (const e of t.querySelectorAll("details > summary:first-of-type")) {
4069
4136
  if (b(e)) continue;
4070
- y(e) || a.push({
4137
+ v(e) || a.push({
4071
4138
  ruleId: "accesslint-076",
4072
4139
  selector: p(e),
4073
- html: u(e),
4140
+ html: m(e),
4074
4141
  impact: "serious",
4075
4142
  message: "<summary> element has no accessible name. Add descriptive text."
4076
4143
  });
@@ -4078,7 +4145,7 @@ const $n = {
4078
4145
  return a;
4079
4146
  }
4080
4147
  };
4081
- function zn(t) {
4148
+ function _n(t) {
4082
4149
  var i, s;
4083
4150
  const a = [], e = t.getAttribute("href");
4084
4151
  e && a.push(`href: ${e}`);
@@ -4095,7 +4162,7 @@ function zn(t) {
4095
4162
  return a.length > 0 ? a.join(`
4096
4163
  `) : void 0;
4097
4164
  }
4098
- const jn = {
4165
+ const Gn = {
4099
4166
  id: "accesslint-077",
4100
4167
  actRuleIds: ["c487ae"],
4101
4168
  wcag: ["2.4.4", "4.1.2"],
@@ -4106,19 +4173,19 @@ const jn = {
4106
4173
  run(t) {
4107
4174
  const a = [];
4108
4175
  for (const e of t.querySelectorAll('a[href], area[href], [role="link"]')) {
4109
- if (b(e) || T(e) || e.getRootNode() instanceof ShadowRoot) continue;
4110
- y(e) || a.push({
4176
+ if (b(e) || N(e) || e.getRootNode() instanceof ShadowRoot) continue;
4177
+ v(e) || a.push({
4111
4178
  ruleId: "accesslint-077",
4112
4179
  selector: p(e),
4113
- html: u(e),
4180
+ html: m(e),
4114
4181
  impact: "serious",
4115
4182
  message: "Link has no discernible text.",
4116
- context: zn(e)
4183
+ context: _n(e)
4117
4184
  });
4118
4185
  }
4119
4186
  return a;
4120
4187
  }
4121
- }, Un = {
4188
+ }, Yn = {
4122
4189
  id: "accesslint-078",
4123
4190
  wcag: ["2.4.1"],
4124
4191
  level: "A",
@@ -4137,14 +4204,14 @@ const jn = {
4137
4204
  t.getElementById(r) || a.push({
4138
4205
  ruleId: "accesslint-078",
4139
4206
  selector: p(n),
4140
- html: u(n),
4207
+ html: m(n),
4141
4208
  impact: "moderate",
4142
4209
  message: `Skip link points to "#${r}" which does not exist on the page.`
4143
4210
  });
4144
4211
  }
4145
4212
  return a;
4146
4213
  }
4147
- }, Wn = /* @__PURE__ */ new Set([
4214
+ }, Xn = /* @__PURE__ */ new Set([
4148
4215
  "block",
4149
4216
  "flex",
4150
4217
  "grid",
@@ -4152,41 +4219,49 @@ const jn = {
4152
4219
  "table-cell",
4153
4220
  "list-item",
4154
4221
  "flow-root"
4155
- ]), On = /* @__PURE__ */ new Set([
4222
+ ]), Kn = /* @__PURE__ */ new Set([
4156
4223
  "inline",
4157
4224
  "inline-block",
4158
4225
  "inline-flex",
4159
4226
  "inline-grid"
4160
4227
  ]);
4161
- function Bn(t) {
4228
+ function Jn(t) {
4162
4229
  let a = t.parentElement;
4163
- for (; a && !Wn.has(x(a).display); )
4230
+ for (; a && !Xn.has(w(a).display); )
4164
4231
  a = a.parentElement;
4165
4232
  if (!a) return null;
4166
4233
  const e = a.ownerDocument.createTreeWalker(a, NodeFilter.SHOW_TEXT);
4167
4234
  let n = "", i = null, s;
4168
4235
  for (; s = e.nextNode(); ) {
4169
4236
  if (!s.data.trim()) continue;
4170
- let o = s.parentElement, r = !1;
4171
- for (; o && o !== a; ) {
4172
- if (o.tagName === "A") {
4173
- r = !0;
4237
+ let r = s.parentElement, l = !1;
4238
+ for (; r && r !== a; ) {
4239
+ if (r.tagName === "A") {
4240
+ l = !0;
4174
4241
  break;
4175
4242
  }
4176
- o = o.parentElement;
4243
+ r = r.parentElement;
4177
4244
  }
4178
- r || (n += s.data, !i && s.parentElement && (i = C(x(s.parentElement).color)));
4245
+ l || (n += s.data, !i && s.parentElement && (i = R(w(s.parentElement).color)));
4179
4246
  }
4180
- return !i || !new RegExp("\\p{L}{2,}", "u").test(n) ? null : { block: a, textColor: i };
4247
+ const o = n.match(new RegExp("\\p{L}{3,}", "gu"));
4248
+ return !i || !o || o.length < 2 ? null : { block: a, textColor: i };
4181
4249
  }
4182
- function Ie(t, a) {
4250
+ function Le(t, a) {
4183
4251
  const e = t.textDecorationLine || t.textDecoration || "";
4184
4252
  return (e.includes("underline") || e.includes("line-through")) && e !== a;
4185
4253
  }
4186
- function H(t) {
4254
+ function U(t) {
4187
4255
  return t === "bold" ? 700 : t === "normal" ? 400 : parseInt(t) || 400;
4188
4256
  }
4189
- const Vn = {
4257
+ function Qn(t) {
4258
+ const a = t.ownerDocument.createTreeWalker(t, NodeFilter.SHOW_TEXT);
4259
+ let e;
4260
+ for (; e = a.nextNode(); )
4261
+ if (e.data.trim()) return !1;
4262
+ return !0;
4263
+ }
4264
+ const Zn = {
4190
4265
  id: "accesslint-079",
4191
4266
  wcag: ["1.4.1"],
4192
4267
  level: "A",
@@ -4196,41 +4271,41 @@ const Vn = {
4196
4271
  run(t) {
4197
4272
  const a = [];
4198
4273
  for (const e of t.querySelectorAll("a[href]")) {
4199
- if (b(e) || !k(e).trim() || e.closest('nav, header, footer, [role="navigation"], [role="banner"], [role="contentinfo"]')) continue;
4200
- const n = x(e);
4201
- if (!On.has(n.display || "inline")) continue;
4202
- const i = Bn(e);
4274
+ if (b(e) || !k(e).trim() || Qn(e) || e.closest('nav, header, footer, aside, [role="navigation"], [role="banner"], [role="contentinfo"], [role="complementary"]')) continue;
4275
+ const n = w(e);
4276
+ if (!Kn.has(n.display || "inline")) continue;
4277
+ const i = Jn(e);
4203
4278
  if (!i) continue;
4204
- const s = x(i.block), o = s.textDecorationLine || s.textDecoration || "";
4205
- if (Ie(n, o) || (parseFloat(n.borderBottomWidth) || 0) > 0 && n.borderBottomStyle !== "none" && n.borderBottomStyle !== "hidden" || Math.abs(H(n.fontWeight) - H(s.fontWeight)) >= 300 || n.fontStyle !== s.fontStyle) continue;
4206
- const l = parseFloat(n.fontSize) || 16, m = parseFloat(s.fontSize) || 16;
4207
- if (m > 0 && l / m >= 1.2) continue;
4279
+ const s = w(i.block), o = s.textDecorationLine || s.textDecoration || "";
4280
+ if (Le(n, o) || (parseFloat(n.borderBottomWidth) || 0) > 0 && n.borderBottomStyle !== "none" && n.borderBottomStyle !== "hidden" || Math.abs(U(n.fontWeight) - U(s.fontWeight)) >= 300 || n.fontStyle !== s.fontStyle) continue;
4281
+ const l = parseFloat(n.fontSize) || 16, d = parseFloat(s.fontSize) || 16;
4282
+ if (d > 0 && l / d >= 1.2) continue;
4208
4283
  let c = !1;
4209
4284
  for (const A of e.querySelectorAll("*")) {
4210
- const w = x(A);
4211
- if (Ie(w, o) || Math.abs(H(w.fontWeight) - H(s.fontWeight)) >= 300) {
4285
+ const x = w(A);
4286
+ if (Le(x, o) || Math.abs(U(x.fontWeight) - U(s.fontWeight)) >= 300) {
4212
4287
  c = !0;
4213
4288
  break;
4214
4289
  }
4215
4290
  }
4216
4291
  if (c) continue;
4217
- const d = C(n.color);
4218
- if (!d) continue;
4219
- const h = R(...d), g = R(...i.textColor), f = ie(h, g);
4292
+ const u = R(n.color);
4293
+ if (!u) continue;
4294
+ const h = I(...u), g = I(...i.textColor), f = M(h, g);
4220
4295
  if (f < 1.1 || f >= 3) continue;
4221
- const v = (A) => "#" + A.map((w) => w.toString(16).padStart(2, "0")).join("");
4296
+ const y = (A) => "#" + A.map((x) => x.toString(16).padStart(2, "0")).join("");
4222
4297
  a.push({
4223
4298
  ruleId: "accesslint-079",
4224
4299
  selector: p(e),
4225
- html: u(e),
4300
+ html: m(e),
4226
4301
  impact: "serious",
4227
4302
  message: "Link in text block is not visually distinguishable from surrounding text. Add a non-color visual indicator such as an underline or border.",
4228
- context: `link color: ${v(d)} rgb(${d.join(", ")}), surrounding text: ${v(i.textColor)} rgb(${i.textColor.join(", ")}), ratio: ${f.toFixed(2)}:1`
4303
+ context: `link color: ${y(u)} rgb(${u.join(", ")}), surrounding text: ${y(i.textColor)} rgb(${i.textColor.join(", ")}), ratio: ${f.toFixed(2)}:1`
4229
4304
  });
4230
4305
  }
4231
4306
  return a;
4232
4307
  }
4233
- }, _n = {
4308
+ }, ei = {
4234
4309
  id: "accesslint-080",
4235
4310
  actRuleIds: ["b5c3f8"],
4236
4311
  wcag: ["3.1.1"],
@@ -4257,7 +4332,7 @@ const Vn = {
4257
4332
  return [{
4258
4333
  ruleId: "accesslint-080",
4259
4334
  selector: p(a),
4260
- html: u(a),
4335
+ html: m(a),
4261
4336
  impact: "serious",
4262
4337
  message: "<html> element missing lang attribute.",
4263
4338
  context: i ? `Page text sample: "${i}"` : void 0
@@ -4265,17 +4340,17 @@ const Vn = {
4265
4340
  }
4266
4341
  return [];
4267
4342
  }
4268
- }, Gn = new Set(
4343
+ }, ti = new Set(
4269
4344
  "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(" ")
4270
- ), Yn = new Set(
4345
+ ), ai = new Set(
4271
4346
  "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(" ")
4272
- ), Xn = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
4273
- function je(t) {
4274
- if (!Xn.test(t)) return !1;
4347
+ ), ni = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
4348
+ function Be(t) {
4349
+ if (!ni.test(t)) return !1;
4275
4350
  const a = t.split("-")[0].toLowerCase();
4276
- return a.length === 2 ? Gn.has(a) : a.length === 3 ? !Yn.has(a) : !1;
4351
+ return a.length === 2 ? ti.has(a) : a.length === 3 ? !ai.has(a) : !1;
4277
4352
  }
4278
- const Kn = {
4353
+ const ii = {
4279
4354
  id: "accesslint-081",
4280
4355
  actRuleIds: ["bf051a"],
4281
4356
  wcag: ["3.1.1"],
@@ -4286,16 +4361,16 @@ const Kn = {
4286
4361
  run(t) {
4287
4362
  var e;
4288
4363
  const a = (e = t.documentElement.getAttribute("lang")) == null ? void 0 : e.trim();
4289
- return a && !je(a) ? [{
4364
+ return a && !Be(a) ? [{
4290
4365
  ruleId: "accesslint-081",
4291
4366
  selector: "html",
4292
- html: u(t.documentElement),
4367
+ html: m(t.documentElement),
4293
4368
  impact: "serious",
4294
4369
  message: `Invalid lang attribute value "${a}".`
4295
4370
  }] : [];
4296
4371
  }
4297
4372
  };
4298
- function Ee(t) {
4373
+ function Re(t) {
4299
4374
  var n;
4300
4375
  const a = t.ownerDocument.createTreeWalker(t, NodeFilter.SHOW_TEXT);
4301
4376
  let e;
@@ -4327,7 +4402,7 @@ function Ee(t) {
4327
4402
  }
4328
4403
  return !1;
4329
4404
  }
4330
- const Jn = {
4405
+ const si = {
4331
4406
  id: "accesslint-082",
4332
4407
  actRuleIds: ["de46e4"],
4333
4408
  wcag: ["3.1.2"],
@@ -4341,26 +4416,26 @@ const Jn = {
4341
4416
  if (b(e) || e === t.documentElement) continue;
4342
4417
  const n = e.getAttribute("lang"), i = n == null ? void 0 : n.trim();
4343
4418
  if (n && !i) {
4344
- Ee(e) && a.push({
4419
+ Re(e) && a.push({
4345
4420
  ruleId: "accesslint-082",
4346
4421
  selector: p(e),
4347
- html: u(e),
4422
+ html: m(e),
4348
4423
  impact: "serious",
4349
4424
  message: "Empty lang attribute value."
4350
4425
  });
4351
4426
  continue;
4352
4427
  }
4353
- i && Ee(e) && (je(i) || a.push({
4428
+ i && Re(e) && (Be(i) || a.push({
4354
4429
  ruleId: "accesslint-082",
4355
4430
  selector: p(e),
4356
- html: u(e),
4431
+ html: m(e),
4357
4432
  impact: "serious",
4358
4433
  message: `Invalid lang attribute value "${i}".`
4359
4434
  }));
4360
4435
  }
4361
4436
  return a;
4362
4437
  }
4363
- }, Qn = {
4438
+ }, oi = {
4364
4439
  id: "accesslint-083",
4365
4440
  wcag: ["3.1.1"],
4366
4441
  level: "A",
@@ -4376,14 +4451,14 @@ const Jn = {
4376
4451
  return [{
4377
4452
  ruleId: "accesslint-083",
4378
4453
  selector: "html",
4379
- html: u(a),
4454
+ html: m(a),
4380
4455
  impact: "moderate",
4381
4456
  message: `lang="${e}" and xml:lang="${n}" do not match.`
4382
4457
  }];
4383
4458
  }
4384
4459
  return [];
4385
4460
  }
4386
- }, Zn = {
4461
+ }, ri = {
4387
4462
  id: "accesslint-084",
4388
4463
  actRuleIds: ["a25f45"],
4389
4464
  wcag: ["1.3.1"],
@@ -4403,7 +4478,7 @@ const Jn = {
4403
4478
  a.push({
4404
4479
  ruleId: "accesslint-084",
4405
4480
  selector: p(e),
4406
- html: u(e),
4481
+ html: m(e),
4407
4482
  impact: "serious",
4408
4483
  message: `Headers attribute references the cell itself ("${o}").`
4409
4484
  });
@@ -4413,7 +4488,7 @@ const Jn = {
4413
4488
  a.push({
4414
4489
  ruleId: "accesslint-084",
4415
4490
  selector: p(e),
4416
- html: u(e),
4491
+ html: m(e),
4417
4492
  impact: "serious",
4418
4493
  message: `Headers attribute references non-existent ID "${o}".`
4419
4494
  });
@@ -4423,7 +4498,7 @@ const Jn = {
4423
4498
  }
4424
4499
  return a;
4425
4500
  }
4426
- }, ei = {
4501
+ }, li = {
4427
4502
  id: "accesslint-085",
4428
4503
  actRuleIds: ["d0f69e"],
4429
4504
  wcag: ["1.3.1"],
@@ -4439,14 +4514,32 @@ const Jn = {
4439
4514
  n.length > 0 && i.length === 0 && a.push({
4440
4515
  ruleId: "accesslint-085",
4441
4516
  selector: p(e),
4442
- html: u(e),
4517
+ html: m(e),
4443
4518
  impact: "serious",
4444
4519
  message: "Table has header cells but no data cells."
4445
4520
  });
4446
4521
  }
4447
4522
  return a;
4448
4523
  }
4449
- }, ti = {
4524
+ };
4525
+ function ci(t) {
4526
+ var n;
4527
+ const a = t.getAttribute("role");
4528
+ if (a === "presentation" || a === "none") return !1;
4529
+ if (a === "table" || a === "grid" || a === "treegrid" || t.querySelector("caption") || t.getAttribute("summary") || t.querySelector("thead, tfoot, colgroup") || t.querySelector("th[scope]") || t.querySelector("td[headers]")) return !0;
4530
+ const e = t.querySelectorAll("th");
4531
+ if (e.length === 0) return !1;
4532
+ for (const i of e)
4533
+ if ((n = i.textContent) != null && n.trim()) return !0;
4534
+ return !1;
4535
+ }
4536
+ function Ce(t) {
4537
+ let a = 0, e = t.previousElementSibling;
4538
+ for (; e; )
4539
+ a += parseInt(e.getAttribute("colspan") || "1", 10), e = e.previousElementSibling;
4540
+ return a;
4541
+ }
4542
+ const di = {
4450
4543
  id: "accesslint-086",
4451
4544
  wcag: ["1.3.1"],
4452
4545
  level: "A",
@@ -4454,52 +4547,51 @@ const Jn = {
4454
4547
  guidance: "In complex tables, screen reader users need header associations to understand data cells. Use th elements with scope attribute, or the headers attribute on td elements. For simple tables (≤3x3), this is less critical as context is usually clear.",
4455
4548
  prompt: "Explain whether to use scope attributes on headers or headers attribute on this cell.",
4456
4549
  run(t) {
4457
- var e, n;
4550
+ var e;
4458
4551
  const a = [];
4459
- for (const i of t.querySelectorAll("table")) {
4460
- if (b(i) || i.getAttribute("role") === "presentation" || i.getAttribute("role") === "none") continue;
4461
- const s = i.querySelectorAll("tr"), o = s.length;
4462
- let r = 0;
4463
- for (const d of s) {
4464
- const h = d.querySelectorAll("td, th");
4465
- let g = 0;
4466
- for (const f of h)
4467
- g += parseInt(f.getAttribute("colspan") || "1", 10);
4468
- r = Math.max(r, g);
4552
+ for (const n of t.querySelectorAll("table")) {
4553
+ if (b(n) || !ci(n)) continue;
4554
+ const i = n.querySelectorAll("tr"), s = i.length;
4555
+ let o = 0;
4556
+ for (const d of i) {
4557
+ const c = d.querySelectorAll("td, th");
4558
+ let u = 0;
4559
+ for (const h of c)
4560
+ u += parseInt(h.getAttribute("colspan") || "1", 10);
4561
+ o = Math.max(o, u);
4469
4562
  }
4470
- if (o <= 3 && r <= 3) continue;
4471
- const l = i.querySelector("th") !== null, m = i.querySelector("th[scope]") !== null, c = i.querySelector("td[headers]") !== null;
4472
- if (l)
4473
- for (const d of i.querySelectorAll("td")) {
4474
- if (b(d) || d.hasAttribute("headers")) continue;
4475
- const h = d.closest("tr");
4476
- if (!h) continue;
4477
- const g = h.querySelector("th") !== null, f = Array.from(h.children).indexOf(d);
4478
- let v = !1;
4479
- const A = i.querySelector("thead");
4480
- if (A) {
4481
- const w = A.querySelector("tr");
4482
- w && ((e = w.querySelectorAll("th, td")[f]) == null ? void 0 : e.tagName.toLowerCase()) === "th" && (v = !0);
4483
- }
4484
- if (!v) {
4485
- const w = i.querySelector("tbody > tr, tr");
4486
- w && ((n = w.querySelectorAll("th, td")[f]) == null ? void 0 : n.tagName.toLowerCase()) === "th" && (v = !0);
4487
- }
4488
- if (!g && !v && !m && !c) {
4489
- a.push({
4490
- ruleId: "accesslint-086",
4491
- selector: p(d),
4492
- html: u(d),
4493
- impact: "serious",
4494
- message: "Data cell has no associated header. Add th elements with scope, or headers attribute."
4495
- });
4496
- break;
4563
+ if (s <= 3 && o <= 3) continue;
4564
+ const r = n.querySelector("th[scope]") !== null, l = n.querySelector("td[headers]") !== null;
4565
+ for (const d of n.querySelectorAll("td")) {
4566
+ if (b(d) || !((e = d.textContent) != null && e.trim()) && !d.querySelector("img, svg, input, select, textarea") || d.hasAttribute("aria-label") || d.hasAttribute("aria-labelledby") || d.hasAttribute("headers")) continue;
4567
+ const c = d.closest("tr");
4568
+ if (!c) continue;
4569
+ const u = c.querySelector("th") !== null, h = Ce(d);
4570
+ let g = !1;
4571
+ const f = n.querySelector("thead"), y = (f == null ? void 0 : f.querySelector("tr")) ?? n.querySelector("tbody > tr, tr");
4572
+ if (y)
4573
+ for (const A of y.querySelectorAll("th, td")) {
4574
+ const x = Ce(A), S = parseInt(A.getAttribute("colspan") || "1", 10);
4575
+ if (A.tagName.toLowerCase() === "th" && h >= x && h < x + S) {
4576
+ g = !0;
4577
+ break;
4578
+ }
4497
4579
  }
4580
+ if (!u && !g && !r && !l) {
4581
+ a.push({
4582
+ ruleId: "accesslint-086",
4583
+ selector: p(d),
4584
+ html: m(d),
4585
+ impact: "serious",
4586
+ message: "Data cell has no associated header. Add th elements with scope, or headers attribute."
4587
+ });
4588
+ break;
4498
4589
  }
4590
+ }
4499
4591
  }
4500
4592
  return a;
4501
4593
  }
4502
- }, ai = {
4594
+ }, ui = {
4503
4595
  id: "accesslint-087",
4504
4596
  wcag: ["1.3.1"],
4505
4597
  level: "A",
@@ -4515,14 +4607,14 @@ const Jn = {
4515
4607
  s && !e.has(s) && a.push({
4516
4608
  ruleId: "accesslint-087",
4517
4609
  selector: p(i),
4518
- html: u(i),
4610
+ html: m(i),
4519
4611
  impact: "moderate",
4520
4612
  message: `Invalid scope value "${s}". Use row, col, rowgroup, or colgroup.`
4521
4613
  });
4522
4614
  }
4523
4615
  return a;
4524
4616
  }
4525
- }, ni = {
4617
+ }, mi = {
4526
4618
  id: "accesslint-088",
4527
4619
  wcag: [],
4528
4620
  level: "A",
@@ -4535,17 +4627,17 @@ const Jn = {
4535
4627
  for (const e of t.querySelectorAll("th")) {
4536
4628
  if (b(e)) continue;
4537
4629
  const n = e.closest("table");
4538
- (n == null ? void 0 : n.getAttribute("role")) === "presentation" || (n == null ? void 0 : n.getAttribute("role")) === "none" || y(e) || a.push({
4630
+ (n == null ? void 0 : n.getAttribute("role")) === "presentation" || (n == null ? void 0 : n.getAttribute("role")) === "none" || v(e) || a.push({
4539
4631
  ruleId: "accesslint-088",
4540
4632
  selector: p(e),
4541
- html: u(e),
4633
+ html: m(e),
4542
4634
  impact: "minor",
4543
4635
  message: "Table header cell is empty. Add text or use aria-label."
4544
4636
  });
4545
4637
  }
4546
4638
  return a;
4547
4639
  }
4548
- }, _ = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], ii = {
4640
+ }, X = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], pi = {
4549
4641
  id: "accesslint-089",
4550
4642
  wcag: ["4.1.2"],
4551
4643
  level: "A",
@@ -4555,7 +4647,7 @@ const Jn = {
4555
4647
  run(t) {
4556
4648
  const a = [], e = /* @__PURE__ */ new Set();
4557
4649
  for (const i of t.querySelectorAll("[aria-labelledby], [aria-describedby], [aria-controls], [aria-owns], [aria-flowto]"))
4558
- for (const s of _) {
4650
+ for (const s of X) {
4559
4651
  const o = i.getAttribute(s);
4560
4652
  o && o.split(/\s+/).forEach((r) => e.add(r));
4561
4653
  }
@@ -4569,31 +4661,31 @@ const Jn = {
4569
4661
  for (const [i, s] of n) {
4570
4662
  if (s <= 1) continue;
4571
4663
  const o = t.querySelectorAll(`#${CSS.escape(i)}`), r = t.querySelector(
4572
- _.map((c) => `[${c}~="${CSS.escape(i)}"]`).join(", ")
4664
+ X.map((c) => `[${c}~="${CSS.escape(i)}"]`).join(", ")
4573
4665
  ), l = t.querySelector(`label[for="${CSS.escape(i)}"]`);
4574
- let m;
4666
+ let d;
4575
4667
  if (r) {
4576
- const c = _.find(
4577
- (d) => {
4668
+ const c = X.find(
4669
+ (u) => {
4578
4670
  var h;
4579
- return (h = r.getAttribute(d)) == null ? void 0 : h.split(/\s+/).includes(i);
4671
+ return (h = r.getAttribute(u)) == null ? void 0 : h.split(/\s+/).includes(i);
4580
4672
  }
4581
4673
  );
4582
- c && (m = c);
4583
- } else l && (m = "label[for]");
4674
+ c && (d = c);
4675
+ } else l && (d = "label[for]");
4584
4676
  a.push({
4585
4677
  ruleId: "accesslint-089",
4586
4678
  selector: p(o[1]),
4587
- html: u(o[1]),
4679
+ html: m(o[1]),
4588
4680
  impact: "critical",
4589
- message: `Duplicate ID "${i}" referenced by ${m ?? "an accessibility attribute"}.`,
4590
- context: `First element: ${u(o[0])}${m ? `
4591
- Referenced by: ${m}` : ""}`
4681
+ message: `Duplicate ID "${i}" referenced by ${d ?? "an accessibility attribute"}.`,
4682
+ context: `First element: ${m(o[0])}${d ? `
4683
+ Referenced by: ${d}` : ""}`
4592
4684
  });
4593
4685
  }
4594
4686
  return a;
4595
4687
  }
4596
- }, si = {
4688
+ }, hi = {
4597
4689
  id: "accesslint-090",
4598
4690
  actRuleIds: ["eac66b"],
4599
4691
  wcag: ["1.2.2"],
@@ -4608,14 +4700,14 @@ Referenced by: ${m}` : ""}`
4608
4700
  e.querySelector('track[kind="captions"], track[kind="subtitles"]') || a.push({
4609
4701
  ruleId: "accesslint-090",
4610
4702
  selector: p(e),
4611
- html: u(e),
4703
+ html: m(e),
4612
4704
  impact: "critical",
4613
4705
  message: "Video element has no captions track."
4614
4706
  });
4615
4707
  }
4616
4708
  return a;
4617
4709
  }
4618
- }, oi = {
4710
+ }, bi = {
4619
4711
  id: "accesslint-091",
4620
4712
  actRuleIds: ["e7aa44"],
4621
4713
  wcag: ["1.2.1"],
@@ -4631,14 +4723,14 @@ Referenced by: ${m}` : ""}`
4631
4723
  i && i.querySelector('a[href*="transcript"], a[href*="text"]') || a.push({
4632
4724
  ruleId: "accesslint-091",
4633
4725
  selector: p(e),
4634
- html: u(e),
4726
+ html: m(e),
4635
4727
  impact: "critical",
4636
4728
  message: "Audio element has no transcript or text alternative. Add a transcript or track element."
4637
4729
  });
4638
4730
  }
4639
4731
  return a;
4640
4732
  }
4641
- }, ri = /* @__PURE__ */ new Set([
4733
+ }, gi = /* @__PURE__ */ new Set([
4642
4734
  "SCRIPT",
4643
4735
  "STYLE",
4644
4736
  "NOSCRIPT",
@@ -4654,13 +4746,22 @@ Referenced by: ${m}` : ""}`
4654
4746
  "BR",
4655
4747
  "HR"
4656
4748
  ]);
4657
- function ae([t, a, e]) {
4749
+ function se([t, a, e]) {
4658
4750
  return "#" + [t, a, e].map((n) => n.toString(16).padStart(2, "0")).join("");
4659
4751
  }
4660
- function li(t) {
4752
+ function fi(t, a, e) {
4753
+ const n = I(t[0], t[1], t[2]), i = I(a[0], a[1], a[2]);
4754
+ let s = M(n, i);
4755
+ for (const o of e) {
4756
+ const r = I(o.color[0], o.color[1], o.color[2]);
4757
+ s = Math.max(s, M(n, r), M(r, i));
4758
+ }
4759
+ return s;
4760
+ }
4761
+ function vi(t) {
4661
4762
  return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!(t.closest("fieldset[disabled]") || t.getAttribute("aria-disabled") === "true");
4662
4763
  }
4663
- function ci(t, a) {
4764
+ function yi(t, a) {
4664
4765
  if (t.tagName !== "LABEL") return !1;
4665
4766
  const e = t, n = e.htmlFor;
4666
4767
  if (n) {
@@ -4672,7 +4773,7 @@ function ci(t, a) {
4672
4773
  const s = e.id;
4673
4774
  return !!(s && a.querySelector(`[aria-labelledby~="${s}"][aria-disabled="true"]`));
4674
4775
  }
4675
- function di(t) {
4776
+ function wi(t) {
4676
4777
  const a = t.clip;
4677
4778
  if (a && a.startsWith("rect(")) {
4678
4779
  const n = a.match(/[\d.]+/g);
@@ -4686,25 +4787,25 @@ function di(t) {
4686
4787
  }
4687
4788
  return !1;
4688
4789
  }
4689
- function ui(t) {
4790
+ function Ai(t) {
4690
4791
  if (b(t)) return !0;
4691
4792
  let a = t;
4692
4793
  for (; a; ) {
4693
- const e = x(a);
4694
- if (e.display === "none" || e.visibility === "hidden" || di(e)) return !0;
4794
+ const e = w(a);
4795
+ if (e.display === "none" || e.visibility === "hidden" || wi(e)) return !0;
4695
4796
  a = a.parentElement;
4696
4797
  }
4697
4798
  return !1;
4698
4799
  }
4699
- function mi(t) {
4800
+ function xi(t) {
4700
4801
  let a = 1, e = t;
4701
4802
  for (; e; ) {
4702
- const n = x(e), i = parseFloat(n.opacity);
4803
+ const n = w(e), i = parseFloat(n.opacity);
4703
4804
  isNaN(i) || (a *= i), e = e.parentElement;
4704
4805
  }
4705
4806
  return a;
4706
4807
  }
4707
- const pi = {
4808
+ const ki = {
4708
4809
  grayscale: 0,
4709
4810
  blur: 0,
4710
4811
  "hue-rotate": 0,
@@ -4715,44 +4816,44 @@ const pi = {
4715
4816
  saturate: 1,
4716
4817
  opacity: 1
4717
4818
  };
4718
- function hi(t) {
4819
+ function Si(t) {
4719
4820
  const a = parseFloat(t);
4720
4821
  return isNaN(a) ? NaN : t.trim().endsWith("%") ? a / 100 : a;
4721
4822
  }
4722
- const qe = /([a-z-]+)\(([^)]*)\)/g;
4723
- function Le(t) {
4823
+ const Te = /([a-z-]+)\(([^)]*)\)/g;
4824
+ function Me(t) {
4724
4825
  let a, e = !1;
4725
- for (qe.lastIndex = 0; a = qe.exec(t); ) {
4826
+ for (Te.lastIndex = 0; a = Te.exec(t); ) {
4726
4827
  e = !0;
4727
- const n = pi[a[1]];
4728
- if (n === void 0 || hi(a[2]) !== n) return !1;
4828
+ const n = ki[a[1]];
4829
+ if (n === void 0 || Si(a[2]) !== n) return !1;
4729
4830
  }
4730
4831
  return e;
4731
4832
  }
4732
- function bi(t) {
4833
+ function Ii(t) {
4733
4834
  let a = t;
4734
4835
  for (; a; ) {
4735
- const e = x(a), n = e.filter;
4736
- if (n && n !== "none" && n !== "initial" && !Le(n)) return !0;
4836
+ const e = w(a), n = e.filter;
4837
+ if (n && n !== "none" && n !== "initial" && !Me(n)) return !0;
4737
4838
  const i = e.mixBlendMode;
4738
4839
  if (i && i !== "normal" && i !== "initial") return !0;
4739
4840
  const s = e.backdropFilter;
4740
- if (s && s !== "none" && s !== "initial" && !Le(s)) return !0;
4841
+ if (s && s !== "none" && s !== "initial" && !Me(s)) return !0;
4741
4842
  a = a.parentElement;
4742
4843
  }
4743
4844
  return !1;
4744
4845
  }
4745
- function gi(t) {
4846
+ function Ei(t) {
4746
4847
  return t.closest("select") !== null;
4747
4848
  }
4748
- function fi(t) {
4849
+ function qi(t) {
4749
4850
  const a = t.replace(/\s/g, "");
4750
4851
  return a ? !new RegExp("\\p{L}", "u").test(a) : !0;
4751
4852
  }
4752
- function vi(t) {
4853
+ function Li(t) {
4753
4854
  return t.closest('[aria-disabled="true"]') !== null;
4754
4855
  }
4755
- const yi = {
4856
+ const Ri = {
4756
4857
  id: "accesslint-092",
4757
4858
  actRuleIds: ["afw4f7"],
4758
4859
  wcag: ["1.4.3"],
@@ -4761,9 +4862,9 @@ const yi = {
4761
4862
  guidance: "WCAG SC 1.4.3 requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (>=24px or >=18.66px bold). Increase the contrast by darkening the text or lightening the background, or vice versa.",
4762
4863
  prompt: "Suggest changing the text or background color to meet the minimum contrast ratio.",
4763
4864
  run(t) {
4764
- return Ue(t, "accesslint-092", "AA");
4865
+ return Ve(t, "accesslint-092", "AA");
4765
4866
  }
4766
- }, wi = {
4867
+ }, Ci = {
4767
4868
  id: "accesslint-093",
4768
4869
  actRuleIds: ["09o5cg"],
4769
4870
  wcag: ["1.4.6"],
@@ -4771,13 +4872,13 @@ const yi = {
4771
4872
  description: "Text elements must have enhanced color contrast against the background (WCAG AAA).",
4772
4873
  guidance: "WCAG SC 1.4.6 (AAA) requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text (>=24px or >=18.66px bold).",
4773
4874
  run(t) {
4774
- return Ue(t, "accesslint-093", "AAA");
4875
+ return Ve(t, "accesslint-093", "AAA");
4775
4876
  }
4776
4877
  };
4777
- function Ai(t) {
4878
+ function Ti(t) {
4778
4879
  let a = t;
4779
4880
  for (; a; ) {
4780
- const e = x(a), n = e.backgroundImage;
4881
+ const e = w(a), n = e.backgroundImage;
4781
4882
  if (n && n !== "none" && n !== "initial")
4782
4883
  return n.includes("gradient(") ? { bgImage: n, gradientEl: a } : null;
4783
4884
  const i = e.backgroundColor;
@@ -4785,7 +4886,7 @@ function Ai(t) {
4785
4886
  a = a.parentElement;
4786
4887
  continue;
4787
4888
  }
4788
- if (Te(i) < 0.1) {
4889
+ if (z(i) < 0.01) {
4789
4890
  a = a.parentElement;
4790
4891
  continue;
4791
4892
  }
@@ -4793,215 +4894,211 @@ function Ai(t) {
4793
4894
  }
4794
4895
  return null;
4795
4896
  }
4796
- function xi(t, a, e, n, i, s, o, r, l) {
4797
- const m = mt(r, l);
4798
- if (m.length === 0) return null;
4799
- let c = 0, d = m[0];
4800
- for (const f of m) {
4801
- let v = a;
4802
- e < 1 && (v = L(a, f, e)), n < 1 && (v = L(v, f, n));
4803
- const A = ie(
4804
- R(v[0], v[1], v[2]),
4805
- R(f[0], f[1], f[2])
4897
+ function Mi(t, a, e, n, i, s, o, r, l) {
4898
+ const d = gt(r, l);
4899
+ if (d.length === 0) return null;
4900
+ let c = 0, u = d[0];
4901
+ for (const f of d) {
4902
+ let y = a;
4903
+ e < 1 && (y = L(a, f, e)), n < 1 && (y = L(y, f, n));
4904
+ const A = M(
4905
+ I(y[0], y[1], y[2]),
4906
+ I(f[0], f[1], f[2])
4806
4907
  );
4807
- A > c && (c = A, d = f);
4908
+ A > c && (c = A, u = f);
4808
4909
  }
4809
4910
  if (c >= i) return null;
4810
4911
  let h = a;
4811
- e < 1 && (h = L(a, d, e)), n < 1 && (h = L(h, d, n));
4912
+ e < 1 && (h = L(a, u, e)), n < 1 && (h = L(h, u, n));
4812
4913
  const g = Math.round(c * 100) / 100;
4813
4914
  return {
4814
4915
  ruleId: s,
4815
4916
  selector: p(t),
4816
- html: u(t),
4917
+ html: m(t),
4817
4918
  impact: "serious",
4818
4919
  message: `Insufficient${o === "AAA" ? " enhanced" : ""} color contrast ratio of ${g}:1 (required ${i}:1).`,
4819
- context: `foreground: ${ae(h)} rgb(${h.join(", ")}), background: gradient, ratio: ${g}:1, required: ${i}:1`
4920
+ context: `foreground: ${se(h)} rgb(${h.join(", ")}), background: gradient, ratio: ${g}:1, required: ${i}:1`
4820
4921
  };
4821
4922
  }
4822
- function Ue(t, a, e) {
4923
+ function Ve(t, a, e) {
4823
4924
  const n = [], i = t.body;
4824
4925
  if (!i) return [];
4825
4926
  const s = t.createTreeWalker(i, NodeFilter.SHOW_TEXT), o = /* @__PURE__ */ new Set();
4826
4927
  let r;
4827
4928
  for (; r = s.nextNode(); ) {
4828
- if (!r.textContent || !r.textContent.trim() || fi(r.textContent)) continue;
4929
+ if (!r.textContent || !r.textContent.trim() || qi(r.textContent)) continue;
4829
4930
  const l = r.parentElement;
4830
- if (!l || o.has(l) || (o.add(l), ri.has(l.tagName))) continue;
4831
- const m = l.tagName;
4832
- if (m === "BODY" || m === "HTML" || gi(l) || li(l) || ci(l, t) || vi(l) || ui(l)) continue;
4833
- const c = x(l);
4931
+ if (!l || o.has(l) || (o.add(l), gi.has(l.tagName))) continue;
4932
+ const d = l.tagName;
4933
+ if (d === "BODY" || d === "HTML" || Ei(l) || vi(l) || yi(l, t) || Li(l) || Ai(l)) continue;
4934
+ const c = w(l);
4834
4935
  if (parseFloat(c.opacity) === 0) continue;
4835
- const d = mi(l);
4836
- if (d < 0.1) continue;
4936
+ const u = xi(l);
4937
+ if (u < 0.1) continue;
4837
4938
  const h = c.textShadow;
4838
- if (h && h !== "none" && h !== "initial" || bi(l)) continue;
4839
- const g = C(c.color);
4840
- if (!g) continue;
4841
- const f = Te(c.color);
4842
- if (f === 0 || ht(l)) continue;
4843
- const v = e === "AAA" ? ge(l) ? 4.5 : 7 : ge(l) ? 3 : 4.5;
4844
- let A = be(l);
4845
- if (!A) {
4846
- const S = Ai(l);
4847
- if (S) {
4848
- const O = S.gradientEl.parentElement ? be(S.gradientEl.parentElement) : null, P = xi(
4939
+ let g = null;
4940
+ if (h && h !== "none" && h !== "initial" && (g = xt(h), !g) || Ii(l) || kt(l)) continue;
4941
+ const f = R(c.color);
4942
+ if (!f) continue;
4943
+ const y = z(c.color);
4944
+ if (y === 0 || vt(l)) continue;
4945
+ const A = e === "AAA" ? ve(l) ? 4.5 : 7 : ve(l) ? 3 : 4.5;
4946
+ let x = fe(l);
4947
+ if (!x) {
4948
+ if (g) continue;
4949
+ const E = Ti(l);
4950
+ if (E) {
4951
+ const V = E.gradientEl.parentElement ? fe(E.gradientEl.parentElement) : null, j = Mi(
4849
4952
  l,
4850
- g,
4851
4953
  f,
4852
- d,
4853
- v,
4954
+ y,
4955
+ u,
4956
+ A,
4854
4957
  a,
4855
4958
  e,
4856
- S.bgImage,
4857
- O ?? [255, 255, 255]
4959
+ E.bgImage,
4960
+ V ?? [255, 255, 255]
4858
4961
  );
4859
- P && n.push(P);
4962
+ j && n.push(j);
4860
4963
  }
4861
4964
  continue;
4862
4965
  }
4863
- let w = g;
4864
- f < 1 && (w = L(g, A, f)), d < 1 && (w = L(w, A, d));
4865
- const W = R(w[0], w[1], w[2]), _e = R(A[0], A[1], A[2]), ce = ie(W, _e);
4866
- if (ce < v) {
4867
- const S = Math.round(ce * 100) / 100, O = ae(w), P = ae(A);
4966
+ let S = f;
4967
+ y < 1 && (S = L(f, x, y)), u < 1 && (S = L(S, x, u));
4968
+ const Ke = I(S[0], S[1], S[2]), Je = I(x[0], x[1], x[2]), ue = g ? fi(S, x, g) : M(Ke, Je);
4969
+ if (ue < A) {
4970
+ const E = Math.round(ue * 100) / 100, V = se(S), j = se(x);
4868
4971
  n.push({
4869
4972
  ruleId: a,
4870
4973
  selector: p(l),
4871
- html: u(l),
4974
+ html: m(l),
4872
4975
  impact: "serious",
4873
- message: `Insufficient${e === "AAA" ? " enhanced" : ""} color contrast ratio of ${S}:1 (required ${v}:1).`,
4874
- context: `foreground: ${O} rgb(${w.join(", ")}), background: ${P} rgb(${A.join(", ")}), ratio: ${S}:1, required: ${v}:1`
4976
+ message: `Insufficient${e === "AAA" ? " enhanced" : ""} color contrast ratio of ${E}:1 (required ${A}:1).`,
4977
+ context: `foreground: ${V} rgb(${S.join(", ")}), background: ${j} rgb(${x.join(", ")}), ratio: ${E}:1, required: ${A}:1`
4875
4978
  });
4876
4979
  }
4877
4980
  }
4878
4981
  return n;
4879
4982
  }
4880
- const We = [
4983
+ const _e = [
4881
4984
  // Document Structure
4882
- Ma,
4883
- Na,
4884
- $a,
4885
- Da,
4886
- Fa,
4887
- Ha,
4888
- ja,
4889
4985
  za,
4890
- Ka,
4891
- Qa,
4986
+ ja,
4987
+ Ua,
4988
+ Wa,
4989
+ Oa,
4990
+ Va,
4991
+ Ga,
4992
+ _a,
4993
+ nn,
4994
+ on,
4892
4995
  // Images
4893
- xt,
4894
- St,
4895
- It,
4896
- Et,
4897
- Lt,
4898
4996
  Rt,
4899
4997
  Tt,
4900
4998
  Mt,
4999
+ Nt,
5000
+ Dt,
4901
5001
  Ft,
4902
- // Forms
4903
- Ut,
4904
- Wt,
5002
+ Ht,
5003
+ zt,
4905
5004
  Ot,
4906
- Bt,
5005
+ // Forms
5006
+ Yt,
5007
+ Xt,
5008
+ Kt,
4907
5009
  Jt,
4908
- Qt,
4909
- Zt,
5010
+ ia,
5011
+ sa,
5012
+ oa,
4910
5013
  // Keyboard
4911
- ta,
4912
- na,
5014
+ la,
4913
5015
  da,
4914
- ua,
4915
- ma,
4916
- ha,
4917
- // Structure
4918
- ba,
4919
- Pa,
4920
- Za,
4921
- ga,
4922
5016
  fa,
4923
5017
  va,
4924
5018
  ya,
4925
- wa,
4926
5019
  Aa,
5020
+ // Structure
4927
5021
  xa,
5022
+ Ba,
5023
+ rn,
4928
5024
  ka,
4929
5025
  Sa,
4930
5026
  Ia,
5027
+ Ea,
4931
5028
  qa,
4932
- Ta,
4933
5029
  La,
5030
+ Ra,
4934
5031
  Ca,
4935
- Wa,
4936
- Ba,
4937
- Va,
4938
- Ya,
4939
- // ARIA
4940
- en,
5032
+ Ta,
5033
+ Ma,
5034
+ $a,
5035
+ Ha,
5036
+ Da,
5037
+ Pa,
5038
+ Xa,
5039
+ Ja,
5040
+ Qa,
4941
5041
  tn,
4942
- an,
4943
- sn,
5042
+ // ARIA
5043
+ ln,
5044
+ cn,
4944
5045
  dn,
4945
- pn,
4946
- gn,
5046
+ mn,
4947
5047
  fn,
4948
- An,
4949
- xn,
5048
+ wn,
4950
5049
  kn,
4951
5050
  Sn,
4952
- In,
4953
- En,
4954
- qn,
4955
5051
  Ln,
4956
5052
  Rn,
4957
5053
  Cn,
4958
5054
  Tn,
5055
+ Mn,
5056
+ Nn,
4959
5057
  $n,
5058
+ Dn,
5059
+ Fn,
4960
5060
  Pn,
4961
- rn,
4962
5061
  Hn,
4963
- // Links
4964
- jn,
4965
5062
  Un,
5063
+ Bn,
5064
+ hn,
4966
5065
  Vn,
4967
- // Language
4968
- _n,
4969
- Kn,
4970
- Jn,
4971
- Qn,
4972
- // Tables
5066
+ // Links
5067
+ Gn,
5068
+ Yn,
4973
5069
  Zn,
5070
+ // Language
4974
5071
  ei,
4975
- ti,
4976
- ai,
4977
- ni,
4978
- // Parsing
4979
5072
  ii,
4980
- // Media
4981
5073
  si,
4982
5074
  oi,
5075
+ // Tables
5076
+ ri,
5077
+ li,
5078
+ di,
5079
+ ui,
5080
+ mi,
5081
+ // Parsing
5082
+ pi,
5083
+ // Media
5084
+ hi,
5085
+ bi,
4983
5086
  // Color
4984
- yi,
4985
- wi
4986
- ], ki = /* @__PURE__ */ new Set([
4987
- // No ACT mapping; disabled due to known precision issues
4988
- "accesslint-059",
4989
- "accesslint-068",
4990
- "accesslint-070",
4991
- "accesslint-086"
4992
- ]);
4993
- let re = [], Oe = /* @__PURE__ */ new Set(), Be = /* @__PURE__ */ new Set(), E, D;
4994
- function Li(t) {
4995
- t.additionalRules && (re = t.additionalRules), t.disabledRules && (Oe = new Set(t.disabledRules)), t.enabledRules && (Be = new Set(t.enabledRules)), "locale" in t && (E = t.locale || void 0), D = void 0;
5087
+ Ri,
5088
+ Ci
5089
+ ];
5090
+ let ce = [], Ge = /* @__PURE__ */ new Set(), Ye = !1, C, P;
5091
+ function Pi(t) {
5092
+ t.additionalRules && (ce = t.additionalRules), t.disabledRules && (Ge = new Set(t.disabledRules)), "includeAAA" in t && (Ye = !!t.includeAAA), "locale" in t && (C = t.locale || void 0), P = void 0;
4996
5093
  }
4997
- function le() {
4998
- if (D) return D;
4999
- const a = We.filter((e) => Oe.has(e.id) ? !1 : Be.has(e.id) ? !0 : !ki.has(e.id)).concat(re);
5000
- return E ? (D = ft(a, E), D) : a;
5094
+ function de() {
5095
+ if (P) return P;
5096
+ const a = _e.filter((e) => !(Ge.has(e.id) || e.level === "AAA" && !Ye)).concat(ce);
5097
+ return C ? (P = St(a, C), P) : a;
5001
5098
  }
5002
- function Ri(t) {
5003
- Ve();
5004
- const a = le(), e = E, n = [];
5099
+ function Hi(t) {
5100
+ Xe();
5101
+ const a = de(), e = C, n = [];
5005
5102
  let i = 0;
5006
5103
  return {
5007
5104
  processChunk(s) {
@@ -5016,17 +5113,17 @@ function Ri(t) {
5016
5113
  return i < a.length;
5017
5114
  },
5018
5115
  getViolations() {
5019
- return e ? Me(n, e) : n;
5116
+ return e ? Fe(n, e) : n;
5020
5117
  }
5021
5118
  };
5022
5119
  }
5023
- function Ve() {
5024
- Qe(), Ge(), Ye(), ct(), lt(), Ze();
5120
+ function Xe() {
5121
+ nt(), Qe(), Ze(), ht(), pt(), it();
5025
5122
  }
5026
- function Ci(t) {
5123
+ function zi(t) {
5027
5124
  var n;
5028
- Ve();
5029
- const a = le(), e = [];
5125
+ Xe();
5126
+ const a = de(), e = [];
5030
5127
  for (const i of a)
5031
5128
  try {
5032
5129
  e.push(...i.run(t));
@@ -5035,18 +5132,18 @@ function Ci(t) {
5035
5132
  return {
5036
5133
  url: ((n = t.location) == null ? void 0 : n.href) ?? "",
5037
5134
  timestamp: Date.now(),
5038
- violations: E ? Me(e, E) : e,
5135
+ violations: C ? Fe(e, C) : e,
5039
5136
  ruleCount: a.length
5040
5137
  };
5041
5138
  }
5042
- const Si = new Map(We.map((t) => [t.id, t]));
5043
- function Ti(t) {
5044
- if (E)
5045
- return le().find((n) => n.id === t);
5046
- const a = Si.get(t);
5047
- return a || re.find((e) => e.id === t);
5139
+ const Ni = new Map(_e.map((t) => [t.id, t]));
5140
+ function ji(t) {
5141
+ if (C)
5142
+ return de().find((n) => n.id === t);
5143
+ const a = Ni.get(t);
5144
+ return a || ce.find((e) => e.id === t);
5048
5145
  }
5049
- const Mi = {
5146
+ const Ui = {
5050
5147
  "accesslint-001": { description: "Documents must have a <title> element to provide users with an overview of content.", guidance: "Screen reader users rely on page titles to identify and navigate between tabs/windows. Add a descriptive <title> element in <head> that summarizes the page purpose. Keep titles unique across the site, placing specific content before the site name (e.g., 'Contact Us - Acme Corp').", messages: { "Document <title> element is empty.": "Document <title> element is empty.", "Document is missing a <title> element.": "Document is missing a <title> element." } },
5051
5148
  "accesslint-002": { description: "Page must have a mechanism to bypass repeated blocks of content.", guidance: 'Keyboard users must be able to skip repetitive content like navigation. Provide a skip link at the top of the page that links to the main content (e.g., <a href="#main">Skip to main content</a>), or use a <main> landmark. Screen readers can jump directly to landmarks, so a properly marked-up <main> element satisfies this requirement.', messages: { "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link.": "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link." } },
5052
5149
  "accesslint-003": { description: "Page should contain a level-one heading.", guidance: "A level-one heading (<h1> or role='heading' with aria-level='1') helps users understand the page topic and provides a landmark for screen reader navigation. Each page should have exactly one h1 that describes the main content, typically matching or similar to the page title.", messages: { "Page does not contain a level-one heading.": "Page does not contain a level-one heading." } },
@@ -5140,7 +5237,7 @@ const Mi = {
5140
5237
  "accesslint-053": { description: "Page orientation must not be restricted using CSS transforms.", guidance: "Users with motor disabilities may mount their device in a fixed orientation. Using CSS transforms with @media (orientation: portrait/landscape) to rotate content 90° effectively locks the page to one orientation. Remove the orientation-dependent transform and use responsive design instead.", messages: { "CSS locks page orientation via @media (orientation: {0}) with a 90° transform.": "CSS locks page orientation via @media (orientation: {0}) with a 90° transform." } },
5141
5238
  "accesslint-074": { description: "Elements with a role that makes children presentational must not contain focusable content.", guidance: "Roles like button, checkbox, img, tab, and others make their children presentational — hidden from assistive technologies. If those children are focusable, keyboard users can reach elements that screen reader users cannot perceive. Move focusable content outside the parent or remove the focusability.", messages: { 'Focusable element inside a "{0}" role whose children are presentational.': 'Focusable element inside a "{0}" role whose children are presentational.' } },
5142
5239
  "accesslint-032": { description: "Elements in sequential focus order must have a visible focus indicator.", guidance: "Keyboard users need to see which element has focus. Do not remove the default focus outline (outline: none) without providing an alternative visible indicator. Use :focus-visible or :focus styles to ensure focus is always perceivable.", messages: { "Focusable element has outline removed without a visible focus alternative.": "Focusable element has outline removed without a visible focus alternative." } }
5143
- }, Ni = {
5240
+ }, Wi = {
5144
5241
  "accesslint-001": { description: "Los documentos deben tener un elemento <title> para proporcionar a los usuarios una vista general del contenido.", guidance: "Los usuarios de lectores de pantalla dependen de los títulos de página para identificar y navegar entre pestañas/ventanas. Agregue un elemento <title> descriptivo en <head> que resuma el propósito de la página. Mantenga los títulos únicos en todo el sitio, colocando el contenido específico antes del nombre del sitio (por ejemplo, 'Contáctenos - Acme Corp').", messages: { "Document <title> element is empty.": "El elemento <title> del documento está vacío.", "Document is missing a <title> element.": "Al documento le falta un elemento <title>." } },
5145
5242
  "accesslint-002": { description: "La página debe tener un mecanismo para omitir bloques de contenido repetidos.", guidance: 'Los usuarios de teclado deben poder omitir contenido repetitivo como la navegación. Proporcione un enlace de salto en la parte superior de la página que enlace al contenido principal (por ejemplo, <a href="#main">Saltar al contenido principal</a>), o use un landmark <main>. Los lectores de pantalla pueden saltar directamente a los landmarks, por lo que un elemento <main> correctamente marcado satisface este requisito.', messages: { "Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link.": "La página no tiene un mecanismo para omitir contenido repetido. Agregue un landmark <main> o un enlace de salto." } },
5146
5243
  "accesslint-003": { description: "La página debe contener un encabezado de nivel uno.", guidance: "Un encabezado de nivel uno (<h1> o role='heading' con aria-level='1') ayuda a los usuarios a comprender el tema de la página y proporciona un punto de referencia para la navegación con lector de pantalla. Cada página debe tener exactamente un h1 que describa el contenido principal, típicamente coincidiendo o similar al título de la página.", messages: { "Page does not contain a level-one heading.": "La página no contiene un encabezado de nivel uno." } },
@@ -5236,31 +5333,30 @@ const Mi = {
5236
5333
  "accesslint-032": { description: "Los elementos en orden de foco secuencial deben tener un indicador de foco visible.", guidance: "Los usuarios de teclado necesitan ver qué elemento tiene el foco. No elimine el contorno de foco predeterminado (outline: none) sin proporcionar un indicador visible alternativo. Use estilos :focus-visible o :focus para asegurar que el foco siempre sea perceptible.", messages: { "Focusable element has outline removed without a visible focus alternative.": "El elemento enfocable tiene el contorno eliminado sin una alternativa de foco visible." } }
5237
5334
  };
5238
5335
  export {
5239
- Ve as clearAllCaches,
5240
- lt as clearAriaAttrAuditCache,
5241
- Qe as clearAriaHiddenCache,
5242
- ct as clearColorCaches,
5243
- Ge as clearComputedRoleCache,
5244
- q as compileDeclarativeRule,
5245
- Li as configureRules,
5246
- Ri as createChunkedAudit,
5247
- ki as defaultDisabledRuleIds,
5248
- y as getAccessibleName,
5336
+ Xe as clearAllCaches,
5337
+ pt as clearAriaAttrAuditCache,
5338
+ nt as clearAriaHiddenCache,
5339
+ ht as clearColorCaches,
5340
+ Qe as clearComputedRoleCache,
5341
+ T as compileDeclarativeRule,
5342
+ Pi as configureRules,
5343
+ Hi as createChunkedAudit,
5344
+ v as getAccessibleName,
5249
5345
  k as getAccessibleTextContent,
5250
- le as getActiveRules,
5251
- F as getComputedRole,
5252
- u as getHtmlSnippet,
5253
- Re as getImplicitRole,
5254
- Ti as getRuleById,
5346
+ de as getActiveRules,
5347
+ H as getComputedRole,
5348
+ m as getHtmlSnippet,
5349
+ Ne as getImplicitRole,
5350
+ ji as getRuleById,
5255
5351
  p as getSelector,
5256
5352
  b as isAriaHidden,
5257
- Je as isValidRole,
5258
- Mi as localeEn,
5259
- Ni as localeEs,
5260
- Ii as querySelectorShadowAware,
5261
- Ei as registerLocale,
5262
- We as rules,
5263
- Ci as runAudit,
5264
- Me as translateViolations,
5265
- qi as validateDeclarativeRule
5353
+ at as isValidRole,
5354
+ Ui as localeEn,
5355
+ Wi as localeEs,
5356
+ $i as querySelectorShadowAware,
5357
+ Di as registerLocale,
5358
+ _e as rules,
5359
+ zi as runAudit,
5360
+ Fe as translateViolations,
5361
+ Fi as validateDeclarativeRule
5266
5362
  };