pour-engine 1.35.4 → 1.35.5
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/config/project.config.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
// WCAG SC 1.1.1 Non-text Content (Level A)
|
|
2
2
|
// alt="" (exactly empty) is the CONFORMING decorative marker (H67) — it
|
|
3
3
|
// hides the image from screen readers on purpose and passes. A
|
|
4
|
-
// whitespace-only alt is neither a text alternative nor that marker
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
4
|
+
// whitespace-only alt is neither a text alternative nor that marker by the
|
|
5
|
+
// letter of the spec, but the accessible name computes to empty and current
|
|
6
|
+
// screen readers skip the image as if it were alt="", and a single space
|
|
7
|
+
// was once a documented workaround for old JAWS reading the file name. Its
|
|
8
|
+
// authorship is ambiguous rather than a proven barrier, so since 2026-09-01
|
|
9
|
+
// it is flagged for eyes, not failed at critical alongside a missing alt.
|
|
10
|
+
// Filename/generic alts technically satisfy presence but tell the user
|
|
11
|
+
// nothing (F30/F39) — flagged for eyes.
|
|
8
12
|
const FILENAME_ALT = /\.(png|jpe?g|gif|webp|svg|avif|bmp|ico)([?#].*)?$/i;
|
|
9
13
|
const GENERIC_ALT = /^(image|img|photo|photograph|picture|graphic|icon|untitled|placeholder|spacer|\d+)$/i;
|
|
10
14
|
|
|
@@ -25,9 +29,8 @@ export default {
|
|
|
25
29
|
if (alt === '') return { status: 'pass' };
|
|
26
30
|
if (!alt.trim()) {
|
|
27
31
|
return {
|
|
28
|
-
status: '
|
|
29
|
-
message: `alt="${alt}" is only whitespace —
|
|
30
|
-
fix: 'Use alt="" (nothing between the quotes) for decorative images, or write a real description.',
|
|
32
|
+
status: 'incomplete',
|
|
33
|
+
message: `alt="${alt}" is only whitespace — not a description, and not the decorative marker either (that is alt="" with nothing between the quotes). Screen readers skip it today, so check the image is really decorative; if it carries meaning, describe it, and either way use alt="".`,
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
36
|
const trimmed = alt.trim();
|
package/package.json
CHANGED