@accesslint/core 0.3.11 → 0.3.12

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
@@ -408,7 +408,7 @@ function m(t) {
408
408
  const n = e.map((o, s) => (s === 0 ? "" : o.delimiter) + o.selector).join("");
409
409
  return _.set(t, n), n;
410
410
  }
411
- function Ti(t) {
411
+ function Ei(t) {
412
412
  const a = [], e = [];
413
413
  let i = t;
414
414
  for (; i; ) {
@@ -1161,7 +1161,7 @@ const et = {
1161
1161
  return a;
1162
1162
  }
1163
1163
  };
1164
- function Ei(t) {
1164
+ function Ci(t) {
1165
1165
  if (typeof t != "object" || t === null)
1166
1166
  return "Rule spec must be an object";
1167
1167
  const a = t;
@@ -3039,7 +3039,19 @@ const ka = {
3039
3039
  tablist: [["tab"]],
3040
3040
  tree: [["treeitem", "group"]],
3041
3041
  treegrid: [["row", "rowgroup"]]
3042
- }, ne = {
3042
+ }, Ia = /* @__PURE__ */ new Set([
3043
+ "doc-bibliography",
3044
+ "doc-endnotes",
3045
+ "grid",
3046
+ "group",
3047
+ "list",
3048
+ "listbox",
3049
+ "rowgroup",
3050
+ "table",
3051
+ "tablist",
3052
+ "tree",
3053
+ "treegrid"
3054
+ ]), ne = {
3043
3055
  caption: ["figure", "table", "grid", "treegrid"],
3044
3056
  // cell/gridcell/columnheader/rowheader must be in a row
3045
3057
  // but we skip checking native td/th since they're handled by HTML semantics
@@ -3053,25 +3065,30 @@ const ka = {
3053
3065
  tab: ["tablist"],
3054
3066
  treeitem: ["tree", "group"]
3055
3067
  };
3056
- function Ia(t, a) {
3057
- var r;
3058
- const e = ((r = t.getAttribute("aria-owns")) == null ? void 0 : r.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
3059
- for (const o of t.querySelectorAll("*")) {
3060
- const s = q(o);
3061
- s && !g(o) && n.add(s);
3068
+ function Ta(t, a) {
3069
+ var o;
3070
+ const e = ((o = t.getAttribute("aria-owns")) == null ? void 0 : o.split(/\s+/)) || [], i = t.ownerDocument, n = /* @__PURE__ */ new Set();
3071
+ let r = !1;
3072
+ for (const s of t.querySelectorAll("*")) {
3073
+ if (g(s)) continue;
3074
+ r = !0;
3075
+ const l = q(s);
3076
+ l && n.add(l);
3062
3077
  }
3063
- for (const o of e) {
3064
- const s = i.getElementById(o);
3065
- if (s) {
3066
- const l = q(s);
3067
- l && !g(s) && n.add(l);
3078
+ for (const s of e) {
3079
+ const l = i.getElementById(s);
3080
+ if (l && !g(l)) {
3081
+ r = !0;
3082
+ const h = q(l);
3083
+ h && n.add(h);
3068
3084
  }
3069
3085
  }
3070
- for (const o of a)
3071
- if (!o.some((l) => n.has(l))) return !1;
3072
- return !0;
3086
+ if (!r) return "empty";
3087
+ for (const s of a)
3088
+ if (!s.some((l) => n.has(l))) return "fail";
3089
+ return "pass";
3073
3090
  }
3074
- const Ta = {
3091
+ const Ea = {
3075
3092
  id: "aria-required-children",
3076
3093
  wcag: ["1.3.1"],
3077
3094
  level: "A",
@@ -3084,22 +3101,26 @@ const Ta = {
3084
3101
  for (const i of t.querySelectorAll("[role]")) {
3085
3102
  if (g(i)) continue;
3086
3103
  const n = (e = i.getAttribute("role")) == null ? void 0 : e.trim().toLowerCase();
3087
- if (!n || !(n in ie)) continue;
3088
- const r = ie[n];
3089
- if (!Ia(i, r)) {
3090
- const o = r.map((s) => s.join(" or ")).join(", ");
3091
- a.push({
3092
- ruleId: "aria-required-children",
3093
- selector: m(i),
3094
- html: d(i),
3095
- impact: "critical",
3096
- message: `Role "${n}" requires children with role: ${o}.`
3097
- });
3104
+ if (!n || !(n in ie) || i.getAttribute("aria-busy") === "true") continue;
3105
+ if (n === "combobox") {
3106
+ if (i.getAttribute("aria-expanded") !== "true") continue;
3107
+ const l = i.tagName.toLowerCase();
3108
+ if (l === "input" || l === "textarea") continue;
3098
3109
  }
3110
+ const r = ie[n], o = Ta(i, r);
3111
+ if (o === "pass" || o === "empty" && Ia.has(n)) continue;
3112
+ const s = r.map((l) => l.join(" or ")).join(", ");
3113
+ a.push({
3114
+ ruleId: "aria-required-children",
3115
+ selector: m(i),
3116
+ html: d(i),
3117
+ impact: "critical",
3118
+ message: `Role "${n}" requires children with role: ${s}.`
3119
+ });
3099
3120
  }
3100
3121
  return a;
3101
3122
  }
3102
- }, Ea = {
3123
+ }, Ca = {
3103
3124
  id: "aria-required-parent",
3104
3125
  wcag: ["1.3.1"],
3105
3126
  level: "A",
@@ -3149,7 +3170,7 @@ const Ta = {
3149
3170
  "embed",
3150
3171
  "area[href]"
3151
3172
  ].join(", ");
3152
- function Ca(t) {
3173
+ function La(t) {
3153
3174
  let a = t;
3154
3175
  const e = t.ownerDocument, i = e.defaultView;
3155
3176
  for (; a && a !== e.body; ) {
@@ -3162,7 +3183,7 @@ function Ca(t) {
3162
3183
  }
3163
3184
  return !0;
3164
3185
  }
3165
- const La = {
3186
+ const qa = {
3166
3187
  id: "aria-hidden-body",
3167
3188
  selector: 'body[aria-hidden="true"]',
3168
3189
  check: { type: "selector-exists" },
@@ -3174,7 +3195,7 @@ const La = {
3174
3195
  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.",
3175
3196
  prompt: "Instruct to remove aria-hidden='true' from the body element.",
3176
3197
  skipAriaHidden: !1
3177
- }, qa = k(La), Ra = {
3198
+ }, Ra = k(qa), Na = {
3178
3199
  id: "aria-hidden-focus",
3179
3200
  wcag: ["4.1.2"],
3180
3201
  level: "A",
@@ -3190,7 +3211,7 @@ const La = {
3190
3211
  for (const n of i)
3191
3212
  if (n instanceof HTMLElement) {
3192
3213
  const r = n.getAttribute("tabindex");
3193
- if (r === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !Ca(n)) continue;
3214
+ if (r === "-1" || n.disabled || n instanceof HTMLInputElement && n.type === "hidden" || !La(n)) continue;
3194
3215
  const o = n.tagName.toLowerCase();
3195
3216
  let s;
3196
3217
  r !== null ? s = `has tabindex="${r}"` : o === "a" && n.hasAttribute("href") ? s = "is a link with href" : o === "button" ? s = "is a <button>" : o === "input" ? s = `is an <input type="${n.type}">` : o === "select" ? s = "is a <select>" : o === "textarea" ? s = "is a <textarea>" : o === "iframe" ? s = "is an <iframe>" : s = `is a natively focusable <${o}>`;
@@ -3207,7 +3228,7 @@ const La = {
3207
3228
  }
3208
3229
  return a;
3209
3230
  }
3210
- }, Na = {
3231
+ }, $a = {
3211
3232
  id: "aria-command-name",
3212
3233
  wcag: ["4.1.2"],
3213
3234
  level: "A",
@@ -3233,7 +3254,7 @@ const La = {
3233
3254
  }
3234
3255
  return a;
3235
3256
  }
3236
- }, $a = {
3257
+ }, Ma = {
3237
3258
  id: "aria-input-field-name",
3238
3259
  wcag: ["4.1.2"],
3239
3260
  level: "A",
@@ -3254,7 +3275,7 @@ const La = {
3254
3275
  }
3255
3276
  return a;
3256
3277
  }
3257
- }, Ma = {
3278
+ }, Ha = {
3258
3279
  id: "aria-toggle-field-name",
3259
3280
  wcag: ["4.1.2"],
3260
3281
  level: "A",
@@ -3275,7 +3296,7 @@ const La = {
3275
3296
  }
3276
3297
  return a;
3277
3298
  }
3278
- }, Ha = {
3299
+ }, Da = {
3279
3300
  id: "aria-meter-name",
3280
3301
  wcag: ["4.1.2"],
3281
3302
  level: "A",
@@ -3296,7 +3317,7 @@ const La = {
3296
3317
  }
3297
3318
  return a;
3298
3319
  }
3299
- }, Da = {
3320
+ }, Oa = {
3300
3321
  id: "aria-progressbar-name",
3301
3322
  wcag: ["4.1.2"],
3302
3323
  level: "A",
@@ -3317,7 +3338,7 @@ const La = {
3317
3338
  }
3318
3339
  return a;
3319
3340
  }
3320
- }, Oa = {
3341
+ }, Ba = {
3321
3342
  id: "aria-dialog-name",
3322
3343
  wcag: ["4.1.2"],
3323
3344
  level: "A",
@@ -3338,7 +3359,7 @@ const La = {
3338
3359
  }
3339
3360
  return a;
3340
3361
  }
3341
- }, Ba = {
3362
+ }, Fa = {
3342
3363
  id: "aria-tooltip-name",
3343
3364
  wcag: ["4.1.2"],
3344
3365
  level: "A",
@@ -3359,7 +3380,7 @@ const La = {
3359
3380
  }
3360
3381
  return a;
3361
3382
  }
3362
- }, Fa = {
3383
+ }, Wa = {
3363
3384
  id: "aria-treeitem-name",
3364
3385
  wcag: ["4.1.2"],
3365
3386
  level: "A",
@@ -3380,7 +3401,7 @@ const La = {
3380
3401
  }
3381
3402
  return a;
3382
3403
  }
3383
- }, Wa = {
3404
+ }, _a = {
3384
3405
  id: "aria-prohibited-attr",
3385
3406
  wcag: ["4.1.2"],
3386
3407
  level: "A",
@@ -3390,14 +3411,14 @@ const La = {
3390
3411
  run(t) {
3391
3412
  return U(t).prohibitedAttr;
3392
3413
  }
3393
- }, _a = [
3414
+ }, Pa = [
3394
3415
  "a[href]",
3395
3416
  "button:not([disabled])",
3396
3417
  'input:not([disabled]):not([type="hidden"])',
3397
3418
  "select:not([disabled])",
3398
3419
  "textarea:not([disabled])",
3399
3420
  '[tabindex]:not([tabindex="-1"])'
3400
- ].join(", "), Pa = [
3421
+ ].join(", "), ja = [
3401
3422
  "aria-atomic",
3402
3423
  "aria-busy",
3403
3424
  "aria-controls",
@@ -3414,15 +3435,15 @@ const La = {
3414
3435
  ];
3415
3436
  function oe(t) {
3416
3437
  const a = [];
3417
- t.matches(_a) && a.push("element is focusable");
3418
- for (const e of Pa)
3438
+ t.matches(Pa) && a.push("element is focusable");
3439
+ for (const e of ja)
3419
3440
  if (t.hasAttribute(e)) {
3420
3441
  a.push(`has ${e}`);
3421
3442
  break;
3422
3443
  }
3423
3444
  return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
3424
3445
  }
3425
- const ja = {
3446
+ const Va = {
3426
3447
  id: "presentation-role-conflict",
3427
3448
  wcag: ["4.1.2"],
3428
3449
  level: "A",
@@ -3455,7 +3476,7 @@ const ja = {
3455
3476
  }
3456
3477
  return a;
3457
3478
  }
3458
- }, Va = {
3479
+ }, za = {
3459
3480
  id: "summary-name",
3460
3481
  wcag: ["4.1.2"],
3461
3482
  level: "A",
@@ -3477,7 +3498,7 @@ const ja = {
3477
3498
  return a;
3478
3499
  }
3479
3500
  };
3480
- function za(t) {
3501
+ function Ua(t) {
3481
3502
  var n, r;
3482
3503
  const a = [], e = t.getAttribute("href");
3483
3504
  e && a.push(`href: ${e}`);
@@ -3494,7 +3515,7 @@ function za(t) {
3494
3515
  return a.length > 0 ? a.join(`
3495
3516
  `) : void 0;
3496
3517
  }
3497
- const Ua = {
3518
+ const Ga = {
3498
3519
  id: "link-name",
3499
3520
  wcag: ["2.4.4", "4.1.2"],
3500
3521
  level: "A",
@@ -3511,12 +3532,12 @@ const Ua = {
3511
3532
  html: d(e),
3512
3533
  impact: "serious",
3513
3534
  message: "Link has no discernible text.",
3514
- context: za(e)
3535
+ context: Ua(e)
3515
3536
  });
3516
3537
  }
3517
3538
  return a;
3518
3539
  }
3519
- }, Ga = {
3540
+ }, Ya = {
3520
3541
  id: "skip-link",
3521
3542
  wcag: ["2.4.1"],
3522
3543
  level: "A",
@@ -3542,7 +3563,7 @@ const Ua = {
3542
3563
  }
3543
3564
  return a;
3544
3565
  }
3545
- }, Ya = /* @__PURE__ */ new Set([
3566
+ }, Xa = /* @__PURE__ */ new Set([
3546
3567
  "block",
3547
3568
  "flex",
3548
3569
  "grid",
@@ -3550,23 +3571,23 @@ const Ua = {
3550
3571
  "table-cell",
3551
3572
  "list-item",
3552
3573
  "flow-root"
3553
- ]), Xa = /* @__PURE__ */ new Set([
3574
+ ]), Ka = /* @__PURE__ */ new Set([
3554
3575
  "inline",
3555
3576
  "inline-block",
3556
3577
  "inline-flex",
3557
3578
  "inline-grid"
3558
3579
  ]);
3559
- function Ka(t) {
3580
+ function Ja(t) {
3560
3581
  let a = t.parentElement;
3561
3582
  for (; a; ) {
3562
3583
  const e = w(a).display;
3563
- if (Ya.has(e))
3564
- return Ja(a) ? a : null;
3584
+ if (Xa.has(e))
3585
+ return Qa(a) ? a : null;
3565
3586
  a = a.parentElement;
3566
3587
  }
3567
3588
  return null;
3568
3589
  }
3569
- function Ja(t) {
3590
+ function Qa(t) {
3570
3591
  const a = t.ownerDocument.createTreeWalker(
3571
3592
  t,
3572
3593
  NodeFilter.SHOW_TEXT
@@ -3586,7 +3607,7 @@ function Ja(t) {
3586
3607
  }
3587
3608
  return /[a-zA-Z\u00C0-\u024F]{2,}/.test(e);
3588
3609
  }
3589
- function Qa(t, a) {
3610
+ function Za(t, a) {
3590
3611
  const e = t.ownerDocument.createTreeWalker(
3591
3612
  t,
3592
3613
  NodeFilter.SHOW_TEXT
@@ -3607,7 +3628,7 @@ function Qa(t, a) {
3607
3628
  }
3608
3629
  return null;
3609
3630
  }
3610
- function Za(t, a) {
3631
+ function ei(t, a) {
3611
3632
  const e = t.textDecorationLine || t.textDecoration || "", i = a.textDecorationLine || a.textDecoration || "";
3612
3633
  if ((e.includes("underline") || e.includes("line-through")) && e !== i)
3613
3634
  return !0;
@@ -3632,7 +3653,7 @@ function se(t) {
3632
3653
  function le(t, a, e) {
3633
3654
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
3634
3655
  }
3635
- const ei = {
3656
+ const ti = {
3636
3657
  id: "link-in-text-block",
3637
3658
  wcag: ["1.4.1"],
3638
3659
  level: "A",
@@ -3644,12 +3665,12 @@ const ei = {
3644
3665
  for (const e of t.querySelectorAll("a[href]")) {
3645
3666
  if (g(e) || !A(e).trim() || e.closest('nav, header, footer, [role="navigation"], [role="banner"], [role="contentinfo"]')) continue;
3646
3667
  const i = w(e), n = i.display || "inline";
3647
- if (!Xa.has(n)) continue;
3648
- const r = Ka(e);
3668
+ if (!Ka.has(n)) continue;
3669
+ const r = Ja(e);
3649
3670
  if (!r) continue;
3650
3671
  const o = w(r);
3651
- if (Za(i, o)) continue;
3652
- const s = N(i.color), l = Qa(r);
3672
+ if (ei(i, o)) continue;
3673
+ const s = N(i.color), l = Za(r);
3653
3674
  if (!s || !l) continue;
3654
3675
  const h = R(...s), c = R(...l), u = me(h, c);
3655
3676
  if (u >= 3) continue;
@@ -3665,7 +3686,7 @@ const ei = {
3665
3686
  }
3666
3687
  return a;
3667
3688
  }
3668
- }, ti = {
3689
+ }, ai = {
3669
3690
  id: "html-has-lang",
3670
3691
  wcag: ["3.1.1"],
3671
3692
  level: "A",
@@ -3699,17 +3720,17 @@ const ei = {
3699
3720
  }
3700
3721
  return [];
3701
3722
  }
3702
- }, ai = new Set(
3723
+ }, ii = new Set(
3703
3724
  "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(" ")
3704
- ), ii = new Set(
3725
+ ), ni = new Set(
3705
3726
  "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(" ")
3706
- ), ni = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
3727
+ ), ri = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
3707
3728
  function pe(t) {
3708
- if (!ni.test(t)) return !1;
3729
+ if (!ri.test(t)) return !1;
3709
3730
  const a = t.split("-")[0].toLowerCase();
3710
- return a.length === 2 ? ai.has(a) : a.length === 3 ? !ii.has(a) : !1;
3731
+ return a.length === 2 ? ii.has(a) : a.length === 3 ? !ni.has(a) : !1;
3711
3732
  }
3712
- const ri = {
3733
+ const oi = {
3713
3734
  id: "html-lang-valid",
3714
3735
  wcag: ["3.1.1"],
3715
3736
  level: "A",
@@ -3760,7 +3781,7 @@ function ce(t) {
3760
3781
  }
3761
3782
  return !1;
3762
3783
  }
3763
- const oi = {
3784
+ const si = {
3764
3785
  id: "valid-lang",
3765
3786
  wcag: ["3.1.2"],
3766
3787
  level: "AA",
@@ -3792,7 +3813,7 @@ const oi = {
3792
3813
  }
3793
3814
  return a;
3794
3815
  }
3795
- }, si = {
3816
+ }, li = {
3796
3817
  id: "html-xml-lang-mismatch",
3797
3818
  wcag: ["3.1.1"],
3798
3819
  level: "A",
@@ -3815,7 +3836,7 @@ const oi = {
3815
3836
  }
3816
3837
  return [];
3817
3838
  }
3818
- }, li = {
3839
+ }, ci = {
3819
3840
  id: "td-headers-attr",
3820
3841
  wcag: ["1.3.1"],
3821
3842
  level: "A",
@@ -3854,7 +3875,7 @@ const oi = {
3854
3875
  }
3855
3876
  return a;
3856
3877
  }
3857
- }, ci = {
3878
+ }, ui = {
3858
3879
  id: "th-has-data-cells",
3859
3880
  wcag: ["1.3.1"],
3860
3881
  level: "A",
@@ -3876,7 +3897,7 @@ const oi = {
3876
3897
  }
3877
3898
  return a;
3878
3899
  }
3879
- }, ui = {
3900
+ }, di = {
3880
3901
  id: "td-has-header",
3881
3902
  wcag: ["1.3.1"],
3882
3903
  level: "A",
@@ -3929,7 +3950,7 @@ const oi = {
3929
3950
  }
3930
3951
  return a;
3931
3952
  }
3932
- }, di = {
3953
+ }, mi = {
3933
3954
  id: "scope-attr-valid",
3934
3955
  wcag: ["1.3.1"],
3935
3956
  level: "A",
@@ -3952,7 +3973,7 @@ const oi = {
3952
3973
  }
3953
3974
  return a;
3954
3975
  }
3955
- }, mi = {
3976
+ }, hi = {
3956
3977
  id: "empty-table-header",
3957
3978
  wcag: [],
3958
3979
  level: "A",
@@ -3975,7 +3996,7 @@ const oi = {
3975
3996
  }
3976
3997
  return a;
3977
3998
  }
3978
- }, O = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], hi = {
3999
+ }, O = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], pi = {
3979
4000
  id: "duplicate-id-aria",
3980
4001
  wcag: ["4.1.2"],
3981
4002
  level: "A",
@@ -4023,7 +4044,7 @@ Referenced by: ${h}` : ""}`
4023
4044
  }
4024
4045
  return a;
4025
4046
  }
4026
- }, pi = {
4047
+ }, gi = {
4027
4048
  id: "video-caption",
4028
4049
  wcag: ["1.2.2"],
4029
4050
  level: "A",
@@ -4044,7 +4065,7 @@ Referenced by: ${h}` : ""}`
4044
4065
  }
4045
4066
  return a;
4046
4067
  }
4047
- }, gi = {
4068
+ }, bi = {
4048
4069
  id: "audio-caption",
4049
4070
  wcag: ["1.2.1"],
4050
4071
  level: "A",
@@ -4066,7 +4087,7 @@ Referenced by: ${h}` : ""}`
4066
4087
  }
4067
4088
  return a;
4068
4089
  }
4069
- }, bi = /* @__PURE__ */ new Set([
4090
+ }, fi = /* @__PURE__ */ new Set([
4070
4091
  "SCRIPT",
4071
4092
  "STYLE",
4072
4093
  "NOSCRIPT",
@@ -4085,10 +4106,10 @@ Referenced by: ${h}` : ""}`
4085
4106
  function ue([t, a, e]) {
4086
4107
  return "#" + [t, a, e].map((i) => i.toString(16).padStart(2, "0")).join("");
4087
4108
  }
4088
- function fi(t) {
4109
+ function vi(t) {
4089
4110
  return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement ? t.disabled : !!(t.closest("fieldset[disabled]") || t.getAttribute("aria-disabled") === "true");
4090
4111
  }
4091
- function vi(t, a) {
4112
+ function yi(t, a) {
4092
4113
  if (t.tagName !== "LABEL") return !1;
4093
4114
  const e = t, i = e.htmlFor;
4094
4115
  if (i) {
@@ -4100,7 +4121,7 @@ function vi(t, a) {
4100
4121
  const r = e.id;
4101
4122
  return !!(r && a.querySelector(`[aria-labelledby~="${r}"][aria-disabled="true"]`));
4102
4123
  }
4103
- function yi(t) {
4124
+ function wi(t) {
4104
4125
  const a = t.clip;
4105
4126
  if (a && a.startsWith("rect(")) {
4106
4127
  const i = a.match(/[\d.]+/g);
@@ -4114,17 +4135,17 @@ function yi(t) {
4114
4135
  }
4115
4136
  return !1;
4116
4137
  }
4117
- function wi(t) {
4138
+ function Ai(t) {
4118
4139
  if (g(t)) return !0;
4119
4140
  let a = t;
4120
4141
  for (; a; ) {
4121
4142
  const e = w(a);
4122
- if (e.display === "none" || e.visibility === "hidden" || yi(e)) return !0;
4143
+ if (e.display === "none" || e.visibility === "hidden" || wi(e)) return !0;
4123
4144
  a = a.parentElement;
4124
4145
  }
4125
4146
  return !1;
4126
4147
  }
4127
- function Ai(t) {
4148
+ function xi(t) {
4128
4149
  let a = 1, e = t;
4129
4150
  for (; e; ) {
4130
4151
  const i = w(e), n = parseFloat(i.opacity);
@@ -4132,7 +4153,7 @@ function Ai(t) {
4132
4153
  }
4133
4154
  return a;
4134
4155
  }
4135
- function xi(t) {
4156
+ function Si(t) {
4136
4157
  let a = t;
4137
4158
  for (; a; ) {
4138
4159
  const e = w(a), i = e.filter;
@@ -4145,10 +4166,10 @@ function xi(t) {
4145
4166
  }
4146
4167
  return !1;
4147
4168
  }
4148
- function Si(t) {
4169
+ function ki(t) {
4149
4170
  return t.closest("select") !== null;
4150
4171
  }
4151
- const ki = {
4172
+ const Ii = {
4152
4173
  id: "color-contrast",
4153
4174
  wcag: ["1.4.3"],
4154
4175
  level: "AA",
@@ -4163,13 +4184,13 @@ const ki = {
4163
4184
  for (; r = i.nextNode(); ) {
4164
4185
  if (!r.textContent || !r.textContent.trim()) continue;
4165
4186
  const o = r.parentElement;
4166
- if (!o || n.has(o) || (n.add(o), bi.has(o.tagName))) continue;
4187
+ if (!o || n.has(o) || (n.add(o), fi.has(o.tagName))) continue;
4167
4188
  const s = o.tagName;
4168
- if (s === "BODY" || s === "HTML" || Si(o) || fi(o) || vi(o, t) || wi(o)) continue;
4189
+ if (s === "BODY" || s === "HTML" || ki(o) || vi(o) || yi(o, t) || Ai(o)) continue;
4169
4190
  const l = w(o);
4170
- if (parseFloat(l.opacity) === 0 || Ai(o) < 0.1) continue;
4191
+ if (parseFloat(l.opacity) === 0 || xi(o) < 0.1) continue;
4171
4192
  const h = l.textShadow;
4172
- if (h && h !== "none" && h !== "initial" || xi(o)) continue;
4193
+ if (h && h !== "none" && h !== "initial" || Si(o)) continue;
4173
4194
  const c = N(l.color);
4174
4195
  if (!c) continue;
4175
4196
  const u = l.color.match(/rgba\(.+?,\s*([\d.]+)\s*\)/) || l.color.match(/rgba?\(.+?\/\s*([\d.]+%?)\s*\)/);
@@ -4251,9 +4272,8 @@ const ki = {
4251
4272
  ba,
4252
4273
  Aa,
4253
4274
  ka,
4254
- Ta,
4255
4275
  Ea,
4256
- qa,
4276
+ Ca,
4257
4277
  Ra,
4258
4278
  Na,
4259
4279
  $a,
@@ -4264,40 +4284,41 @@ const ki = {
4264
4284
  Ba,
4265
4285
  Fa,
4266
4286
  Wa,
4267
- ja,
4268
- va,
4287
+ _a,
4269
4288
  Va,
4289
+ va,
4290
+ za,
4270
4291
  // Links
4271
- Ua,
4272
4292
  Ga,
4273
- ei,
4274
- // Language
4293
+ Ya,
4275
4294
  ti,
4276
- ri,
4295
+ // Language
4296
+ ai,
4277
4297
  oi,
4278
4298
  si,
4279
- // Tables
4280
4299
  li,
4300
+ // Tables
4281
4301
  ci,
4282
4302
  ui,
4283
4303
  di,
4284
4304
  mi,
4285
- // Parsing
4286
4305
  hi,
4287
- // Media
4306
+ // Parsing
4288
4307
  pi,
4308
+ // Media
4289
4309
  gi,
4310
+ bi,
4290
4311
  // Color
4291
- ki
4312
+ Ii
4292
4313
  ];
4293
4314
  let G = [], be = /* @__PURE__ */ new Set();
4294
- function Ci(t) {
4315
+ function Li(t) {
4295
4316
  t.additionalRules && (G = t.additionalRules), t.disabledRules && (be = new Set(t.disabledRules));
4296
4317
  }
4297
4318
  function fe() {
4298
4319
  return ge.filter((a) => !be.has(a.id)).concat(G);
4299
4320
  }
4300
- function Li(t) {
4321
+ function qi(t) {
4301
4322
  ve();
4302
4323
  const a = fe(), e = [];
4303
4324
  let i = 0;
@@ -4321,7 +4342,7 @@ function Li(t) {
4321
4342
  function ve() {
4322
4343
  Ie(), we(), Ae(), Oe(), De(), Ee();
4323
4344
  }
4324
- function qi(t) {
4345
+ function Ri(t) {
4325
4346
  var i;
4326
4347
  ve();
4327
4348
  const a = fe(), e = [];
@@ -4337,9 +4358,9 @@ function qi(t) {
4337
4358
  ruleCount: a.length
4338
4359
  };
4339
4360
  }
4340
- const Ii = new Map(ge.map((t) => [t.id, t]));
4341
- function Ri(t) {
4342
- const a = Ii.get(t);
4361
+ const Ti = new Map(ge.map((t) => [t.id, t]));
4362
+ function Ni(t) {
4363
+ const a = Ti.get(t);
4343
4364
  return a || G.find((e) => e.id === t);
4344
4365
  }
4345
4366
  export {
@@ -4349,20 +4370,20 @@ export {
4349
4370
  Oe as clearColorCaches,
4350
4371
  we as clearComputedRoleCache,
4351
4372
  k as compileDeclarativeRule,
4352
- Ci as configureRules,
4353
- Li as createChunkedAudit,
4373
+ Li as configureRules,
4374
+ qi as createChunkedAudit,
4354
4375
  v as getAccessibleName,
4355
4376
  A as getAccessibleTextContent,
4356
4377
  fe as getActiveRules,
4357
4378
  q as getComputedRole,
4358
4379
  d as getHtmlSnippet,
4359
4380
  de as getImplicitRole,
4360
- Ri as getRuleById,
4381
+ Ni as getRuleById,
4361
4382
  m as getSelector,
4362
4383
  g as isAriaHidden,
4363
4384
  ke as isValidRole,
4364
- Ti as querySelectorShadowAware,
4385
+ Ei as querySelectorShadowAware,
4365
4386
  ge as rules,
4366
- qi as runAudit,
4367
- Ei as validateDeclarativeRule
4387
+ Ri as runAudit,
4388
+ Ci as validateDeclarativeRule
4368
4389
  };