HTML validation with html-validate
Validates the page's HTML and logs the problems found.
Nothing to set up: it's on by default, so a plain elsetest --url staging.example.com already uses it. The options below are for fine-tuning.
This is Elsetest's Validate plugin. It runs as the instance ValidateHTML.
Like every plugin, it gets its turn at random: in each step of a test, one plugin instance is picked, weighted by its frequency. Raise it to check more often.
Options
Set them for one instance with --plugin alias=<alias> key=value, or for every instance of the plugin with --plugin name=Validate key=value. In a config file, each --plugin is an object in "plugins", e.g.:
{
"plugins": [
{
"alias": "ValidateHTML",
"rules": {"form-dup-name":"off"}
}
]
}
A selector says which elements of the page an option is about, e.g. #chat-widget or .cookie-banner button: see Selectors.
frequency
--plugin alias=ValidateHTML frequency=<level>
How often the plugin runs compared to the others.
rules
--plugin alias=ValidateHTML rules=<json>
html-validate rules to change for the site, as in html-validate's config: each rule's name, and "off", "warn", "error" or [severity, options], e.g. {"form-dup-name": "off"} for a site repeating a hidden field's name on purpose. They're applied over the defaults, html-validate:recommended without the rules on how markup is written (quotes, case, whitespace). The rules: https://html-validate.org/rules/
ignoreSelector
--plugin alias=ValidateHTML ignoreSelector=<selector>
Don't log HTML problems in elements matching this CSS selector, or inside them, e.g. a third-party widget the site can't fix (a chat, an embedded map). Problems of the whole document are still logged. The site can also mark the elements in its HTML with the attribute data-elsetest-validate-ignore.
Default instances
| Alias | The options it sets |
|---|---|
ValidateHTML | frequency=low |
Other plugins
Accessibility · Ai · BrokenText · Click · Cluster · History · Login · MutationCluster · Overlap · Scroll · SelectOption · Spelling · Type
This page is generated from the help texts of Elsetest 0.9.8. The same help is in the program: elsetest --help.