W3C HTML Validation (w3c-html-validation)
Summary
W3C Nu Html Checker validation for the target and optional internal pages.
Classification
- Category:
SEO - Plugin id:
w3c-html-validation - Version:
1.0.0 - Target types:
WEBSITE,WEBSHOP - Weight class:
LIGHT - Risk level: not set on plugin object
- Browser required: No (HTTP / Node / other — see source)
- Tier / group: Tier 1 — HTTP-only
Schedule
- scheduleHints:
{ defaultInterval: '0 4 * * 1', priority: 3 } - Prerequisites: None declared on this plugin.
Configurable inputs
Public keys are derived from inputSchema: z.object({ ... }) (underscore-prefixed keys are runtime-only and omitted here).
| Field | Notes |
|---|---|
timeout |
Default 30000 ms per validator API call (5000–60000). |
maxPages |
Default 1, max 10 — homepage plus same-host links discovered from homepage. |
Runtime / injected config
- None documented beyond standard worker context (
target,config,logger,reportProgress). Underscore-prefixed keys are internal.
Checks that produce findings
These checks run inside this plugin during a single test run. They are not separate tests in the database — each becomes a Finding linked to the Run for w3c-html-validation.
| Check | Typical severity | Why |
|---|---|---|
| High HTML error count (> 10 total) | WARNING | Aggregate signal that markup quality is poor across checked pages — not one typo. |
| Individual W3C validator errors | INFO (grouped by normalized message) | Each distinct error type from Nu Html Checker; duplicates collapsed with occurrence count. |
| Individual W3C validator warnings | INFO (grouped) | type: info + subType: warning from validator JSON API. |
How each check works
- Page list — Start with target URL; if
maxPages> 1, walk homepage<a href>same-host HTTP(S) links until cap. - Validate — For each page, GET
https://validator.w3.org/nu/?doc={url}&out=jsonwith TesteBot user-agent. - Parse messages — Split errors vs warnings vs informational infos; only errors and warnings become findings.
- Group — Fingerprint normalizes message text (numbers →
N, quoted strings →"…") + path + type; merge counts and line numbers. - Severity — Per-message findings are always INFO; if total errors > 10 across all pages, prepend one WARNING aggregate finding.
- Rate limit — 1.1 s delay between pages when validating multiple URLs.
- Score — −2 per error (max −40), −1 per warning (max −20).
Caveats and concerns
- Public W3C dependency — Validator downtime, rate limits, or blocking affects results; failed API calls log and skip page silently.
- URL must be public — Nu checker fetches the page from the internet; staging/auth-only URLs cannot validate.
- INFO-heavy — Most single errors are INFO by design; only high volume triggers WARNING.
- Grouped titles — Long messages truncated to 120 chars in finding title.
- No infos in findings — Pure informational validator messages are counted in metrics only.
Source
packages/test-plugins/src/plugins/w3c-html-validation.ts