@webability/core 1.14.0 → 1.16.0

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.
@@ -10,10 +10,15 @@
10
10
  * - every pixel fails the threshold -> the text fails wherever it sits: VIOLATION
11
11
  * - any pixel passes -> the background is not uniformly bad: DROP
12
12
  * (a mixed gradient is not a confident failure, and never a pass we claim)
13
+ * - gradient text (background-clip:text) has no backdrop to compare, so the
14
+ * painted glyph pixels are measured and the text fails on its 2nd percentile
15
+ * glyph pixel (the worst gradient stop), not on every pixel
16
+ * - a transform alone does not blend, so transformed boxes (swiper slides,
17
+ * translate3d) are measured; opacity < 1, mix-blend-mode and filter do
13
18
  *
14
19
  * Anything we cannot measure reliably (semi-transparent text, text over
15
- * <video>/<canvas>/<iframe>, background-clip:text, transformed or clipped
16
- * boxes, no screenshot support) is dropped, never judged.
20
+ * <video>/<canvas>/<iframe>, clipped boxes, no screenshot support) is
21
+ * dropped, never judged.
17
22
  */
18
23
 
19
24
  interface PixelVerdict {
@@ -29,6 +34,8 @@ interface PixelVerdict {
29
34
  bestBg?: string;
30
35
  threshold: number;
31
36
  fg: string;
37
+ /** True for background-clip:text gradients: `fg` is the worst painted glyph colour, `worstBg` the backdrop behind it. */
38
+ gradientText?: boolean;
32
39
  }
33
40
 
34
41
  /**
@@ -10,10 +10,15 @@
10
10
  * - every pixel fails the threshold -> the text fails wherever it sits: VIOLATION
11
11
  * - any pixel passes -> the background is not uniformly bad: DROP
12
12
  * (a mixed gradient is not a confident failure, and never a pass we claim)
13
+ * - gradient text (background-clip:text) has no backdrop to compare, so the
14
+ * painted glyph pixels are measured and the text fails on its 2nd percentile
15
+ * glyph pixel (the worst gradient stop), not on every pixel
16
+ * - a transform alone does not blend, so transformed boxes (swiper slides,
17
+ * translate3d) are measured; opacity < 1, mix-blend-mode and filter do
13
18
  *
14
19
  * Anything we cannot measure reliably (semi-transparent text, text over
15
- * <video>/<canvas>/<iframe>, background-clip:text, transformed or clipped
16
- * boxes, no screenshot support) is dropped, never judged.
20
+ * <video>/<canvas>/<iframe>, clipped boxes, no screenshot support) is
21
+ * dropped, never judged.
17
22
  */
18
23
 
19
24
  interface PixelVerdict {
@@ -29,6 +34,8 @@ interface PixelVerdict {
29
34
  bestBg?: string;
30
35
  threshold: number;
31
36
  fg: string;
37
+ /** True for background-clip:text gradients: `fg` is the worst painted glyph colour, `worstBg` the backdrop behind it. */
38
+ gradientText?: boolean;
32
39
  }
33
40
 
34
41
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webability/core",
3
- "version": "1.14.0",
3
+ "version": "1.16.0",
4
4
  "description": "Accessibility scanner engine — WCAG 2.2 AA compliance testing with 200+ rules",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",