tailwind-a11y 0.15.0 → 0.15.1
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.
|
@@ -5,15 +5,20 @@ const TRANSITION_BASES = new Set(["transition", "transition-all", "transition-tr
|
|
|
5
5
|
// class shape as bare hover:, just evaluated against an ancestor/sibling
|
|
6
6
|
// (.group/.peer marker) instead of the element itself -- verified against a
|
|
7
7
|
// real Tailwind v4 build (`.group-hover\:scale-110:is(:where(.group):hover *)`).
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
8
|
+
// in-*: (Tailwind v4.1+) is the same idea with no marker class required --
|
|
9
|
+
// verified against a real build that `.in-hover\:scale-110` compiles to
|
|
10
|
+
// `:where(:hover) .in-hover\:scale-110`, matching *any* ancestor in that
|
|
11
|
+
// state. This tool already doesn't verify a `.group`/`.peer` marker actually
|
|
12
|
+
// exists on an ancestor (an accepted limitation), so in-*: is no harder to
|
|
13
|
+
// recognize correctly -- if anything simpler, since it has no named-variant
|
|
14
|
+
// slash syntax to handle. Deliberately NOT extended to has-*:/arbitrary
|
|
15
|
+
// variants ([&:hover]:, already an established out-of-scope precedent for
|
|
16
|
+
// this file -- unbounded selector text, not a closed enumerable set).
|
|
13
17
|
const INTERACTION_VARIANTS = new Set([
|
|
14
18
|
"hover", "focus", "focus-visible", "focus-within", "active",
|
|
15
19
|
"group-hover", "group-focus", "group-focus-visible", "group-focus-within", "group-active",
|
|
16
20
|
"peer-hover", "peer-focus", "peer-focus-visible", "peer-focus-within", "peer-active",
|
|
21
|
+
"in-hover", "in-focus", "in-focus-visible", "in-focus-within", "in-active",
|
|
17
22
|
]);
|
|
18
23
|
// Named groups/peers (`group-hover/sidebar:scale-110`) compile the group
|
|
19
24
|
// name into the variant token itself via a slash
|
|
@@ -5,15 +5,16 @@
|
|
|
5
5
|
// animates (the browser has nothing telling it to transition that
|
|
6
6
|
// property), and correctly isn't flagged.
|
|
7
7
|
const TRANSITION_BASES = new Set(["transition", "transition-all", "transition-transform"]);
|
|
8
|
-
// group-hover:/peer-hover:/etc. compile to the identical
|
|
9
|
-
// class shape as bare hover
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
// extended to has-*:/arbitrary variants
|
|
8
|
+
// group-hover:/peer-hover:/in-hover:/etc. compile to the identical
|
|
9
|
+
// momentary-pseudo-class shape as bare hover: -- see the identical set (and
|
|
10
|
+
// full explanation, including why in-*: needs no marker-class verification
|
|
11
|
+
// and no named-variant handling) in extractReducedMotion.ts. Deliberately
|
|
12
|
+
// NOT extended to has-*:/arbitrary variants -- see that file's comment.
|
|
13
13
|
const INTERACTION_VARIANTS = new Set([
|
|
14
14
|
"hover", "focus", "focus-visible", "focus-within", "active",
|
|
15
15
|
"group-hover", "group-focus", "group-focus-visible", "group-focus-within", "group-active",
|
|
16
16
|
"peer-hover", "peer-focus", "peer-focus-visible", "peer-focus-within", "peer-active",
|
|
17
|
+
"in-hover", "in-focus", "in-focus-visible", "in-focus-within", "in-active",
|
|
17
18
|
]);
|
|
18
19
|
// Named groups/peers (`group-hover/sidebar:...`) put the group name in the
|
|
19
20
|
// variant token itself via a slash -- see extractReducedMotion.ts for the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwind-a11y",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Static analysis CLI that catches WCAG accessibility violations — color contrast, touch target size, and focus indicator removal/contrast — in Tailwind CSS class combinations before they ship.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|