@accesslint/core 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -10
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.iife.js +5 -5
- package/dist/index.js +1074 -1009
- package/dist/rules/aria/aria-hidden-rules.d.ts.map +1 -1
- package/dist/rules/color/color-contrast.d.ts.map +1 -1
- package/dist/rules/forms/label.d.ts.map +1 -1
- package/dist/rules/index.d.ts +5 -6
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/keyboard/interactive-rules.d.ts.map +1 -1
- package/dist/rules/links/link-rules.d.ts.map +1 -1
- package/dist/rules/tables/table-headers.d.ts.map +1 -1
- package/dist/rules/utils/color.d.ts +25 -3
- package/dist/rules/utils/color.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
let
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
let K = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
function Qe() {
|
|
3
|
+
K = /* @__PURE__ */ new WeakMap();
|
|
4
4
|
}
|
|
5
|
-
function
|
|
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
|
|
120
|
+
function H(t) {
|
|
121
121
|
var i;
|
|
122
|
-
const a =
|
|
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 ||
|
|
125
|
-
return
|
|
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
|
|
128
|
-
function
|
|
129
|
-
|
|
127
|
+
let J = /* @__PURE__ */ new WeakMap();
|
|
128
|
+
function Ze() {
|
|
129
|
+
J = /* @__PURE__ */ new WeakMap();
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
const a =
|
|
131
|
+
function v(t) {
|
|
132
|
+
const a = J.get(t);
|
|
133
133
|
if (a !== void 0) return a;
|
|
134
|
-
const e =
|
|
135
|
-
return
|
|
134
|
+
const e = et(t);
|
|
135
|
+
return J.set(t, e), e;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
var s, o, r, l,
|
|
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((
|
|
142
|
-
const h = t.ownerDocument.getElementById(
|
|
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"),
|
|
155
|
-
if (
|
|
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
|
|
168
|
-
if (
|
|
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
|
|
175
|
-
if (
|
|
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" ? ((
|
|
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
|
|
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
|
|
268
|
+
function at(t) {
|
|
269
269
|
const a = t.trim().toLowerCase().replace(/[\u201C\u201D\u2018\u2019\u00AB\u00BB]/g, "");
|
|
270
|
-
return
|
|
270
|
+
return tt.has(a);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function N(t) {
|
|
273
273
|
let a = t;
|
|
274
274
|
for (; a; ) {
|
|
275
|
-
if (
|
|
275
|
+
if ($e(a)) return !0;
|
|
276
276
|
a = a.parentElement;
|
|
277
277
|
}
|
|
278
278
|
return !1;
|
|
279
279
|
}
|
|
280
|
-
let
|
|
281
|
-
function
|
|
282
|
-
|
|
280
|
+
let Q = /* @__PURE__ */ new WeakMap();
|
|
281
|
+
function nt() {
|
|
282
|
+
Q = /* @__PURE__ */ new WeakMap();
|
|
283
283
|
}
|
|
284
284
|
function b(t) {
|
|
285
|
-
const a =
|
|
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,
|
|
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
|
|
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 (
|
|
308
|
-
const
|
|
309
|
-
if (
|
|
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
|
|
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 (
|
|
317
|
-
a +=
|
|
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 (
|
|
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
|
|
328
|
-
|
|
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
|
|
336
|
-
function
|
|
337
|
-
|
|
335
|
+
let Z = /* @__PURE__ */ new WeakMap();
|
|
336
|
+
function it() {
|
|
337
|
+
Z = /* @__PURE__ */ new WeakMap();
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function st(t) {
|
|
340
340
|
return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
341
341
|
}
|
|
342
|
-
const
|
|
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
|
|
352
|
+
function rt(t) {
|
|
353
353
|
const a = t.tagName.toLowerCase();
|
|
354
|
-
for (const n of
|
|
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}="${
|
|
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
|
|
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 O(t) {
|
|
|
375
375
|
n.unshift(`#${CSS.escape(i.id)}`);
|
|
376
376
|
break;
|
|
377
377
|
}
|
|
378
|
-
if (n.unshift(
|
|
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 O(t) {
|
|
|
389
389
|
}
|
|
390
390
|
function p(t) {
|
|
391
391
|
var s;
|
|
392
|
-
const a =
|
|
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:
|
|
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:
|
|
403
|
+
e.unshift({ selector: _(n), delimiter: " >>>iframe> " }), n = r;
|
|
404
404
|
else {
|
|
405
|
-
e.unshift({ selector:
|
|
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
|
|
411
|
+
return Z.set(t, i), i;
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function $i(t) {
|
|
414
414
|
const a = [], e = [];
|
|
415
415
|
let n = t;
|
|
416
416
|
for (; n; ) {
|
|
@@ -443,11 +443,11 @@ function Li(t) {
|
|
|
443
443
|
}
|
|
444
444
|
return null;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
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
|
|
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
|
-
]),
|
|
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
|
-
]),
|
|
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
|
-
]),
|
|
525
|
+
]), dt = /* @__PURE__ */ new Set([
|
|
526
526
|
"aria-valuemax",
|
|
527
527
|
"aria-valuemin",
|
|
528
528
|
"aria-valuenow"
|
|
529
|
-
]),
|
|
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
|
-
},
|
|
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
|
-
]),
|
|
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
|
-
},
|
|
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
|
|
619
|
-
function
|
|
620
|
-
|
|
618
|
+
let D = null, F = null;
|
|
619
|
+
function pt() {
|
|
620
|
+
D = null, F = null;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function oe(t) {
|
|
623
623
|
var i;
|
|
624
|
-
if (
|
|
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
|
|
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-") && !
|
|
638
|
-
const
|
|
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:
|
|
642
|
-
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
|
|
651
|
-
if (!(
|
|
652
|
-
if (
|
|
653
|
-
if (
|
|
654
|
-
const h =
|
|
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 "${
|
|
660
|
+
message: `${c.name} must be "true" or "false", got "${u}".`
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
|
-
} else if (
|
|
664
|
-
if (
|
|
665
|
-
const h =
|
|
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 "${
|
|
671
|
+
message: `${c.name} must be "true", "false", or "mixed", got "${u}".`
|
|
672
672
|
});
|
|
673
673
|
}
|
|
674
|
-
} else if (
|
|
675
|
-
if (
|
|
676
|
-
const h =
|
|
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 "${
|
|
682
|
+
message: `${c.name} must be an integer, got "${u}".`
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
} else if (
|
|
686
|
-
if (
|
|
687
|
-
const h =
|
|
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 "${
|
|
693
|
+
message: `${c.name} must be a number, got "${u}".`
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
|
-
} else if (
|
|
697
|
-
const h =
|
|
696
|
+
} else if (he[c.name]) {
|
|
697
|
+
const h = u.split(/\s+/);
|
|
698
698
|
for (const g of h)
|
|
699
|
-
if (!
|
|
700
|
-
const f =
|
|
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 "${
|
|
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(),
|
|
715
|
-
if (!c &&
|
|
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 =
|
|
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 <${
|
|
724
|
+
message: `aria-label and aria-labelledby are prohibited on <${u}> elements.`
|
|
725
725
|
});
|
|
726
726
|
}
|
|
727
727
|
} else if (c) {
|
|
728
|
-
if (
|
|
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
|
|
731
|
+
const y = d();
|
|
732
732
|
n.push({
|
|
733
733
|
ruleId: "accesslint-072",
|
|
734
|
-
selector:
|
|
735
|
-
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 =
|
|
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") &&
|
|
745
|
+
if ((g.name === "aria-label" || g.name === "aria-labelledby") && be.has(c))
|
|
746
746
|
continue;
|
|
747
|
-
const f =
|
|
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
|
|
760
|
+
return D = new WeakRef(t), F = { validAttr: a, validAttrValue: e, prohibitedAttr: n }, F;
|
|
761
761
|
}
|
|
762
|
-
let
|
|
763
|
-
function
|
|
764
|
-
|
|
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
|
|
767
|
-
let a =
|
|
768
|
-
return a || (a = getComputedStyle(t),
|
|
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
|
|
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
|
|
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
|
|
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
|
|
801
|
+
function R(t) {
|
|
802
802
|
const a = t.trim().toLowerCase();
|
|
803
|
-
if (
|
|
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
|
|
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*\)/);
|
|
@@ -827,49 +827,69 @@ function Te(t) {
|
|
|
827
827
|
}
|
|
828
828
|
return 1;
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function L(t, a, e) {
|
|
831
831
|
return [
|
|
832
832
|
Math.round(t[0] * e + a[0] * (1 - e)),
|
|
833
833
|
Math.round(t[1] * e + a[1] * (1 - e)),
|
|
834
834
|
Math.round(t[2] * e + a[2] * (1 - e))
|
|
835
835
|
];
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
const a =
|
|
837
|
+
function fe(t) {
|
|
838
|
+
const a = te.get(t);
|
|
839
839
|
if (a !== void 0) return a;
|
|
840
|
-
const e =
|
|
841
|
-
return
|
|
840
|
+
const e = bt(t);
|
|
841
|
+
return te.set(t, e), e;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
let
|
|
845
|
-
for (;
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
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
|
|
852
|
-
if (
|
|
853
|
-
|
|
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
|
|
857
|
-
if (
|
|
858
|
-
|
|
868
|
+
const r = z(o);
|
|
869
|
+
if (r < 0.01) {
|
|
870
|
+
e = e.parentElement;
|
|
859
871
|
continue;
|
|
860
872
|
}
|
|
861
|
-
|
|
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
|
-
|
|
882
|
+
const n = [255, 255, 255];
|
|
883
|
+
return a.length > 0 ? G(a, n) : n;
|
|
864
884
|
}
|
|
865
|
-
function
|
|
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
|
|
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 =
|
|
881
|
-
for (const
|
|
882
|
-
const c =
|
|
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
|
|
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
|
|
894
|
-
function
|
|
895
|
-
const a =
|
|
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 =
|
|
898
|
-
return
|
|
917
|
+
const e = wt(t);
|
|
918
|
+
return ae.set(t, e), e;
|
|
899
919
|
}
|
|
900
|
-
function
|
|
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 =
|
|
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 (
|
|
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
|
|
909
|
-
if (
|
|
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
|
|
947
|
+
function At(t) {
|
|
918
948
|
const a = parseFloat(t);
|
|
919
949
|
return t.endsWith("pt") ? a * (4 / 3) : a;
|
|
920
950
|
}
|
|
921
|
-
function
|
|
922
|
-
const a =
|
|
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
|
-
|
|
926
|
-
|
|
927
|
-
|
|
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)";
|
|
928
969
|
}
|
|
929
|
-
function
|
|
930
|
-
|
|
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);
|
|
997
|
+
}
|
|
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
|
|
941
|
-
function
|
|
1009
|
+
const ne = /* @__PURE__ */ new Map();
|
|
1010
|
+
function It(t) {
|
|
942
1011
|
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
943
1012
|
}
|
|
944
|
-
function
|
|
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 +=
|
|
1017
|
+
n % 2 === 0 ? e += It(a[n]) : e += "(.+?)";
|
|
949
1018
|
return e += "$", new RegExp(e);
|
|
950
1019
|
}
|
|
951
|
-
function
|
|
952
|
-
let e =
|
|
953
|
-
if (e || (e = /* @__PURE__ */ new Map(),
|
|
954
|
-
const n =
|
|
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:
|
|
1031
|
+
regex: Et(o),
|
|
963
1032
|
translated: r
|
|
964
1033
|
});
|
|
965
1034
|
return e.set(a, s), s;
|
|
966
1035
|
}
|
|
967
|
-
function
|
|
968
|
-
const n =
|
|
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
|
|
975
|
-
return
|
|
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
|
|
981
|
-
return
|
|
982
|
-
const n =
|
|
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
|
|
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 B(t) {
|
|
|
1003
1072
|
return a.length > 0 ? a.join(`
|
|
1004
1073
|
`) : void 0;
|
|
1005
1074
|
}
|
|
1006
|
-
function
|
|
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
|
|
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) ||
|
|
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:
|
|
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:
|
|
1108
|
+
context: Y(e)
|
|
1040
1109
|
});
|
|
1041
1110
|
continue;
|
|
1042
1111
|
}
|
|
1043
|
-
!e.hasAttribute("alt") && !
|
|
1112
|
+
!e.hasAttribute("alt") && !v(e) && a.push({
|
|
1044
1113
|
ruleId: "accesslint-011",
|
|
1045
1114
|
selector: p(e),
|
|
1046
|
-
html:
|
|
1115
|
+
html: m(e),
|
|
1047
1116
|
impact: "critical",
|
|
1048
1117
|
message: "Image element missing alt attribute.",
|
|
1049
|
-
context:
|
|
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) ||
|
|
1122
|
+
b(e) || we(e) || v(e) || a.push({
|
|
1054
1123
|
ruleId: "accesslint-011",
|
|
1055
1124
|
selector: p(e),
|
|
1056
|
-
html:
|
|
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:
|
|
1128
|
+
context: Y(e)
|
|
1060
1129
|
});
|
|
1061
1130
|
return a;
|
|
1062
1131
|
}
|
|
1063
1132
|
};
|
|
1064
|
-
function
|
|
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((
|
|
1069
|
-
var c,
|
|
1070
|
-
return ((
|
|
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
|
|
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 (!
|
|
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:
|
|
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
|
-
},
|
|
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) ||
|
|
1186
|
+
b(e) || v(e) || a.push({
|
|
1118
1187
|
ruleId: "accesslint-013",
|
|
1119
1188
|
selector: p(e),
|
|
1120
|
-
html:
|
|
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
|
-
},
|
|
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:
|
|
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
|
-
},
|
|
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 =
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
|
|
1263
|
+
v(e) || a.push({
|
|
1195
1264
|
ruleId: "accesslint-016",
|
|
1196
1265
|
selector: p(e),
|
|
1197
|
-
html:
|
|
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
|
|
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,
|
|
1211
|
-
return ((
|
|
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
|
|
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" ||
|
|
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
|
|
1245
|
-
if (
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
|
|
1337
|
+
v(e) || a.push({
|
|
1269
1338
|
ruleId: "accesslint-018",
|
|
1270
1339
|
selector: p(e),
|
|
1271
|
-
html:
|
|
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
|
|
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 Ri(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 =
|
|
1378
|
+
const i = jt(e);
|
|
1310
1379
|
return i || null;
|
|
1311
1380
|
}
|
|
1312
|
-
function
|
|
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
|
|
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
|
|
1407
|
+
function T(t) {
|
|
1339
1408
|
const a = t.skipAriaHidden !== !1;
|
|
1340
1409
|
return {
|
|
1341
1410
|
id: t.id,
|
|
@@ -1355,25 +1424,25 @@ function L(t) {
|
|
|
1355
1424
|
a && b(o) || n.push({
|
|
1356
1425
|
ruleId: t.id,
|
|
1357
1426
|
selector: p(o),
|
|
1358
|
-
html:
|
|
1427
|
+
html: m(o),
|
|
1359
1428
|
impact: t.impact,
|
|
1360
|
-
message:
|
|
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
|
|
1368
|
-
if (a && b(
|
|
1369
|
-
const c =
|
|
1370
|
-
c !== null &&
|
|
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(
|
|
1373
|
-
html:
|
|
1441
|
+
selector: p(d),
|
|
1442
|
+
html: m(d),
|
|
1374
1443
|
impact: t.impact,
|
|
1375
|
-
message:
|
|
1376
|
-
element:
|
|
1444
|
+
message: q(t.message, d, t.check),
|
|
1445
|
+
element: d
|
|
1377
1446
|
});
|
|
1378
1447
|
}
|
|
1379
1448
|
break;
|
|
@@ -1384,40 +1453,40 @@ function L(t) {
|
|
|
1384
1453
|
a && b(r) || r.hasAttribute(o) || n.push({
|
|
1385
1454
|
ruleId: t.id,
|
|
1386
1455
|
selector: p(r),
|
|
1387
|
-
html:
|
|
1456
|
+
html: m(r),
|
|
1388
1457
|
impact: t.impact,
|
|
1389
|
-
message:
|
|
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:
|
|
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
|
|
1403
|
-
if (a && b(
|
|
1404
|
-
const h =
|
|
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
|
-
|
|
1476
|
+
d && !g ? n.push({
|
|
1408
1477
|
ruleId: t.id,
|
|
1409
|
-
selector: p(
|
|
1410
|
-
html: u
|
|
1478
|
+
selector: p(u),
|
|
1479
|
+
html: m(u),
|
|
1411
1480
|
impact: t.impact,
|
|
1412
|
-
message:
|
|
1413
|
-
element:
|
|
1414
|
-
}) : !
|
|
1481
|
+
message: q(t.message, u, t.check),
|
|
1482
|
+
element: u
|
|
1483
|
+
}) : !d && g && n.push({
|
|
1415
1484
|
ruleId: t.id,
|
|
1416
|
-
selector: p(
|
|
1417
|
-
html: u
|
|
1485
|
+
selector: p(u),
|
|
1486
|
+
html: m(u),
|
|
1418
1487
|
impact: t.impact,
|
|
1419
|
-
message:
|
|
1420
|
-
element:
|
|
1488
|
+
message: q(t.message, u, t.check),
|
|
1489
|
+
element: u
|
|
1421
1490
|
});
|
|
1422
1491
|
}
|
|
1423
1492
|
break;
|
|
@@ -1428,9 +1497,9 @@ function L(t) {
|
|
|
1428
1497
|
a && b(r) || r.querySelector(o) || n.push({
|
|
1429
1498
|
ruleId: t.id,
|
|
1430
1499
|
selector: p(r),
|
|
1431
|
-
html:
|
|
1500
|
+
html: m(r),
|
|
1432
1501
|
impact: t.impact,
|
|
1433
|
-
message:
|
|
1502
|
+
message: q(t.message, r, t.check),
|
|
1434
1503
|
element: r
|
|
1435
1504
|
});
|
|
1436
1505
|
break;
|
|
@@ -1441,19 +1510,19 @@ function L(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
|
|
1445
|
-
if (
|
|
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
|
|
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 =
|
|
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:
|
|
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 L(t) {
|
|
|
1468
1537
|
n.push({
|
|
1469
1538
|
ruleId: t.id,
|
|
1470
1539
|
selector: p(h),
|
|
1471
|
-
html:
|
|
1540
|
+
html: m(h),
|
|
1472
1541
|
impact: t.impact,
|
|
1473
|
-
message:
|
|
1542
|
+
message: q(t.message, h, t.check),
|
|
1474
1543
|
element: h
|
|
1475
1544
|
});
|
|
1476
1545
|
break;
|
|
@@ -1484,7 +1553,7 @@ function L(t) {
|
|
|
1484
1553
|
}
|
|
1485
1554
|
};
|
|
1486
1555
|
}
|
|
1487
|
-
function
|
|
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
|
|
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
|
-
},
|
|
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(", "),
|
|
1597
|
+
].join(", "), Vt = /* @__PURE__ */ new Set([
|
|
1529
1598
|
"checkbox",
|
|
1530
1599
|
"menuitemcheckbox",
|
|
1531
1600
|
"menuitemradio",
|
|
1532
1601
|
"radio",
|
|
1533
1602
|
"switch"
|
|
1534
|
-
]),
|
|
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
|
|
1543
|
-
var o, r, l,
|
|
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 &&
|
|
1546
|
-
return
|
|
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((
|
|
1550
|
-
const h = t.ownerDocument.getElementById(
|
|
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
|
|
1560
|
-
if (
|
|
1561
|
-
const h = k(
|
|
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
|
|
1568
|
-
if (
|
|
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 = (
|
|
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
|
|
1648
|
+
const Yt = {
|
|
1580
1649
|
id: "accesslint-020",
|
|
1581
1650
|
actRuleIds: ["e086e5"],
|
|
1582
1651
|
wcag: ["4.1.2"],
|
|
@@ -1586,23 +1655,23 @@ const Wt = {
|
|
|
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, ${
|
|
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) ||
|
|
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 (!
|
|
1595
|
-
const l = [],
|
|
1596
|
-
c &&
|
|
1597
|
-
const
|
|
1598
|
-
|
|
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:
|
|
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 Wt = {
|
|
|
1611
1680
|
}
|
|
1612
1681
|
return a;
|
|
1613
1682
|
}
|
|
1614
|
-
},
|
|
1683
|
+
}, Xt = {
|
|
1615
1684
|
id: "accesslint-021",
|
|
1616
1685
|
wcag: [],
|
|
1617
1686
|
level: "A",
|
|
@@ -1636,14 +1705,14 @@ const Wt = {
|
|
|
1636
1705
|
r > 1 && a.push({
|
|
1637
1706
|
ruleId: "accesslint-021",
|
|
1638
1707
|
selector: p(n),
|
|
1639
|
-
html:
|
|
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
|
-
},
|
|
1715
|
+
}, Kt = {
|
|
1647
1716
|
id: "accesslint-022",
|
|
1648
1717
|
wcag: ["4.1.2"],
|
|
1649
1718
|
level: "A",
|
|
@@ -1653,16 +1722,16 @@ const Wt = {
|
|
|
1653
1722
|
run(t) {
|
|
1654
1723
|
const a = [];
|
|
1655
1724
|
for (const e of t.querySelectorAll("select"))
|
|
1656
|
-
b(e) ||
|
|
1725
|
+
b(e) || v(e) || a.push({
|
|
1657
1726
|
ruleId: "accesslint-022",
|
|
1658
1727
|
selector: p(e),
|
|
1659
|
-
html:
|
|
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
|
-
},
|
|
1734
|
+
}, Jt = {
|
|
1666
1735
|
id: "accesslint-023",
|
|
1667
1736
|
wcag: ["4.1.2"],
|
|
1668
1737
|
level: "A",
|
|
@@ -1677,17 +1746,17 @@ const Wt = {
|
|
|
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 && !
|
|
1749
|
+
!s && !r && !v(i) && a.push({
|
|
1681
1750
|
ruleId: "accesslint-023",
|
|
1682
1751
|
selector: p(i),
|
|
1683
|
-
html:
|
|
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
|
-
},
|
|
1759
|
+
}, Qt = /* @__PURE__ */ new Set([
|
|
1691
1760
|
"off",
|
|
1692
1761
|
"on",
|
|
1693
1762
|
"name",
|
|
@@ -1742,7 +1811,7 @@ const Wt = {
|
|
|
1742
1811
|
"impp",
|
|
1743
1812
|
"url",
|
|
1744
1813
|
"photo"
|
|
1745
|
-
]),
|
|
1814
|
+
]), Zt = /* @__PURE__ */ new Set([
|
|
1746
1815
|
"tel",
|
|
1747
1816
|
"tel-country-code",
|
|
1748
1817
|
"tel-national",
|
|
@@ -1751,18 +1820,18 @@ const Wt = {
|
|
|
1751
1820
|
"tel-extension",
|
|
1752
1821
|
"email",
|
|
1753
1822
|
"impp"
|
|
1754
|
-
]),
|
|
1755
|
-
function
|
|
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 &&
|
|
1828
|
+
a[e].startsWith("section-") && e++, e < a.length && ta.has(a[e]) && e++;
|
|
1760
1829
|
let n = !1;
|
|
1761
|
-
if (e < a.length &&
|
|
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 !
|
|
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
|
|
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 && (
|
|
1847
|
+
n && (na(n) || a.push({
|
|
1779
1848
|
ruleId: "accesslint-024",
|
|
1780
1849
|
selector: p(e),
|
|
1781
|
-
html:
|
|
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
|
|
1858
|
+
function Ae(t) {
|
|
1790
1859
|
return t.toLowerCase().replace(/\s+/g, " ").trim();
|
|
1791
1860
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const e =
|
|
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
|
|
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 +=
|
|
1877
|
+
a += ie(n);
|
|
1809
1878
|
}
|
|
1810
1879
|
return a;
|
|
1811
1880
|
}
|
|
1812
|
-
const
|
|
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 =
|
|
1894
|
+
const n = v(e);
|
|
1826
1895
|
if (!n) continue;
|
|
1827
1896
|
let i = "";
|
|
1828
|
-
e instanceof HTMLInputElement ? i = e.value || "" : i =
|
|
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 ||
|
|
1901
|
+
!o && !r || xe(n, i) || a.push({
|
|
1833
1902
|
ruleId: "accesslint-025",
|
|
1834
1903
|
selector: p(e),
|
|
1835
|
-
html:
|
|
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 =
|
|
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 =
|
|
1917
|
+
r && (o = ie(r));
|
|
1849
1918
|
}
|
|
1850
|
-
o.trim() && (
|
|
1919
|
+
o.trim() && (xe(n, o) || a.push({
|
|
1851
1920
|
ruleId: "accesslint-025",
|
|
1852
1921
|
selector: p(e),
|
|
1853
|
-
html:
|
|
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
|
-
},
|
|
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()),
|
|
1876
|
-
let
|
|
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() && (
|
|
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() && (
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
]),
|
|
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 (!
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
]),
|
|
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
|
-
]),
|
|
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
|
|
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 =
|
|
2070
|
+
return !e || !n ? !1 : ((o = pa[e]) == null ? void 0 : o.has(n)) ?? !1;
|
|
2002
2071
|
}
|
|
2003
|
-
function
|
|
2072
|
+
function ba(t) {
|
|
2004
2073
|
var i;
|
|
2005
2074
|
const a = t.tagName.toLowerCase();
|
|
2006
|
-
if (
|
|
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 &&
|
|
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
|
|
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
|
|
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) &&
|
|
2101
|
+
if (!b(o) && ba(o)) {
|
|
2033
2102
|
if (s.length > 0) {
|
|
2034
2103
|
const r = s[s.length - 1];
|
|
2035
|
-
|
|
2104
|
+
ha(r, o) || a.push({
|
|
2036
2105
|
ruleId: "accesslint-029",
|
|
2037
2106
|
selector: p(o),
|
|
2038
|
-
html:
|
|
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
|
-
|
|
2112
|
+
ga(o) && s.push(o);
|
|
2044
2113
|
}
|
|
2045
2114
|
o = i.nextNode();
|
|
2046
2115
|
}
|
|
2047
2116
|
return a;
|
|
2048
2117
|
}
|
|
2049
|
-
},
|
|
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
|
|
2127
|
+
var e;
|
|
2059
2128
|
const a = [];
|
|
2060
|
-
for (const
|
|
2061
|
-
if (b(
|
|
2062
|
-
const
|
|
2063
|
-
if (
|
|
2064
|
-
const
|
|
2065
|
-
if (
|
|
2066
|
-
const
|
|
2067
|
-
if (!(
|
|
2068
|
-
if (
|
|
2069
|
-
const
|
|
2070
|
-
if (
|
|
2071
|
-
const
|
|
2072
|
-
if (
|
|
2073
|
-
} else
|
|
2074
|
-
|
|
2075
|
-
|
|
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(
|
|
2083
|
-
html:
|
|
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
|
-
},
|
|
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:
|
|
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
|
-
},
|
|
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(", "),
|
|
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(
|
|
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:
|
|
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
|
-
},
|
|
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:
|
|
2236
|
+
html: m(s),
|
|
2170
2237
|
impact: "moderate",
|
|
2171
2238
|
message: `Heading level ${o} skipped from level ${n}.`,
|
|
2172
|
-
context: i ? `Previous heading: ${
|
|
2239
|
+
context: i ? `Previous heading: ${m(i)}` : void 0
|
|
2173
2240
|
}), n = o, i = s;
|
|
2174
2241
|
}
|
|
2175
2242
|
return a;
|
|
2176
2243
|
}
|
|
2177
|
-
},
|
|
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:
|
|
2263
|
+
html: m(e),
|
|
2197
2264
|
impact: "moderate",
|
|
2198
2265
|
message: "Page has multiple main landmarks."
|
|
2199
2266
|
})) : [];
|
|
2200
2267
|
}
|
|
2201
|
-
},
|
|
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(
|
|
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:
|
|
2282
|
+
html: m(i),
|
|
2216
2283
|
impact: "moderate",
|
|
2217
2284
|
message: "Page has multiple banner landmarks."
|
|
2218
2285
|
})
|
|
2219
2286
|
), a;
|
|
2220
2287
|
}
|
|
2221
|
-
},
|
|
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(
|
|
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:
|
|
2302
|
+
html: m(i),
|
|
2236
2303
|
impact: "moderate",
|
|
2237
2304
|
message: "Page has multiple contentinfo landmarks."
|
|
2238
2305
|
})
|
|
2239
2306
|
), a;
|
|
2240
2307
|
}
|
|
2241
|
-
},
|
|
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:
|
|
2322
|
+
html: m(n),
|
|
2256
2323
|
impact: "moderate",
|
|
2257
2324
|
message: "Page has multiple main landmarks."
|
|
2258
2325
|
})
|
|
2259
2326
|
), a;
|
|
2260
2327
|
}
|
|
2261
|
-
},
|
|
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(
|
|
2339
|
+
n.closest(B) && a.push({
|
|
2273
2340
|
ruleId: "accesslint-040",
|
|
2274
2341
|
selector: p(n),
|
|
2275
|
-
html:
|
|
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
|
-
},
|
|
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(
|
|
2359
|
+
n.closest(B) && a.push({
|
|
2293
2360
|
ruleId: "accesslint-041",
|
|
2294
2361
|
selector: p(n),
|
|
2295
|
-
html:
|
|
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
|
-
},
|
|
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:
|
|
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
|
-
},
|
|
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:
|
|
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
|
-
},
|
|
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 =
|
|
2366
|
-
|
|
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
|
|
2437
|
+
for (const d of l.slice(1))
|
|
2371
2438
|
a.push({
|
|
2372
2439
|
ruleId: "accesslint-044",
|
|
2373
|
-
selector: p(
|
|
2374
|
-
html:
|
|
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
|
-
},
|
|
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(
|
|
2396
|
-
!s && o && (i.querySelector(
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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 &&
|
|
2613
|
+
if (a && v(a)) return [];
|
|
2547
2614
|
const e = t.querySelectorAll('[role="heading"][aria-level="1"]');
|
|
2548
|
-
for (const
|
|
2549
|
-
if (
|
|
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
|
|
2555
|
-
|
|
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
|
|
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
|
|
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) ||
|
|
2585
|
-
if (!
|
|
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:
|
|
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
|
-
},
|
|
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) ||
|
|
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:
|
|
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
|
-
},
|
|
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) && !
|
|
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:
|
|
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
|
-
},
|
|
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:
|
|
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:
|
|
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,7 +2762,7 @@ const Da = {
|
|
|
2695
2762
|
}
|
|
2696
2763
|
return a;
|
|
2697
2764
|
}
|
|
2698
|
-
},
|
|
2765
|
+
}, _a = {
|
|
2699
2766
|
id: "accesslint-008",
|
|
2700
2767
|
actRuleIds: ["bisz58"],
|
|
2701
2768
|
wcag: ["2.2.1", "3.2.5"],
|
|
@@ -2711,7 +2778,7 @@ const Da = {
|
|
|
2711
2778
|
return i > 0 ? [{
|
|
2712
2779
|
ruleId: "accesslint-008",
|
|
2713
2780
|
selector: p(a),
|
|
2714
|
-
html:
|
|
2781
|
+
html: m(a),
|
|
2715
2782
|
impact: "critical",
|
|
2716
2783
|
message: `Page has a ${i}-second meta refresh delay.`
|
|
2717
2784
|
}] : [];
|
|
@@ -2719,14 +2786,14 @@ const Da = {
|
|
|
2719
2786
|
return [{
|
|
2720
2787
|
ruleId: "accesslint-008",
|
|
2721
2788
|
selector: p(a),
|
|
2722
|
-
html:
|
|
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
|
-
},
|
|
2796
|
+
}, Ga = {
|
|
2730
2797
|
id: "accesslint-007",
|
|
2731
2798
|
actRuleIds: ["bc659a"],
|
|
2732
2799
|
wcag: ["2.2.1", "2.2.4", "3.2.5"],
|
|
@@ -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:
|
|
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:
|
|
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
|
|
2829
|
+
function re(t) {
|
|
2763
2830
|
return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
2764
2831
|
}
|
|
2765
|
-
function
|
|
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
|
-
`${
|
|
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
|
|
2784
|
-
if (
|
|
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
|
|
2854
|
+
const u = parseFloat(c[1]), h = c[2].toLowerCase();
|
|
2788
2855
|
let g;
|
|
2789
2856
|
switch (h) {
|
|
2790
2857
|
case "px":
|
|
2791
|
-
g =
|
|
2858
|
+
g = u;
|
|
2792
2859
|
break;
|
|
2793
2860
|
case "pt":
|
|
2794
|
-
g =
|
|
2861
|
+
g = u * (4 / 3);
|
|
2795
2862
|
break;
|
|
2796
2863
|
case "cm":
|
|
2797
|
-
g =
|
|
2864
|
+
g = u * (96 / 2.54);
|
|
2798
2865
|
break;
|
|
2799
2866
|
case "mm":
|
|
2800
|
-
g =
|
|
2867
|
+
g = u * (96 / 25.4);
|
|
2801
2868
|
break;
|
|
2802
2869
|
case "in":
|
|
2803
|
-
g =
|
|
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
|
|
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
|
-
`${
|
|
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(
|
|
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
|
|
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
|
|
2908
|
+
function je(t) {
|
|
2842
2909
|
return !t.closest("svg") && !t.closest("math");
|
|
2843
2910
|
}
|
|
2844
|
-
function
|
|
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
|
|
2856
|
-
if (
|
|
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
|
-
`${
|
|
2927
|
+
`${re(a)}\\s*:\\s*[^;!]+\\s*!\\s*important`,
|
|
2861
2928
|
"i"
|
|
2862
|
-
).test(n) &&
|
|
2929
|
+
).test(n) && le(e, a))
|
|
2863
2930
|
return !0;
|
|
2864
2931
|
}
|
|
2865
2932
|
return !1;
|
|
2866
2933
|
}
|
|
2867
|
-
function
|
|
2934
|
+
function We(t, a, e, n) {
|
|
2868
2935
|
const i = [];
|
|
2869
2936
|
for (const s of t.querySelectorAll("[style]")) {
|
|
2870
|
-
if (b(s) || !
|
|
2871
|
-
const o =
|
|
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 =
|
|
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:
|
|
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
|
|
2954
|
+
const Xa = {
|
|
2888
2955
|
id: "accesslint-050",
|
|
2889
2956
|
actRuleIds: ["24afc2"],
|
|
2890
2957
|
wcag: ["1.4.12"],
|
|
@@ -2892,13 +2959,13 @@ const Ua = {
|
|
|
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
|
|
2962
|
+
return We(t, "important-letter-spacing", "letter-spacing", 0.12);
|
|
2896
2963
|
}
|
|
2897
2964
|
};
|
|
2898
|
-
function
|
|
2965
|
+
function Ka(t) {
|
|
2899
2966
|
let a = t, e = !1;
|
|
2900
2967
|
for (; a; ) {
|
|
2901
|
-
const n =
|
|
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
|
|
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) || !
|
|
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(
|
|
2989
|
+
const s = parseFloat(w(e).lineHeight);
|
|
2923
2990
|
if (s > 0 && e.scrollHeight <= s * 1.5) continue;
|
|
2924
2991
|
}
|
|
2925
|
-
const n =
|
|
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 =
|
|
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:
|
|
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
|
-
},
|
|
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
|
|
3016
|
+
return We(t, "important-word-spacing", "word-spacing", 0.16);
|
|
2950
3017
|
}
|
|
2951
3018
|
};
|
|
2952
|
-
function
|
|
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
|
|
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
|
|
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 =
|
|
2975
|
-
if (
|
|
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 (
|
|
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 (
|
|
3056
|
+
if (W(o)) return !0;
|
|
2990
3057
|
}
|
|
2991
3058
|
return !1;
|
|
2992
3059
|
}
|
|
2993
|
-
function
|
|
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 =
|
|
2997
|
-
return
|
|
3063
|
+
const e = Oe(parseFloat(a[1]), a[2]);
|
|
3064
|
+
return W(e);
|
|
2998
3065
|
}
|
|
2999
|
-
const
|
|
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 &&
|
|
3018
|
-
const
|
|
3084
|
+
if (l && Za(l[1]) && (r = !0), !r) {
|
|
3085
|
+
const d = o.match(
|
|
3019
3086
|
/(?:^|[{;\s])rotate\s*:\s*([^;]+)/i
|
|
3020
3087
|
);
|
|
3021
|
-
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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()) || "",
|
|
3070
|
-
if ((o && r || o &&
|
|
3071
|
-
const
|
|
3072
|
-
|
|
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:
|
|
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
|
-
},
|
|
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) =>
|
|
3162
|
+
!s.some((r) => at(r)) && s.length > 0 && a.push({
|
|
3096
3163
|
ruleId: "accesslint-054",
|
|
3097
3164
|
selector: p(e),
|
|
3098
|
-
html:
|
|
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
|
-
},
|
|
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
|
|
3181
|
+
return oe(t).validAttr;
|
|
3115
3182
|
}
|
|
3116
|
-
},
|
|
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
|
|
3192
|
+
return oe(t).validAttrValue;
|
|
3126
3193
|
}
|
|
3127
|
-
},
|
|
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
|
-
},
|
|
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 =
|
|
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:
|
|
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
|
|
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
|
|
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) ||
|
|
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
|
-
|
|
3275
|
+
v(e) || a.push({
|
|
3209
3276
|
ruleId: "accesslint-075",
|
|
3210
3277
|
selector: p(e),
|
|
3211
|
-
html:
|
|
3278
|
+
html: m(e),
|
|
3212
3279
|
impact: "critical",
|
|
3213
3280
|
message: "Button has no discernible text.",
|
|
3214
|
-
context:
|
|
3281
|
+
context: pn(e)
|
|
3215
3282
|
});
|
|
3216
3283
|
}
|
|
3217
3284
|
return a;
|
|
3218
3285
|
}
|
|
3219
|
-
},
|
|
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
|
-
},
|
|
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
|
-
]),
|
|
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 =
|
|
3394
|
+
const n = H(e);
|
|
3328
3395
|
if (!n) continue;
|
|
3329
|
-
const i =
|
|
3396
|
+
const i = bn[n];
|
|
3330
3397
|
if (i)
|
|
3331
3398
|
for (const s of e.attributes) {
|
|
3332
|
-
if (!s.name.startsWith("aria-") ||
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
]),
|
|
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
|
|
3535
|
+
function yn(t) {
|
|
3469
3536
|
var e;
|
|
3470
3537
|
const a = t.tagName.toLowerCase();
|
|
3471
|
-
if (
|
|
3538
|
+
if (vn.has(a))
|
|
3472
3539
|
return "none";
|
|
3473
3540
|
if (a === "a" && t.hasAttribute("href"))
|
|
3474
|
-
return
|
|
3541
|
+
return $["a[href]"];
|
|
3475
3542
|
if (a === "img" && t.getAttribute("alt") === "")
|
|
3476
|
-
return
|
|
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
|
|
3546
|
+
return i in $ ? $[i] : "none";
|
|
3480
3547
|
}
|
|
3481
|
-
return
|
|
3548
|
+
return $[a] || "any";
|
|
3482
3549
|
}
|
|
3483
|
-
const
|
|
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 =
|
|
3564
|
+
const s = Ne(n);
|
|
3498
3565
|
if (s && i === s) continue;
|
|
3499
|
-
const o =
|
|
3566
|
+
const o = yn(n);
|
|
3500
3567
|
o === "none" ? a.push({
|
|
3501
3568
|
ruleId: "accesslint-059",
|
|
3502
3569
|
selector: p(n),
|
|
3503
|
-
html:
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
]),
|
|
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
|
|
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 =
|
|
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
|
|
3576
|
-
|
|
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
|
|
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
|
|
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 =
|
|
3605
|
-
if (o === "pass" || o === "empty" &&
|
|
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:
|
|
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
|
-
},
|
|
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
|
|
3632
|
-
const s =
|
|
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 =
|
|
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:
|
|
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
|
-
},
|
|
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
|
|
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,25 @@ function vn(t) {
|
|
|
3678
3745
|
}
|
|
3679
3746
|
return !0;
|
|
3680
3747
|
}
|
|
3681
|
-
|
|
3748
|
+
function En(t) {
|
|
3749
|
+
const a = t.ownerDocument.defaultView;
|
|
3750
|
+
if (!a) return !1;
|
|
3751
|
+
const e = a.getComputedStyle(t), n = e.position;
|
|
3752
|
+
if (n !== "absolute" && n !== "fixed") return !1;
|
|
3753
|
+
const i = parseFloat(e.top), s = parseFloat(e.left);
|
|
3754
|
+
if (!(!isNaN(i) && i < -500 || !isNaN(s) && s < -500)) return !1;
|
|
3755
|
+
const r = t.id;
|
|
3756
|
+
if (!r) return !1;
|
|
3757
|
+
const l = r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), d = new RegExp(
|
|
3758
|
+
`getElementById\\s*\\(\\s*['"]${l}['"]\\s*\\)\\s*\\.\\s*addEventListener\\s*\\(\\s*['"]focus['"]`
|
|
3759
|
+
);
|
|
3760
|
+
for (const c of t.ownerDocument.querySelectorAll("script")) {
|
|
3761
|
+
const u = c.textContent || "";
|
|
3762
|
+
if (d.test(u) && /\.focus\s*\(/.test(u)) return !0;
|
|
3763
|
+
}
|
|
3764
|
+
return !1;
|
|
3765
|
+
}
|
|
3766
|
+
const qn = {
|
|
3682
3767
|
id: "accesslint-062",
|
|
3683
3768
|
selector: 'body[aria-hidden="true"]',
|
|
3684
3769
|
check: { type: "selector-exists" },
|
|
@@ -3690,7 +3775,7 @@ const yn = {
|
|
|
3690
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.",
|
|
3691
3776
|
prompt: "Instruct to remove aria-hidden='true' from the body element.",
|
|
3692
3777
|
skipAriaHidden: !1
|
|
3693
|
-
},
|
|
3778
|
+
}, Ln = T(qn), Rn = {
|
|
3694
3779
|
id: "accesslint-063",
|
|
3695
3780
|
actRuleIds: ["6cfa84"],
|
|
3696
3781
|
wcag: ["4.1.2"],
|
|
@@ -3702,31 +3787,31 @@ const yn = {
|
|
|
3702
3787
|
const a = [];
|
|
3703
3788
|
for (const e of t.querySelectorAll('[aria-hidden="true"]')) {
|
|
3704
3789
|
if (e === t.body) continue;
|
|
3705
|
-
const n = [...e.querySelectorAll(
|
|
3706
|
-
e.matches(
|
|
3790
|
+
const n = [...e.querySelectorAll(Ee)];
|
|
3791
|
+
e.matches(Ee) && n.push(e);
|
|
3707
3792
|
for (const i of n)
|
|
3708
3793
|
if (i instanceof HTMLElement) {
|
|
3709
3794
|
const s = i.getAttribute("tabindex");
|
|
3710
|
-
if (s === "-1" || i.disabled || i instanceof HTMLInputElement && i.type === "hidden" || !
|
|
3795
|
+
if (s === "-1" || i.disabled || i instanceof HTMLInputElement && i.type === "hidden" || !In(i)) continue;
|
|
3711
3796
|
const o = i.getAttribute("onfocus") || "";
|
|
3712
|
-
if (/\.focus\s*\(/.test(o)) continue;
|
|
3797
|
+
if (/\.focus\s*\(/.test(o) || En(i)) continue;
|
|
3713
3798
|
const r = i.tagName.toLowerCase();
|
|
3714
3799
|
let l;
|
|
3715
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}>`;
|
|
3716
|
-
const
|
|
3801
|
+
const d = i === e ? i : i.closest('[aria-hidden="true"]');
|
|
3717
3802
|
a.push({
|
|
3718
3803
|
ruleId: "accesslint-063",
|
|
3719
3804
|
selector: p(i),
|
|
3720
|
-
html:
|
|
3805
|
+
html: m(i),
|
|
3721
3806
|
impact: "serious",
|
|
3722
3807
|
message: "Focusable element is inside an aria-hidden region.",
|
|
3723
|
-
context: `Focusable because: ${l}. aria-hidden ancestor: ${
|
|
3808
|
+
context: `Focusable because: ${l}. aria-hidden ancestor: ${d ? m(d) : "unknown"}`
|
|
3724
3809
|
});
|
|
3725
3810
|
}
|
|
3726
3811
|
}
|
|
3727
3812
|
return a;
|
|
3728
3813
|
}
|
|
3729
|
-
},
|
|
3814
|
+
}, Cn = {
|
|
3730
3815
|
id: "accesslint-064",
|
|
3731
3816
|
actRuleIds: ["m6b1q3"],
|
|
3732
3817
|
wcag: ["4.1.2"],
|
|
@@ -3738,16 +3823,16 @@ const yn = {
|
|
|
3738
3823
|
var e;
|
|
3739
3824
|
const a = [];
|
|
3740
3825
|
for (const n of t.querySelectorAll('[role="button"], [role="link"], [role="menuitem"]')) {
|
|
3741
|
-
if (b(n) ||
|
|
3826
|
+
if (b(n) || N(n) || n.getRootNode() instanceof ShadowRoot) continue;
|
|
3742
3827
|
const i = n.getAttribute("role");
|
|
3743
3828
|
if ((n.tagName.toLowerCase() === "button" || n.tagName.toLowerCase() === "a") && i !== "menuitem") continue;
|
|
3744
|
-
if (!
|
|
3829
|
+
if (!v(n)) {
|
|
3745
3830
|
const o = n.querySelector("img[alt]");
|
|
3746
3831
|
if ((e = o == null ? void 0 : o.getAttribute("alt")) != null && e.trim()) continue;
|
|
3747
3832
|
a.push({
|
|
3748
3833
|
ruleId: "accesslint-064",
|
|
3749
3834
|
selector: p(n),
|
|
3750
|
-
html:
|
|
3835
|
+
html: m(n),
|
|
3751
3836
|
impact: "serious",
|
|
3752
3837
|
message: "ARIA command has no accessible name."
|
|
3753
3838
|
});
|
|
@@ -3755,7 +3840,7 @@ const yn = {
|
|
|
3755
3840
|
}
|
|
3756
3841
|
return a;
|
|
3757
3842
|
}
|
|
3758
|
-
},
|
|
3843
|
+
}, Tn = {
|
|
3759
3844
|
id: "accesslint-065",
|
|
3760
3845
|
wcag: ["4.1.2"],
|
|
3761
3846
|
level: "A",
|
|
@@ -3765,18 +3850,18 @@ const yn = {
|
|
|
3765
3850
|
run(t) {
|
|
3766
3851
|
const a = [], e = '[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]';
|
|
3767
3852
|
for (const n of t.querySelectorAll(e)) {
|
|
3768
|
-
if (b(n) ||
|
|
3769
|
-
|
|
3853
|
+
if (b(n) || N(n) || n.getRootNode() instanceof ShadowRoot || n.matches("input, select, textarea")) continue;
|
|
3854
|
+
v(n) || a.push({
|
|
3770
3855
|
ruleId: "accesslint-065",
|
|
3771
3856
|
selector: p(n),
|
|
3772
|
-
html:
|
|
3857
|
+
html: m(n),
|
|
3773
3858
|
impact: "serious",
|
|
3774
3859
|
message: "ARIA input field has no accessible name."
|
|
3775
3860
|
});
|
|
3776
3861
|
}
|
|
3777
3862
|
return a;
|
|
3778
3863
|
}
|
|
3779
|
-
},
|
|
3864
|
+
}, Mn = {
|
|
3780
3865
|
id: "accesslint-066",
|
|
3781
3866
|
wcag: ["4.1.2"],
|
|
3782
3867
|
level: "A",
|
|
@@ -3786,18 +3871,18 @@ const yn = {
|
|
|
3786
3871
|
run(t) {
|
|
3787
3872
|
const a = [], e = '[role="checkbox"], [role="switch"], [role="radio"], [role="menuitemcheckbox"], [role="menuitemradio"]';
|
|
3788
3873
|
for (const n of t.querySelectorAll(e)) {
|
|
3789
|
-
if (b(n) ||
|
|
3790
|
-
|
|
3874
|
+
if (b(n) || N(n) || n.getRootNode() instanceof ShadowRoot || n.matches('input[type="checkbox"], input[type="radio"]')) continue;
|
|
3875
|
+
v(n) || a.push({
|
|
3791
3876
|
ruleId: "accesslint-066",
|
|
3792
3877
|
selector: p(n),
|
|
3793
|
-
html:
|
|
3878
|
+
html: m(n),
|
|
3794
3879
|
impact: "serious",
|
|
3795
3880
|
message: "ARIA toggle field has no accessible name."
|
|
3796
3881
|
});
|
|
3797
3882
|
}
|
|
3798
3883
|
return a;
|
|
3799
3884
|
}
|
|
3800
|
-
},
|
|
3885
|
+
}, Nn = {
|
|
3801
3886
|
id: "accesslint-067",
|
|
3802
3887
|
wcag: ["4.1.2"],
|
|
3803
3888
|
level: "A",
|
|
@@ -3808,17 +3893,17 @@ const yn = {
|
|
|
3808
3893
|
const a = [];
|
|
3809
3894
|
for (const e of t.querySelectorAll('[role="meter"], meter')) {
|
|
3810
3895
|
if (b(e)) continue;
|
|
3811
|
-
|
|
3896
|
+
v(e) || a.push({
|
|
3812
3897
|
ruleId: "accesslint-067",
|
|
3813
3898
|
selector: p(e),
|
|
3814
|
-
html:
|
|
3899
|
+
html: m(e),
|
|
3815
3900
|
impact: "serious",
|
|
3816
3901
|
message: "Meter has no accessible name."
|
|
3817
3902
|
});
|
|
3818
3903
|
}
|
|
3819
3904
|
return a;
|
|
3820
3905
|
}
|
|
3821
|
-
},
|
|
3906
|
+
}, $n = {
|
|
3822
3907
|
id: "accesslint-068",
|
|
3823
3908
|
wcag: ["4.1.2"],
|
|
3824
3909
|
level: "A",
|
|
@@ -3829,17 +3914,17 @@ const yn = {
|
|
|
3829
3914
|
const a = [];
|
|
3830
3915
|
for (const e of t.querySelectorAll('[role="progressbar"], progress')) {
|
|
3831
3916
|
if (b(e)) continue;
|
|
3832
|
-
|
|
3917
|
+
v(e) || a.push({
|
|
3833
3918
|
ruleId: "accesslint-068",
|
|
3834
3919
|
selector: p(e),
|
|
3835
|
-
html:
|
|
3920
|
+
html: m(e),
|
|
3836
3921
|
impact: "serious",
|
|
3837
3922
|
message: "Progressbar has no accessible name."
|
|
3838
3923
|
});
|
|
3839
3924
|
}
|
|
3840
3925
|
return a;
|
|
3841
3926
|
}
|
|
3842
|
-
},
|
|
3927
|
+
}, Dn = {
|
|
3843
3928
|
id: "accesslint-069",
|
|
3844
3929
|
wcag: ["4.1.2"],
|
|
3845
3930
|
level: "A",
|
|
@@ -3850,17 +3935,17 @@ const yn = {
|
|
|
3850
3935
|
const a = [];
|
|
3851
3936
|
for (const e of t.querySelectorAll('[role="dialog"], [role="alertdialog"], dialog')) {
|
|
3852
3937
|
if (b(e)) continue;
|
|
3853
|
-
|
|
3938
|
+
v(e) || a.push({
|
|
3854
3939
|
ruleId: "accesslint-069",
|
|
3855
3940
|
selector: p(e),
|
|
3856
|
-
html:
|
|
3941
|
+
html: m(e),
|
|
3857
3942
|
impact: "serious",
|
|
3858
3943
|
message: "Dialog has no accessible name."
|
|
3859
3944
|
});
|
|
3860
3945
|
}
|
|
3861
3946
|
return a;
|
|
3862
3947
|
}
|
|
3863
|
-
},
|
|
3948
|
+
}, Fn = {
|
|
3864
3949
|
id: "accesslint-070",
|
|
3865
3950
|
wcag: ["4.1.2"],
|
|
3866
3951
|
level: "A",
|
|
@@ -3871,17 +3956,17 @@ const yn = {
|
|
|
3871
3956
|
const a = [];
|
|
3872
3957
|
for (const e of t.querySelectorAll('[role="tooltip"]')) {
|
|
3873
3958
|
if (b(e)) continue;
|
|
3874
|
-
|
|
3959
|
+
v(e) || a.push({
|
|
3875
3960
|
ruleId: "accesslint-070",
|
|
3876
3961
|
selector: p(e),
|
|
3877
|
-
html:
|
|
3962
|
+
html: m(e),
|
|
3878
3963
|
impact: "serious",
|
|
3879
3964
|
message: "Tooltip has no accessible name."
|
|
3880
3965
|
});
|
|
3881
3966
|
}
|
|
3882
3967
|
return a;
|
|
3883
3968
|
}
|
|
3884
|
-
},
|
|
3969
|
+
}, Pn = {
|
|
3885
3970
|
id: "accesslint-071",
|
|
3886
3971
|
wcag: ["4.1.2"],
|
|
3887
3972
|
level: "A",
|
|
@@ -3892,17 +3977,17 @@ const yn = {
|
|
|
3892
3977
|
const a = [];
|
|
3893
3978
|
for (const e of t.querySelectorAll('[role="treeitem"]')) {
|
|
3894
3979
|
if (b(e)) continue;
|
|
3895
|
-
|
|
3980
|
+
v(e) || a.push({
|
|
3896
3981
|
ruleId: "accesslint-071",
|
|
3897
3982
|
selector: p(e),
|
|
3898
|
-
html:
|
|
3983
|
+
html: m(e),
|
|
3899
3984
|
impact: "serious",
|
|
3900
3985
|
message: "Treeitem has no accessible name."
|
|
3901
3986
|
});
|
|
3902
3987
|
}
|
|
3903
3988
|
return a;
|
|
3904
3989
|
}
|
|
3905
|
-
},
|
|
3990
|
+
}, Hn = {
|
|
3906
3991
|
id: "accesslint-072",
|
|
3907
3992
|
actRuleIds: ["kb1m8s"],
|
|
3908
3993
|
wcag: ["4.1.2"],
|
|
@@ -3911,16 +3996,16 @@ const yn = {
|
|
|
3911
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.",
|
|
3912
3997
|
prompt: "Identify the prohibited attribute and recommend removing it from this element.",
|
|
3913
3998
|
run(t) {
|
|
3914
|
-
return
|
|
3999
|
+
return oe(t).prohibitedAttr;
|
|
3915
4000
|
}
|
|
3916
|
-
},
|
|
4001
|
+
}, zn = [
|
|
3917
4002
|
"a[href]",
|
|
3918
4003
|
"button:not([disabled])",
|
|
3919
4004
|
'input:not([disabled]):not([type="hidden"])',
|
|
3920
4005
|
"select:not([disabled])",
|
|
3921
4006
|
"textarea:not([disabled])",
|
|
3922
4007
|
'[tabindex]:not([tabindex="-1"])'
|
|
3923
|
-
].join(", "),
|
|
4008
|
+
].join(", "), jn = [
|
|
3924
4009
|
"aria-atomic",
|
|
3925
4010
|
"aria-busy",
|
|
3926
4011
|
"aria-controls",
|
|
@@ -3935,17 +4020,17 @@ const yn = {
|
|
|
3935
4020
|
"aria-owns",
|
|
3936
4021
|
"aria-relevant"
|
|
3937
4022
|
];
|
|
3938
|
-
function
|
|
4023
|
+
function qe(t) {
|
|
3939
4024
|
const a = [];
|
|
3940
|
-
t.matches(
|
|
3941
|
-
for (const e of
|
|
4025
|
+
t.matches(zn) && a.push("element is focusable");
|
|
4026
|
+
for (const e of jn)
|
|
3942
4027
|
if (t.hasAttribute(e)) {
|
|
3943
4028
|
a.push(`has ${e}`);
|
|
3944
4029
|
break;
|
|
3945
4030
|
}
|
|
3946
4031
|
return (t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby")) && a.push("has accessible name"), a;
|
|
3947
4032
|
}
|
|
3948
|
-
const
|
|
4033
|
+
const Un = {
|
|
3949
4034
|
id: "accesslint-073",
|
|
3950
4035
|
actRuleIds: ["46ca7f"],
|
|
3951
4036
|
wcag: ["4.1.2"],
|
|
@@ -3957,29 +4042,29 @@ const Nn = {
|
|
|
3957
4042
|
const a = [];
|
|
3958
4043
|
for (const e of t.querySelectorAll('[role="presentation"], [role="none"]')) {
|
|
3959
4044
|
if (b(e)) continue;
|
|
3960
|
-
const n =
|
|
4045
|
+
const n = qe(e);
|
|
3961
4046
|
n.length > 0 && a.push({
|
|
3962
4047
|
ruleId: "accesslint-073",
|
|
3963
4048
|
selector: p(e),
|
|
3964
|
-
html:
|
|
4049
|
+
html: m(e),
|
|
3965
4050
|
impact: "serious",
|
|
3966
4051
|
message: `Presentation role conflicts with: ${n.join(", ")}. The role will be ignored.`
|
|
3967
4052
|
});
|
|
3968
4053
|
}
|
|
3969
4054
|
for (const e of t.querySelectorAll('img[alt=""]')) {
|
|
3970
4055
|
if (b(e) || e.hasAttribute("role")) continue;
|
|
3971
|
-
const n =
|
|
4056
|
+
const n = qe(e);
|
|
3972
4057
|
n.length > 0 && a.push({
|
|
3973
4058
|
ruleId: "accesslint-073",
|
|
3974
4059
|
selector: p(e),
|
|
3975
|
-
html:
|
|
4060
|
+
html: m(e),
|
|
3976
4061
|
impact: "serious",
|
|
3977
4062
|
message: `Element with implicit presentation role (alt="") conflicts with: ${n.join(", ")}. The decorative role will be ignored.`
|
|
3978
4063
|
});
|
|
3979
4064
|
}
|
|
3980
4065
|
return a;
|
|
3981
4066
|
}
|
|
3982
|
-
},
|
|
4067
|
+
}, Wn = /* @__PURE__ */ new Set([
|
|
3983
4068
|
"button",
|
|
3984
4069
|
"checkbox",
|
|
3985
4070
|
"img",
|
|
@@ -3997,7 +4082,7 @@ const Nn = {
|
|
|
3997
4082
|
"spinbutton",
|
|
3998
4083
|
"switch",
|
|
3999
4084
|
"tab"
|
|
4000
|
-
]),
|
|
4085
|
+
]), On = [
|
|
4001
4086
|
"a[href]",
|
|
4002
4087
|
"button:not([disabled])",
|
|
4003
4088
|
'input:not([disabled]):not([type="hidden"])',
|
|
@@ -4009,7 +4094,7 @@ const Nn = {
|
|
|
4009
4094
|
"iframe",
|
|
4010
4095
|
"embed",
|
|
4011
4096
|
"object"
|
|
4012
|
-
].join(", "),
|
|
4097
|
+
].join(", "), Bn = {
|
|
4013
4098
|
id: "accesslint-074",
|
|
4014
4099
|
actRuleIds: ["307n5z"],
|
|
4015
4100
|
wcag: ["4.1.2"],
|
|
@@ -4020,14 +4105,14 @@ const Nn = {
|
|
|
4020
4105
|
const a = [];
|
|
4021
4106
|
for (const e of t.querySelectorAll("*")) {
|
|
4022
4107
|
if (b(e)) continue;
|
|
4023
|
-
const n =
|
|
4024
|
-
if (!(!n ||
|
|
4025
|
-
for (const i of e.querySelectorAll(
|
|
4108
|
+
const n = H(e);
|
|
4109
|
+
if (!(!n || !Wn.has(n))) {
|
|
4110
|
+
for (const i of e.querySelectorAll(On))
|
|
4026
4111
|
if (i !== e && !i.disabled) {
|
|
4027
4112
|
a.push({
|
|
4028
4113
|
ruleId: "accesslint-074",
|
|
4029
4114
|
selector: p(i),
|
|
4030
|
-
html:
|
|
4115
|
+
html: m(i),
|
|
4031
4116
|
impact: "serious",
|
|
4032
4117
|
message: `Focusable element inside a "${n}" role whose children are presentational.`
|
|
4033
4118
|
});
|
|
@@ -4037,7 +4122,7 @@ const Nn = {
|
|
|
4037
4122
|
}
|
|
4038
4123
|
return a;
|
|
4039
4124
|
}
|
|
4040
|
-
},
|
|
4125
|
+
}, Vn = {
|
|
4041
4126
|
id: "accesslint-076",
|
|
4042
4127
|
actRuleIds: ["2t702h"],
|
|
4043
4128
|
wcag: ["4.1.2"],
|
|
@@ -4049,10 +4134,10 @@ const Nn = {
|
|
|
4049
4134
|
const a = [];
|
|
4050
4135
|
for (const e of t.querySelectorAll("details > summary:first-of-type")) {
|
|
4051
4136
|
if (b(e)) continue;
|
|
4052
|
-
|
|
4137
|
+
v(e) || a.push({
|
|
4053
4138
|
ruleId: "accesslint-076",
|
|
4054
4139
|
selector: p(e),
|
|
4055
|
-
html:
|
|
4140
|
+
html: m(e),
|
|
4056
4141
|
impact: "serious",
|
|
4057
4142
|
message: "<summary> element has no accessible name. Add descriptive text."
|
|
4058
4143
|
});
|
|
@@ -4060,7 +4145,7 @@ const Nn = {
|
|
|
4060
4145
|
return a;
|
|
4061
4146
|
}
|
|
4062
4147
|
};
|
|
4063
|
-
function
|
|
4148
|
+
function _n(t) {
|
|
4064
4149
|
var i, s;
|
|
4065
4150
|
const a = [], e = t.getAttribute("href");
|
|
4066
4151
|
e && a.push(`href: ${e}`);
|
|
@@ -4077,7 +4162,7 @@ function Hn(t) {
|
|
|
4077
4162
|
return a.length > 0 ? a.join(`
|
|
4078
4163
|
`) : void 0;
|
|
4079
4164
|
}
|
|
4080
|
-
const
|
|
4165
|
+
const Gn = {
|
|
4081
4166
|
id: "accesslint-077",
|
|
4082
4167
|
actRuleIds: ["c487ae"],
|
|
4083
4168
|
wcag: ["2.4.4", "4.1.2"],
|
|
@@ -4088,19 +4173,19 @@ const zn = {
|
|
|
4088
4173
|
run(t) {
|
|
4089
4174
|
const a = [];
|
|
4090
4175
|
for (const e of t.querySelectorAll('a[href], area[href], [role="link"]')) {
|
|
4091
|
-
if (b(e) ||
|
|
4092
|
-
|
|
4176
|
+
if (b(e) || N(e) || e.getRootNode() instanceof ShadowRoot) continue;
|
|
4177
|
+
v(e) || a.push({
|
|
4093
4178
|
ruleId: "accesslint-077",
|
|
4094
4179
|
selector: p(e),
|
|
4095
|
-
html:
|
|
4180
|
+
html: m(e),
|
|
4096
4181
|
impact: "serious",
|
|
4097
4182
|
message: "Link has no discernible text.",
|
|
4098
|
-
context:
|
|
4183
|
+
context: _n(e)
|
|
4099
4184
|
});
|
|
4100
4185
|
}
|
|
4101
4186
|
return a;
|
|
4102
4187
|
}
|
|
4103
|
-
},
|
|
4188
|
+
}, Yn = {
|
|
4104
4189
|
id: "accesslint-078",
|
|
4105
4190
|
wcag: ["2.4.1"],
|
|
4106
4191
|
level: "A",
|
|
@@ -4119,14 +4204,14 @@ const zn = {
|
|
|
4119
4204
|
t.getElementById(r) || a.push({
|
|
4120
4205
|
ruleId: "accesslint-078",
|
|
4121
4206
|
selector: p(n),
|
|
4122
|
-
html:
|
|
4207
|
+
html: m(n),
|
|
4123
4208
|
impact: "moderate",
|
|
4124
4209
|
message: `Skip link points to "#${r}" which does not exist on the page.`
|
|
4125
4210
|
});
|
|
4126
4211
|
}
|
|
4127
4212
|
return a;
|
|
4128
4213
|
}
|
|
4129
|
-
},
|
|
4214
|
+
}, Xn = /* @__PURE__ */ new Set([
|
|
4130
4215
|
"block",
|
|
4131
4216
|
"flex",
|
|
4132
4217
|
"grid",
|
|
@@ -4134,96 +4219,49 @@ const zn = {
|
|
|
4134
4219
|
"table-cell",
|
|
4135
4220
|
"list-item",
|
|
4136
4221
|
"flow-root"
|
|
4137
|
-
]),
|
|
4222
|
+
]), Kn = /* @__PURE__ */ new Set([
|
|
4138
4223
|
"inline",
|
|
4139
4224
|
"inline-block",
|
|
4140
4225
|
"inline-flex",
|
|
4141
4226
|
"inline-grid"
|
|
4142
4227
|
]);
|
|
4143
|
-
function
|
|
4228
|
+
function Jn(t) {
|
|
4144
4229
|
let a = t.parentElement;
|
|
4145
|
-
for (; a; )
|
|
4146
|
-
const e = A(a).display;
|
|
4147
|
-
if (Wn.has(e))
|
|
4148
|
-
return Bn(a) ? a : null;
|
|
4230
|
+
for (; a && !Xn.has(w(a).display); )
|
|
4149
4231
|
a = a.parentElement;
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
for (; n = a.nextNode(); ) {
|
|
4160
|
-
if (!n.data.trim()) continue;
|
|
4161
|
-
let i = n.parentElement, s = !1;
|
|
4162
|
-
for (; i && i !== t; ) {
|
|
4163
|
-
if (i.tagName === "A") {
|
|
4164
|
-
s = !0;
|
|
4232
|
+
if (!a) return null;
|
|
4233
|
+
const e = a.ownerDocument.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
4234
|
+
let n = "", i = null, s;
|
|
4235
|
+
for (; s = e.nextNode(); ) {
|
|
4236
|
+
if (!s.data.trim()) continue;
|
|
4237
|
+
let r = s.parentElement, l = !1;
|
|
4238
|
+
for (; r && r !== a; ) {
|
|
4239
|
+
if (r.tagName === "A") {
|
|
4240
|
+
l = !0;
|
|
4165
4241
|
break;
|
|
4166
4242
|
}
|
|
4167
|
-
|
|
4243
|
+
r = r.parentElement;
|
|
4168
4244
|
}
|
|
4169
|
-
|
|
4245
|
+
l || (n += s.data, !i && s.parentElement && (i = R(w(s.parentElement).color)));
|
|
4170
4246
|
}
|
|
4171
|
-
|
|
4247
|
+
const o = n.match(new RegExp("\\p{L}{3,}", "gu"));
|
|
4248
|
+
return !i || !o || o.length < 2 ? null : { block: a, textColor: i };
|
|
4172
4249
|
}
|
|
4173
|
-
function
|
|
4174
|
-
const e = t.
|
|
4175
|
-
|
|
4176
|
-
NodeFilter.SHOW_TEXT
|
|
4177
|
-
);
|
|
4178
|
-
let n;
|
|
4179
|
-
for (; n = e.nextNode(); ) {
|
|
4180
|
-
if (!n.data.trim()) continue;
|
|
4181
|
-
let i = n.parentElement, s = !1, o = i;
|
|
4182
|
-
for (; o && o !== t; ) {
|
|
4183
|
-
if (o.tagName === "A") {
|
|
4184
|
-
s = !0;
|
|
4185
|
-
break;
|
|
4186
|
-
}
|
|
4187
|
-
o = o.parentElement;
|
|
4188
|
-
}
|
|
4189
|
-
if (!s && i)
|
|
4190
|
-
return C(A(i).color);
|
|
4191
|
-
}
|
|
4192
|
-
return null;
|
|
4250
|
+
function Le(t, a) {
|
|
4251
|
+
const e = t.textDecorationLine || t.textDecoration || "";
|
|
4252
|
+
return (e.includes("underline") || e.includes("line-through")) && e !== a;
|
|
4193
4253
|
}
|
|
4194
|
-
function
|
|
4195
|
-
const n = e.textDecorationLine || e.textDecoration || "", i = a.textDecorationLine || a.textDecoration || "";
|
|
4196
|
-
if ((i.includes("underline") || i.includes("line-through")) && i !== n)
|
|
4197
|
-
return !0;
|
|
4198
|
-
const s = parseFloat(a.borderBottomWidth) || 0, o = a.borderBottomStyle || "";
|
|
4199
|
-
if (s > 0 && o !== "none" && o !== "hidden")
|
|
4200
|
-
return !0;
|
|
4201
|
-
const r = parseFloat(a.outlineWidth) || 0, l = a.outlineStyle || "";
|
|
4202
|
-
if (r > 0 && l !== "none")
|
|
4203
|
-
return !0;
|
|
4204
|
-
const m = a.backgroundImage || "";
|
|
4205
|
-
if (m && m !== "none" && m !== "initial")
|
|
4206
|
-
return !0;
|
|
4207
|
-
const c = V(e.fontWeight), d = V(a.fontWeight);
|
|
4208
|
-
if (Math.abs(d - c) >= 300 || a.fontStyle !== e.fontStyle)
|
|
4209
|
-
return !0;
|
|
4210
|
-
const h = parseFloat(a.fontSize) || 16, g = parseFloat(e.fontSize) || 16;
|
|
4211
|
-
if (g > 0 && h / g >= 1.2)
|
|
4212
|
-
return !0;
|
|
4213
|
-
for (const f of t.querySelectorAll("*")) {
|
|
4214
|
-
const v = A(f), w = v.textDecorationLine || v.textDecoration || "";
|
|
4215
|
-
if ((w.includes("underline") || w.includes("line-through")) && w !== n || Math.abs(V(v.fontWeight) - c) >= 300)
|
|
4216
|
-
return !0;
|
|
4217
|
-
}
|
|
4218
|
-
return !1;
|
|
4219
|
-
}
|
|
4220
|
-
function V(t) {
|
|
4254
|
+
function U(t) {
|
|
4221
4255
|
return t === "bold" ? 700 : t === "normal" ? 400 : parseInt(t) || 400;
|
|
4222
4256
|
}
|
|
4223
|
-
function
|
|
4224
|
-
|
|
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;
|
|
4225
4263
|
}
|
|
4226
|
-
const
|
|
4264
|
+
const Zn = {
|
|
4227
4265
|
id: "accesslint-079",
|
|
4228
4266
|
wcag: ["1.4.1"],
|
|
4229
4267
|
level: "A",
|
|
@@ -4233,30 +4271,41 @@ const Gn = {
|
|
|
4233
4271
|
run(t) {
|
|
4234
4272
|
const a = [];
|
|
4235
4273
|
for (const e of t.querySelectorAll("a[href]")) {
|
|
4236
|
-
if (b(e) || !k(e).trim() || e.closest('nav, header, footer, [role="navigation"], [role="banner"], [role="contentinfo"]')) continue;
|
|
4237
|
-
const n =
|
|
4238
|
-
if (!
|
|
4239
|
-
const
|
|
4240
|
-
if (!
|
|
4241
|
-
const o =
|
|
4242
|
-
if (
|
|
4243
|
-
const
|
|
4244
|
-
if (
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
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);
|
|
4278
|
+
if (!i) 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;
|
|
4283
|
+
let c = !1;
|
|
4284
|
+
for (const A of e.querySelectorAll("*")) {
|
|
4285
|
+
const x = w(A);
|
|
4286
|
+
if (Le(x, o) || Math.abs(U(x.fontWeight) - U(s.fontWeight)) >= 300) {
|
|
4287
|
+
c = !0;
|
|
4288
|
+
break;
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
if (c) continue;
|
|
4292
|
+
const u = R(n.color);
|
|
4293
|
+
if (!u) continue;
|
|
4294
|
+
const h = I(...u), g = I(...i.textColor), f = M(h, g);
|
|
4295
|
+
if (f < 1.1 || f >= 3) continue;
|
|
4296
|
+
const y = (A) => "#" + A.map((x) => x.toString(16).padStart(2, "0")).join("");
|
|
4248
4297
|
a.push({
|
|
4249
4298
|
ruleId: "accesslint-079",
|
|
4250
4299
|
selector: p(e),
|
|
4251
|
-
html:
|
|
4300
|
+
html: m(e),
|
|
4252
4301
|
impact: "serious",
|
|
4253
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.",
|
|
4254
|
-
context: f
|
|
4303
|
+
context: `link color: ${y(u)} rgb(${u.join(", ")}), surrounding text: ${y(i.textColor)} rgb(${i.textColor.join(", ")}), ratio: ${f.toFixed(2)}:1`
|
|
4255
4304
|
});
|
|
4256
4305
|
}
|
|
4257
4306
|
return a;
|
|
4258
4307
|
}
|
|
4259
|
-
},
|
|
4308
|
+
}, ei = {
|
|
4260
4309
|
id: "accesslint-080",
|
|
4261
4310
|
actRuleIds: ["b5c3f8"],
|
|
4262
4311
|
wcag: ["3.1.1"],
|
|
@@ -4283,7 +4332,7 @@ const Gn = {
|
|
|
4283
4332
|
return [{
|
|
4284
4333
|
ruleId: "accesslint-080",
|
|
4285
4334
|
selector: p(a),
|
|
4286
|
-
html:
|
|
4335
|
+
html: m(a),
|
|
4287
4336
|
impact: "serious",
|
|
4288
4337
|
message: "<html> element missing lang attribute.",
|
|
4289
4338
|
context: i ? `Page text sample: "${i}"` : void 0
|
|
@@ -4291,17 +4340,17 @@ const Gn = {
|
|
|
4291
4340
|
}
|
|
4292
4341
|
return [];
|
|
4293
4342
|
}
|
|
4294
|
-
},
|
|
4343
|
+
}, ti = new Set(
|
|
4295
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(" ")
|
|
4296
|
-
),
|
|
4345
|
+
), ai = new Set(
|
|
4297
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(" ")
|
|
4298
|
-
),
|
|
4299
|
-
function
|
|
4300
|
-
if (!
|
|
4347
|
+
), ni = /^[a-z]{2,8}(-[a-z0-9]{1,8})*$/i;
|
|
4348
|
+
function Be(t) {
|
|
4349
|
+
if (!ni.test(t)) return !1;
|
|
4301
4350
|
const a = t.split("-")[0].toLowerCase();
|
|
4302
|
-
return a.length === 2 ?
|
|
4351
|
+
return a.length === 2 ? ti.has(a) : a.length === 3 ? !ai.has(a) : !1;
|
|
4303
4352
|
}
|
|
4304
|
-
const
|
|
4353
|
+
const ii = {
|
|
4305
4354
|
id: "accesslint-081",
|
|
4306
4355
|
actRuleIds: ["bf051a"],
|
|
4307
4356
|
wcag: ["3.1.1"],
|
|
@@ -4312,16 +4361,16 @@ const Qn = {
|
|
|
4312
4361
|
run(t) {
|
|
4313
4362
|
var e;
|
|
4314
4363
|
const a = (e = t.documentElement.getAttribute("lang")) == null ? void 0 : e.trim();
|
|
4315
|
-
return a && !
|
|
4364
|
+
return a && !Be(a) ? [{
|
|
4316
4365
|
ruleId: "accesslint-081",
|
|
4317
4366
|
selector: "html",
|
|
4318
|
-
html:
|
|
4367
|
+
html: m(t.documentElement),
|
|
4319
4368
|
impact: "serious",
|
|
4320
4369
|
message: `Invalid lang attribute value "${a}".`
|
|
4321
4370
|
}] : [];
|
|
4322
4371
|
}
|
|
4323
4372
|
};
|
|
4324
|
-
function
|
|
4373
|
+
function Re(t) {
|
|
4325
4374
|
var n;
|
|
4326
4375
|
const a = t.ownerDocument.createTreeWalker(t, NodeFilter.SHOW_TEXT);
|
|
4327
4376
|
let e;
|
|
@@ -4353,7 +4402,7 @@ function Ee(t) {
|
|
|
4353
4402
|
}
|
|
4354
4403
|
return !1;
|
|
4355
4404
|
}
|
|
4356
|
-
const
|
|
4405
|
+
const si = {
|
|
4357
4406
|
id: "accesslint-082",
|
|
4358
4407
|
actRuleIds: ["de46e4"],
|
|
4359
4408
|
wcag: ["3.1.2"],
|
|
@@ -4367,26 +4416,26 @@ const Zn = {
|
|
|
4367
4416
|
if (b(e) || e === t.documentElement) continue;
|
|
4368
4417
|
const n = e.getAttribute("lang"), i = n == null ? void 0 : n.trim();
|
|
4369
4418
|
if (n && !i) {
|
|
4370
|
-
|
|
4419
|
+
Re(e) && a.push({
|
|
4371
4420
|
ruleId: "accesslint-082",
|
|
4372
4421
|
selector: p(e),
|
|
4373
|
-
html:
|
|
4422
|
+
html: m(e),
|
|
4374
4423
|
impact: "serious",
|
|
4375
4424
|
message: "Empty lang attribute value."
|
|
4376
4425
|
});
|
|
4377
4426
|
continue;
|
|
4378
4427
|
}
|
|
4379
|
-
i &&
|
|
4428
|
+
i && Re(e) && (Be(i) || a.push({
|
|
4380
4429
|
ruleId: "accesslint-082",
|
|
4381
4430
|
selector: p(e),
|
|
4382
|
-
html:
|
|
4431
|
+
html: m(e),
|
|
4383
4432
|
impact: "serious",
|
|
4384
4433
|
message: `Invalid lang attribute value "${i}".`
|
|
4385
4434
|
}));
|
|
4386
4435
|
}
|
|
4387
4436
|
return a;
|
|
4388
4437
|
}
|
|
4389
|
-
},
|
|
4438
|
+
}, oi = {
|
|
4390
4439
|
id: "accesslint-083",
|
|
4391
4440
|
wcag: ["3.1.1"],
|
|
4392
4441
|
level: "A",
|
|
@@ -4402,14 +4451,14 @@ const Zn = {
|
|
|
4402
4451
|
return [{
|
|
4403
4452
|
ruleId: "accesslint-083",
|
|
4404
4453
|
selector: "html",
|
|
4405
|
-
html:
|
|
4454
|
+
html: m(a),
|
|
4406
4455
|
impact: "moderate",
|
|
4407
4456
|
message: `lang="${e}" and xml:lang="${n}" do not match.`
|
|
4408
4457
|
}];
|
|
4409
4458
|
}
|
|
4410
4459
|
return [];
|
|
4411
4460
|
}
|
|
4412
|
-
},
|
|
4461
|
+
}, ri = {
|
|
4413
4462
|
id: "accesslint-084",
|
|
4414
4463
|
actRuleIds: ["a25f45"],
|
|
4415
4464
|
wcag: ["1.3.1"],
|
|
@@ -4429,7 +4478,7 @@ const Zn = {
|
|
|
4429
4478
|
a.push({
|
|
4430
4479
|
ruleId: "accesslint-084",
|
|
4431
4480
|
selector: p(e),
|
|
4432
|
-
html:
|
|
4481
|
+
html: m(e),
|
|
4433
4482
|
impact: "serious",
|
|
4434
4483
|
message: `Headers attribute references the cell itself ("${o}").`
|
|
4435
4484
|
});
|
|
@@ -4439,7 +4488,7 @@ const Zn = {
|
|
|
4439
4488
|
a.push({
|
|
4440
4489
|
ruleId: "accesslint-084",
|
|
4441
4490
|
selector: p(e),
|
|
4442
|
-
html:
|
|
4491
|
+
html: m(e),
|
|
4443
4492
|
impact: "serious",
|
|
4444
4493
|
message: `Headers attribute references non-existent ID "${o}".`
|
|
4445
4494
|
});
|
|
@@ -4449,7 +4498,7 @@ const Zn = {
|
|
|
4449
4498
|
}
|
|
4450
4499
|
return a;
|
|
4451
4500
|
}
|
|
4452
|
-
},
|
|
4501
|
+
}, li = {
|
|
4453
4502
|
id: "accesslint-085",
|
|
4454
4503
|
actRuleIds: ["d0f69e"],
|
|
4455
4504
|
wcag: ["1.3.1"],
|
|
@@ -4465,14 +4514,32 @@ const Zn = {
|
|
|
4465
4514
|
n.length > 0 && i.length === 0 && a.push({
|
|
4466
4515
|
ruleId: "accesslint-085",
|
|
4467
4516
|
selector: p(e),
|
|
4468
|
-
html:
|
|
4517
|
+
html: m(e),
|
|
4469
4518
|
impact: "serious",
|
|
4470
4519
|
message: "Table has header cells but no data cells."
|
|
4471
4520
|
});
|
|
4472
4521
|
}
|
|
4473
4522
|
return a;
|
|
4474
4523
|
}
|
|
4475
|
-
}
|
|
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 = {
|
|
4476
4543
|
id: "accesslint-086",
|
|
4477
4544
|
wcag: ["1.3.1"],
|
|
4478
4545
|
level: "A",
|
|
@@ -4480,52 +4547,51 @@ const Zn = {
|
|
|
4480
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.",
|
|
4481
4548
|
prompt: "Explain whether to use scope attributes on headers or headers attribute on this cell.",
|
|
4482
4549
|
run(t) {
|
|
4483
|
-
var e
|
|
4550
|
+
var e;
|
|
4484
4551
|
const a = [];
|
|
4485
|
-
for (const
|
|
4486
|
-
if (b(
|
|
4487
|
-
const
|
|
4488
|
-
let
|
|
4489
|
-
for (const d of
|
|
4490
|
-
const
|
|
4491
|
-
let
|
|
4492
|
-
for (const
|
|
4493
|
-
|
|
4494
|
-
|
|
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);
|
|
4495
4562
|
}
|
|
4496
|
-
if (
|
|
4497
|
-
const
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
const x =
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
x && ((n = x.querySelectorAll("th, td")[f]) == null ? void 0 : n.tagName.toLowerCase()) === "th" && (v = !0);
|
|
4513
|
-
}
|
|
4514
|
-
if (!g && !v && !m && !c) {
|
|
4515
|
-
a.push({
|
|
4516
|
-
ruleId: "accesslint-086",
|
|
4517
|
-
selector: p(d),
|
|
4518
|
-
html: u(d),
|
|
4519
|
-
impact: "serious",
|
|
4520
|
-
message: "Data cell has no associated header. Add th elements with scope, or headers attribute."
|
|
4521
|
-
});
|
|
4522
|
-
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
|
+
}
|
|
4523
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;
|
|
4524
4589
|
}
|
|
4590
|
+
}
|
|
4525
4591
|
}
|
|
4526
4592
|
return a;
|
|
4527
4593
|
}
|
|
4528
|
-
},
|
|
4594
|
+
}, ui = {
|
|
4529
4595
|
id: "accesslint-087",
|
|
4530
4596
|
wcag: ["1.3.1"],
|
|
4531
4597
|
level: "A",
|
|
@@ -4541,14 +4607,14 @@ const Zn = {
|
|
|
4541
4607
|
s && !e.has(s) && a.push({
|
|
4542
4608
|
ruleId: "accesslint-087",
|
|
4543
4609
|
selector: p(i),
|
|
4544
|
-
html:
|
|
4610
|
+
html: m(i),
|
|
4545
4611
|
impact: "moderate",
|
|
4546
4612
|
message: `Invalid scope value "${s}". Use row, col, rowgroup, or colgroup.`
|
|
4547
4613
|
});
|
|
4548
4614
|
}
|
|
4549
4615
|
return a;
|
|
4550
4616
|
}
|
|
4551
|
-
},
|
|
4617
|
+
}, mi = {
|
|
4552
4618
|
id: "accesslint-088",
|
|
4553
4619
|
wcag: [],
|
|
4554
4620
|
level: "A",
|
|
@@ -4561,17 +4627,17 @@ const Zn = {
|
|
|
4561
4627
|
for (const e of t.querySelectorAll("th")) {
|
|
4562
4628
|
if (b(e)) continue;
|
|
4563
4629
|
const n = e.closest("table");
|
|
4564
|
-
(n == null ? void 0 : n.getAttribute("role")) === "presentation" || (n == null ? void 0 : n.getAttribute("role")) === "none" ||
|
|
4630
|
+
(n == null ? void 0 : n.getAttribute("role")) === "presentation" || (n == null ? void 0 : n.getAttribute("role")) === "none" || v(e) || a.push({
|
|
4565
4631
|
ruleId: "accesslint-088",
|
|
4566
4632
|
selector: p(e),
|
|
4567
|
-
html:
|
|
4633
|
+
html: m(e),
|
|
4568
4634
|
impact: "minor",
|
|
4569
4635
|
message: "Table header cell is empty. Add text or use aria-label."
|
|
4570
4636
|
});
|
|
4571
4637
|
}
|
|
4572
4638
|
return a;
|
|
4573
4639
|
}
|
|
4574
|
-
},
|
|
4640
|
+
}, X = ["aria-labelledby", "aria-describedby", "aria-controls", "aria-owns", "aria-flowto"], pi = {
|
|
4575
4641
|
id: "accesslint-089",
|
|
4576
4642
|
wcag: ["4.1.2"],
|
|
4577
4643
|
level: "A",
|
|
@@ -4581,7 +4647,7 @@ const Zn = {
|
|
|
4581
4647
|
run(t) {
|
|
4582
4648
|
const a = [], e = /* @__PURE__ */ new Set();
|
|
4583
4649
|
for (const i of t.querySelectorAll("[aria-labelledby], [aria-describedby], [aria-controls], [aria-owns], [aria-flowto]"))
|
|
4584
|
-
for (const s of
|
|
4650
|
+
for (const s of X) {
|
|
4585
4651
|
const o = i.getAttribute(s);
|
|
4586
4652
|
o && o.split(/\s+/).forEach((r) => e.add(r));
|
|
4587
4653
|
}
|
|
@@ -4595,31 +4661,31 @@ const Zn = {
|
|
|
4595
4661
|
for (const [i, s] of n) {
|
|
4596
4662
|
if (s <= 1) continue;
|
|
4597
4663
|
const o = t.querySelectorAll(`#${CSS.escape(i)}`), r = t.querySelector(
|
|
4598
|
-
|
|
4664
|
+
X.map((c) => `[${c}~="${CSS.escape(i)}"]`).join(", ")
|
|
4599
4665
|
), l = t.querySelector(`label[for="${CSS.escape(i)}"]`);
|
|
4600
|
-
let
|
|
4666
|
+
let d;
|
|
4601
4667
|
if (r) {
|
|
4602
|
-
const c =
|
|
4603
|
-
(
|
|
4668
|
+
const c = X.find(
|
|
4669
|
+
(u) => {
|
|
4604
4670
|
var h;
|
|
4605
|
-
return (h = r.getAttribute(
|
|
4671
|
+
return (h = r.getAttribute(u)) == null ? void 0 : h.split(/\s+/).includes(i);
|
|
4606
4672
|
}
|
|
4607
4673
|
);
|
|
4608
|
-
c && (
|
|
4609
|
-
} else l && (
|
|
4674
|
+
c && (d = c);
|
|
4675
|
+
} else l && (d = "label[for]");
|
|
4610
4676
|
a.push({
|
|
4611
4677
|
ruleId: "accesslint-089",
|
|
4612
4678
|
selector: p(o[1]),
|
|
4613
|
-
html:
|
|
4679
|
+
html: m(o[1]),
|
|
4614
4680
|
impact: "critical",
|
|
4615
|
-
message: `Duplicate ID "${i}" referenced by ${
|
|
4616
|
-
context: `First element: ${
|
|
4617
|
-
Referenced by: ${
|
|
4681
|
+
message: `Duplicate ID "${i}" referenced by ${d ?? "an accessibility attribute"}.`,
|
|
4682
|
+
context: `First element: ${m(o[0])}${d ? `
|
|
4683
|
+
Referenced by: ${d}` : ""}`
|
|
4618
4684
|
});
|
|
4619
4685
|
}
|
|
4620
4686
|
return a;
|
|
4621
4687
|
}
|
|
4622
|
-
},
|
|
4688
|
+
}, hi = {
|
|
4623
4689
|
id: "accesslint-090",
|
|
4624
4690
|
actRuleIds: ["eac66b"],
|
|
4625
4691
|
wcag: ["1.2.2"],
|
|
@@ -4634,14 +4700,14 @@ Referenced by: ${m}` : ""}`
|
|
|
4634
4700
|
e.querySelector('track[kind="captions"], track[kind="subtitles"]') || a.push({
|
|
4635
4701
|
ruleId: "accesslint-090",
|
|
4636
4702
|
selector: p(e),
|
|
4637
|
-
html:
|
|
4703
|
+
html: m(e),
|
|
4638
4704
|
impact: "critical",
|
|
4639
4705
|
message: "Video element has no captions track."
|
|
4640
4706
|
});
|
|
4641
4707
|
}
|
|
4642
4708
|
return a;
|
|
4643
4709
|
}
|
|
4644
|
-
},
|
|
4710
|
+
}, bi = {
|
|
4645
4711
|
id: "accesslint-091",
|
|
4646
4712
|
actRuleIds: ["e7aa44"],
|
|
4647
4713
|
wcag: ["1.2.1"],
|
|
@@ -4657,14 +4723,14 @@ Referenced by: ${m}` : ""}`
|
|
|
4657
4723
|
i && i.querySelector('a[href*="transcript"], a[href*="text"]') || a.push({
|
|
4658
4724
|
ruleId: "accesslint-091",
|
|
4659
4725
|
selector: p(e),
|
|
4660
|
-
html:
|
|
4726
|
+
html: m(e),
|
|
4661
4727
|
impact: "critical",
|
|
4662
4728
|
message: "Audio element has no transcript or text alternative. Add a transcript or track element."
|
|
4663
4729
|
});
|
|
4664
4730
|
}
|
|
4665
4731
|
return a;
|
|
4666
4732
|
}
|
|
4667
|
-
},
|
|
4733
|
+
}, gi = /* @__PURE__ */ new Set([
|
|
4668
4734
|
"SCRIPT",
|
|
4669
4735
|
"STYLE",
|
|
4670
4736
|
"NOSCRIPT",
|
|
@@ -4680,13 +4746,22 @@ Referenced by: ${m}` : ""}`
|
|
|
4680
4746
|
"BR",
|
|
4681
4747
|
"HR"
|
|
4682
4748
|
]);
|
|
4683
|
-
function
|
|
4749
|
+
function se([t, a, e]) {
|
|
4684
4750
|
return "#" + [t, a, e].map((n) => n.toString(16).padStart(2, "0")).join("");
|
|
4685
4751
|
}
|
|
4686
|
-
function
|
|
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) {
|
|
4687
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");
|
|
4688
4763
|
}
|
|
4689
|
-
function
|
|
4764
|
+
function yi(t, a) {
|
|
4690
4765
|
if (t.tagName !== "LABEL") return !1;
|
|
4691
4766
|
const e = t, n = e.htmlFor;
|
|
4692
4767
|
if (n) {
|
|
@@ -4698,7 +4773,7 @@ function ui(t, a) {
|
|
|
4698
4773
|
const s = e.id;
|
|
4699
4774
|
return !!(s && a.querySelector(`[aria-labelledby~="${s}"][aria-disabled="true"]`));
|
|
4700
4775
|
}
|
|
4701
|
-
function
|
|
4776
|
+
function wi(t) {
|
|
4702
4777
|
const a = t.clip;
|
|
4703
4778
|
if (a && a.startsWith("rect(")) {
|
|
4704
4779
|
const n = a.match(/[\d.]+/g);
|
|
@@ -4712,25 +4787,25 @@ function mi(t) {
|
|
|
4712
4787
|
}
|
|
4713
4788
|
return !1;
|
|
4714
4789
|
}
|
|
4715
|
-
function
|
|
4790
|
+
function Ai(t) {
|
|
4716
4791
|
if (b(t)) return !0;
|
|
4717
4792
|
let a = t;
|
|
4718
4793
|
for (; a; ) {
|
|
4719
|
-
const e =
|
|
4720
|
-
if (e.display === "none" || e.visibility === "hidden" ||
|
|
4794
|
+
const e = w(a);
|
|
4795
|
+
if (e.display === "none" || e.visibility === "hidden" || wi(e)) return !0;
|
|
4721
4796
|
a = a.parentElement;
|
|
4722
4797
|
}
|
|
4723
4798
|
return !1;
|
|
4724
4799
|
}
|
|
4725
|
-
function
|
|
4800
|
+
function xi(t) {
|
|
4726
4801
|
let a = 1, e = t;
|
|
4727
4802
|
for (; e; ) {
|
|
4728
|
-
const n =
|
|
4803
|
+
const n = w(e), i = parseFloat(n.opacity);
|
|
4729
4804
|
isNaN(i) || (a *= i), e = e.parentElement;
|
|
4730
4805
|
}
|
|
4731
4806
|
return a;
|
|
4732
4807
|
}
|
|
4733
|
-
const
|
|
4808
|
+
const ki = {
|
|
4734
4809
|
grayscale: 0,
|
|
4735
4810
|
blur: 0,
|
|
4736
4811
|
"hue-rotate": 0,
|
|
@@ -4741,44 +4816,44 @@ const bi = {
|
|
|
4741
4816
|
saturate: 1,
|
|
4742
4817
|
opacity: 1
|
|
4743
4818
|
};
|
|
4744
|
-
function
|
|
4819
|
+
function Si(t) {
|
|
4745
4820
|
const a = parseFloat(t);
|
|
4746
4821
|
return isNaN(a) ? NaN : t.trim().endsWith("%") ? a / 100 : a;
|
|
4747
4822
|
}
|
|
4748
|
-
const
|
|
4749
|
-
function
|
|
4823
|
+
const Te = /([a-z-]+)\(([^)]*)\)/g;
|
|
4824
|
+
function Me(t) {
|
|
4750
4825
|
let a, e = !1;
|
|
4751
|
-
for (
|
|
4826
|
+
for (Te.lastIndex = 0; a = Te.exec(t); ) {
|
|
4752
4827
|
e = !0;
|
|
4753
|
-
const n =
|
|
4754
|
-
if (n === void 0 ||
|
|
4828
|
+
const n = ki[a[1]];
|
|
4829
|
+
if (n === void 0 || Si(a[2]) !== n) return !1;
|
|
4755
4830
|
}
|
|
4756
4831
|
return e;
|
|
4757
4832
|
}
|
|
4758
|
-
function
|
|
4833
|
+
function Ii(t) {
|
|
4759
4834
|
let a = t;
|
|
4760
4835
|
for (; a; ) {
|
|
4761
|
-
const e =
|
|
4762
|
-
if (n && n !== "none" && n !== "initial" && !
|
|
4836
|
+
const e = w(a), n = e.filter;
|
|
4837
|
+
if (n && n !== "none" && n !== "initial" && !Me(n)) return !0;
|
|
4763
4838
|
const i = e.mixBlendMode;
|
|
4764
4839
|
if (i && i !== "normal" && i !== "initial") return !0;
|
|
4765
4840
|
const s = e.backdropFilter;
|
|
4766
|
-
if (s && s !== "none" && s !== "initial" && !
|
|
4841
|
+
if (s && s !== "none" && s !== "initial" && !Me(s)) return !0;
|
|
4767
4842
|
a = a.parentElement;
|
|
4768
4843
|
}
|
|
4769
4844
|
return !1;
|
|
4770
4845
|
}
|
|
4771
|
-
function
|
|
4846
|
+
function Ei(t) {
|
|
4772
4847
|
return t.closest("select") !== null;
|
|
4773
4848
|
}
|
|
4774
|
-
function
|
|
4849
|
+
function qi(t) {
|
|
4775
4850
|
const a = t.replace(/\s/g, "");
|
|
4776
4851
|
return a ? !new RegExp("\\p{L}", "u").test(a) : !0;
|
|
4777
4852
|
}
|
|
4778
|
-
function
|
|
4853
|
+
function Li(t) {
|
|
4779
4854
|
return t.closest('[aria-disabled="true"]') !== null;
|
|
4780
4855
|
}
|
|
4781
|
-
const
|
|
4856
|
+
const Ri = {
|
|
4782
4857
|
id: "accesslint-092",
|
|
4783
4858
|
actRuleIds: ["afw4f7"],
|
|
4784
4859
|
wcag: ["1.4.3"],
|
|
@@ -4787,9 +4862,9 @@ const Ai = {
|
|
|
4787
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.",
|
|
4788
4863
|
prompt: "Suggest changing the text or background color to meet the minimum contrast ratio.",
|
|
4789
4864
|
run(t) {
|
|
4790
|
-
return
|
|
4865
|
+
return Ve(t, "accesslint-092", "AA");
|
|
4791
4866
|
}
|
|
4792
|
-
},
|
|
4867
|
+
}, Ci = {
|
|
4793
4868
|
id: "accesslint-093",
|
|
4794
4869
|
actRuleIds: ["09o5cg"],
|
|
4795
4870
|
wcag: ["1.4.6"],
|
|
@@ -4797,13 +4872,13 @@ const Ai = {
|
|
|
4797
4872
|
description: "Text elements must have enhanced color contrast against the background (WCAG AAA).",
|
|
4798
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).",
|
|
4799
4874
|
run(t) {
|
|
4800
|
-
return
|
|
4875
|
+
return Ve(t, "accesslint-093", "AAA");
|
|
4801
4876
|
}
|
|
4802
4877
|
};
|
|
4803
|
-
function
|
|
4878
|
+
function Ti(t) {
|
|
4804
4879
|
let a = t;
|
|
4805
4880
|
for (; a; ) {
|
|
4806
|
-
const e =
|
|
4881
|
+
const e = w(a), n = e.backgroundImage;
|
|
4807
4882
|
if (n && n !== "none" && n !== "initial")
|
|
4808
4883
|
return n.includes("gradient(") ? { bgImage: n, gradientEl: a } : null;
|
|
4809
4884
|
const i = e.backgroundColor;
|
|
@@ -4811,7 +4886,7 @@ function ki(t) {
|
|
|
4811
4886
|
a = a.parentElement;
|
|
4812
4887
|
continue;
|
|
4813
4888
|
}
|
|
4814
|
-
if (
|
|
4889
|
+
if (z(i) < 0.01) {
|
|
4815
4890
|
a = a.parentElement;
|
|
4816
4891
|
continue;
|
|
4817
4892
|
}
|
|
@@ -4819,220 +4894,211 @@ function ki(t) {
|
|
|
4819
4894
|
}
|
|
4820
4895
|
return null;
|
|
4821
4896
|
}
|
|
4822
|
-
function
|
|
4823
|
-
const
|
|
4824
|
-
if (
|
|
4825
|
-
let c = 0,
|
|
4826
|
-
for (const f of
|
|
4827
|
-
let
|
|
4828
|
-
e < 1 && (
|
|
4829
|
-
const
|
|
4830
|
-
|
|
4831
|
-
|
|
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])
|
|
4832
4907
|
);
|
|
4833
|
-
|
|
4908
|
+
A > c && (c = A, u = f);
|
|
4834
4909
|
}
|
|
4835
4910
|
if (c >= i) return null;
|
|
4836
4911
|
let h = a;
|
|
4837
|
-
e < 1 && (h =
|
|
4912
|
+
e < 1 && (h = L(a, u, e)), n < 1 && (h = L(h, u, n));
|
|
4838
4913
|
const g = Math.round(c * 100) / 100;
|
|
4839
4914
|
return {
|
|
4840
4915
|
ruleId: s,
|
|
4841
4916
|
selector: p(t),
|
|
4842
|
-
html:
|
|
4917
|
+
html: m(t),
|
|
4843
4918
|
impact: "serious",
|
|
4844
4919
|
message: `Insufficient${o === "AAA" ? " enhanced" : ""} color contrast ratio of ${g}:1 (required ${i}:1).`,
|
|
4845
|
-
context: `foreground: ${
|
|
4920
|
+
context: `foreground: ${se(h)} rgb(${h.join(", ")}), background: gradient, ratio: ${g}:1, required: ${i}:1`
|
|
4846
4921
|
};
|
|
4847
4922
|
}
|
|
4848
|
-
function
|
|
4923
|
+
function Ve(t, a, e) {
|
|
4849
4924
|
const n = [], i = t.body;
|
|
4850
4925
|
if (!i) return [];
|
|
4851
4926
|
const s = t.createTreeWalker(i, NodeFilter.SHOW_TEXT), o = /* @__PURE__ */ new Set();
|
|
4852
4927
|
let r;
|
|
4853
4928
|
for (; r = s.nextNode(); ) {
|
|
4854
|
-
if (!r.textContent || !r.textContent.trim() ||
|
|
4929
|
+
if (!r.textContent || !r.textContent.trim() || qi(r.textContent)) continue;
|
|
4855
4930
|
const l = r.parentElement;
|
|
4856
|
-
if (!l || o.has(l) || (o.add(l),
|
|
4857
|
-
const
|
|
4858
|
-
if (
|
|
4859
|
-
const c =
|
|
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);
|
|
4860
4935
|
if (parseFloat(c.opacity) === 0) continue;
|
|
4861
|
-
const
|
|
4862
|
-
if (
|
|
4936
|
+
const u = xi(l);
|
|
4937
|
+
if (u < 0.1) continue;
|
|
4863
4938
|
const h = c.textShadow;
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
if (
|
|
4874
|
-
|
|
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(
|
|
4875
4952
|
l,
|
|
4876
|
-
g,
|
|
4877
4953
|
f,
|
|
4878
|
-
|
|
4879
|
-
|
|
4954
|
+
y,
|
|
4955
|
+
u,
|
|
4956
|
+
A,
|
|
4880
4957
|
a,
|
|
4881
4958
|
e,
|
|
4882
|
-
|
|
4883
|
-
|
|
4959
|
+
E.bgImage,
|
|
4960
|
+
V ?? [255, 255, 255]
|
|
4884
4961
|
);
|
|
4885
|
-
|
|
4962
|
+
j && n.push(j);
|
|
4886
4963
|
}
|
|
4887
4964
|
continue;
|
|
4888
4965
|
}
|
|
4889
|
-
let
|
|
4890
|
-
|
|
4891
|
-
const
|
|
4892
|
-
if (
|
|
4893
|
-
const
|
|
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);
|
|
4894
4971
|
n.push({
|
|
4895
4972
|
ruleId: a,
|
|
4896
4973
|
selector: p(l),
|
|
4897
|
-
html:
|
|
4974
|
+
html: m(l),
|
|
4898
4975
|
impact: "serious",
|
|
4899
|
-
message: `Insufficient${e === "AAA" ? " enhanced" : ""} color contrast ratio of ${
|
|
4900
|
-
context: `foreground: ${
|
|
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`
|
|
4901
4978
|
});
|
|
4902
4979
|
}
|
|
4903
4980
|
}
|
|
4904
4981
|
return n;
|
|
4905
4982
|
}
|
|
4906
|
-
const
|
|
4983
|
+
const _e = [
|
|
4907
4984
|
// Document Structure
|
|
4908
|
-
Ma,
|
|
4909
|
-
Na,
|
|
4910
|
-
$a,
|
|
4911
|
-
Da,
|
|
4912
|
-
Fa,
|
|
4913
|
-
Ha,
|
|
4914
|
-
ja,
|
|
4915
4985
|
za,
|
|
4916
|
-
|
|
4917
|
-
|
|
4986
|
+
ja,
|
|
4987
|
+
Ua,
|
|
4988
|
+
Wa,
|
|
4989
|
+
Oa,
|
|
4990
|
+
Va,
|
|
4991
|
+
Ga,
|
|
4992
|
+
_a,
|
|
4993
|
+
nn,
|
|
4994
|
+
on,
|
|
4918
4995
|
// Images
|
|
4919
|
-
xt,
|
|
4920
|
-
St,
|
|
4921
|
-
It,
|
|
4922
|
-
Et,
|
|
4923
|
-
qt,
|
|
4924
4996
|
Rt,
|
|
4925
4997
|
Tt,
|
|
4926
4998
|
Mt,
|
|
4999
|
+
Nt,
|
|
5000
|
+
Dt,
|
|
4927
5001
|
Ft,
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
Ut,
|
|
5002
|
+
Ht,
|
|
5003
|
+
zt,
|
|
4931
5004
|
Ot,
|
|
4932
|
-
|
|
5005
|
+
// Forms
|
|
5006
|
+
Yt,
|
|
5007
|
+
Xt,
|
|
5008
|
+
Kt,
|
|
4933
5009
|
Jt,
|
|
4934
|
-
|
|
4935
|
-
|
|
5010
|
+
ia,
|
|
5011
|
+
sa,
|
|
5012
|
+
oa,
|
|
4936
5013
|
// Keyboard
|
|
4937
|
-
|
|
4938
|
-
na,
|
|
5014
|
+
la,
|
|
4939
5015
|
da,
|
|
4940
|
-
ua,
|
|
4941
|
-
ma,
|
|
4942
|
-
ha,
|
|
4943
|
-
// Structure
|
|
4944
|
-
ba,
|
|
4945
|
-
Pa,
|
|
4946
|
-
Za,
|
|
4947
|
-
ga,
|
|
4948
5016
|
fa,
|
|
4949
5017
|
va,
|
|
4950
5018
|
ya,
|
|
4951
|
-
wa,
|
|
4952
5019
|
Aa,
|
|
5020
|
+
// Structure
|
|
4953
5021
|
xa,
|
|
5022
|
+
Ba,
|
|
5023
|
+
rn,
|
|
4954
5024
|
ka,
|
|
4955
5025
|
Sa,
|
|
4956
5026
|
Ia,
|
|
4957
|
-
|
|
4958
|
-
Ta,
|
|
5027
|
+
Ea,
|
|
4959
5028
|
qa,
|
|
5029
|
+
La,
|
|
5030
|
+
Ra,
|
|
4960
5031
|
Ca,
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
5032
|
+
Ta,
|
|
5033
|
+
Ma,
|
|
5034
|
+
$a,
|
|
5035
|
+
Ha,
|
|
5036
|
+
Da,
|
|
5037
|
+
Pa,
|
|
5038
|
+
Xa,
|
|
5039
|
+
Ja,
|
|
5040
|
+
Qa,
|
|
4967
5041
|
tn,
|
|
4968
|
-
|
|
4969
|
-
|
|
5042
|
+
// ARIA
|
|
5043
|
+
ln,
|
|
5044
|
+
cn,
|
|
4970
5045
|
dn,
|
|
4971
|
-
|
|
4972
|
-
gn,
|
|
5046
|
+
mn,
|
|
4973
5047
|
fn,
|
|
4974
5048
|
wn,
|
|
4975
|
-
An,
|
|
4976
|
-
xn,
|
|
4977
5049
|
kn,
|
|
4978
5050
|
Sn,
|
|
4979
|
-
In,
|
|
4980
|
-
En,
|
|
4981
5051
|
Ln,
|
|
4982
|
-
qn,
|
|
4983
5052
|
Rn,
|
|
4984
5053
|
Cn,
|
|
5054
|
+
Tn,
|
|
5055
|
+
Mn,
|
|
4985
5056
|
Nn,
|
|
5057
|
+
$n,
|
|
5058
|
+
Dn,
|
|
4986
5059
|
Fn,
|
|
4987
|
-
rn,
|
|
4988
5060
|
Pn,
|
|
5061
|
+
Hn,
|
|
5062
|
+
Un,
|
|
5063
|
+
Bn,
|
|
5064
|
+
hn,
|
|
5065
|
+
Vn,
|
|
4989
5066
|
// Links
|
|
4990
|
-
zn,
|
|
4991
|
-
jn,
|
|
4992
5067
|
Gn,
|
|
4993
|
-
// Language
|
|
4994
5068
|
Yn,
|
|
4995
|
-
Qn,
|
|
4996
5069
|
Zn,
|
|
5070
|
+
// Language
|
|
4997
5071
|
ei,
|
|
4998
|
-
// Tables
|
|
4999
|
-
ti,
|
|
5000
|
-
ai,
|
|
5001
|
-
ni,
|
|
5002
5072
|
ii,
|
|
5003
5073
|
si,
|
|
5004
|
-
// Parsing
|
|
5005
5074
|
oi,
|
|
5006
|
-
//
|
|
5075
|
+
// Tables
|
|
5007
5076
|
ri,
|
|
5008
5077
|
li,
|
|
5078
|
+
di,
|
|
5079
|
+
ui,
|
|
5080
|
+
mi,
|
|
5081
|
+
// Parsing
|
|
5082
|
+
pi,
|
|
5083
|
+
// Media
|
|
5084
|
+
hi,
|
|
5085
|
+
bi,
|
|
5009
5086
|
// Color
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
]
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
"
|
|
5016
|
-
"accesslint-070",
|
|
5017
|
-
"accesslint-049",
|
|
5018
|
-
"accesslint-048",
|
|
5019
|
-
"accesslint-079",
|
|
5020
|
-
"accesslint-046",
|
|
5021
|
-
"accesslint-047",
|
|
5022
|
-
"accesslint-086"
|
|
5023
|
-
]);
|
|
5024
|
-
let re = [], Oe = /* @__PURE__ */ new Set(), Be = /* @__PURE__ */ new Set(), E, D;
|
|
5025
|
-
function Ci(t) {
|
|
5026
|
-
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;
|
|
5027
5093
|
}
|
|
5028
|
-
function
|
|
5029
|
-
if (
|
|
5030
|
-
const a =
|
|
5031
|
-
return
|
|
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;
|
|
5032
5098
|
}
|
|
5033
|
-
function
|
|
5034
|
-
|
|
5035
|
-
const a =
|
|
5099
|
+
function Hi(t) {
|
|
5100
|
+
Xe();
|
|
5101
|
+
const a = de(), e = C, n = [];
|
|
5036
5102
|
let i = 0;
|
|
5037
5103
|
return {
|
|
5038
5104
|
processChunk(s) {
|
|
@@ -5047,17 +5113,17 @@ function Ti(t) {
|
|
|
5047
5113
|
return i < a.length;
|
|
5048
5114
|
},
|
|
5049
5115
|
getViolations() {
|
|
5050
|
-
return e ?
|
|
5116
|
+
return e ? Fe(n, e) : n;
|
|
5051
5117
|
}
|
|
5052
5118
|
};
|
|
5053
5119
|
}
|
|
5054
|
-
function
|
|
5055
|
-
|
|
5120
|
+
function Xe() {
|
|
5121
|
+
nt(), Qe(), Ze(), ht(), pt(), it();
|
|
5056
5122
|
}
|
|
5057
|
-
function
|
|
5123
|
+
function zi(t) {
|
|
5058
5124
|
var n;
|
|
5059
|
-
|
|
5060
|
-
const a =
|
|
5125
|
+
Xe();
|
|
5126
|
+
const a = de(), e = [];
|
|
5061
5127
|
for (const i of a)
|
|
5062
5128
|
try {
|
|
5063
5129
|
e.push(...i.run(t));
|
|
@@ -5066,18 +5132,18 @@ function Mi(t) {
|
|
|
5066
5132
|
return {
|
|
5067
5133
|
url: ((n = t.location) == null ? void 0 : n.href) ?? "",
|
|
5068
5134
|
timestamp: Date.now(),
|
|
5069
|
-
violations:
|
|
5135
|
+
violations: C ? Fe(e, C) : e,
|
|
5070
5136
|
ruleCount: a.length
|
|
5071
5137
|
};
|
|
5072
5138
|
}
|
|
5073
|
-
const
|
|
5074
|
-
function
|
|
5075
|
-
if (
|
|
5076
|
-
return
|
|
5077
|
-
const a =
|
|
5078
|
-
return a ||
|
|
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);
|
|
5079
5145
|
}
|
|
5080
|
-
const
|
|
5146
|
+
const Ui = {
|
|
5081
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." } },
|
|
5082
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." } },
|
|
5083
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." } },
|
|
@@ -5171,7 +5237,7 @@ const $i = {
|
|
|
5171
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." } },
|
|
5172
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.' } },
|
|
5173
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." } }
|
|
5174
|
-
},
|
|
5240
|
+
}, Wi = {
|
|
5175
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>." } },
|
|
5176
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." } },
|
|
5177
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." } },
|
|
@@ -5267,31 +5333,30 @@ const $i = {
|
|
|
5267
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." } }
|
|
5268
5334
|
};
|
|
5269
5335
|
export {
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
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,
|
|
5280
5345
|
k as getAccessibleTextContent,
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5346
|
+
de as getActiveRules,
|
|
5347
|
+
H as getComputedRole,
|
|
5348
|
+
m as getHtmlSnippet,
|
|
5349
|
+
Ne as getImplicitRole,
|
|
5350
|
+
ji as getRuleById,
|
|
5286
5351
|
p as getSelector,
|
|
5287
5352
|
b as isAriaHidden,
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
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
|
|
5297
5362
|
};
|