Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vnu-jar-master

validator15MIT18.4.8

Provides the Nu Html Checker «vnu.jar» file from the master branch

checker, html, jar, nu, validator, vnu, w3c

readme

The Nu Html Checker (v.Nu) Chat room Download latest

The Nu Html Checker (v.Nu) is the backend of checker.html5.org, html5.validator.nu, and validator.w3.org/nu. Its source code is available, as are instructions on how to build, test, and run the code. A Dockerfile (see the Pulling from Docker Hub section below) and npm, pip, and brew packages of it are also available, and it’s released upstream in these formats:

Note: The vnu.jar and vnu.war files require a Java 8 environment; they won’t run in Java 7 or older environment.

This fork publishes a new vnu-jar-master NPM module, which is built from the master branch. It is supposed to be newer, than vnu-jar and vnu-jar@dev, if you need to detect more problems in your HTML, than the released or development versions can today.

You can get the latest release or run docker run -p 8888:8888 validator/validator:latest, npm install vnu-jar-master, brew install vnu, or pip install html5validator and see the Usage and Web-based checking sections below. Or automate your document checking with a frontend such as:

Usage

Use the vnu.jar checker as an executable for command-line checking of documents by invoking it like this:

  java -jar ~/vnu.jar [--errors-only] [--Werror] [--exit-zero-always]
       [--asciiquotes] [--user-agent USER_AGENT] [--no-langdetect]
       [--no-stream] [--filterfile FILENAME] [--filterpattern PATTERN]
       [--css] [--skip-non-css] [--also-check-css] [--svg] [--skip-non-svg]
       [--also-check-svg] [--html] [--skip-non-html] [--format
       gnu|xml|json|text] [--help] [--verbose] [--version] FILES

Note: In these instructions, replace "~/vnu.jar" with the actual path to the file on your system.

To check one or more documents from the command line:

  java -jar ~/vnu.jar FILE.html FILE2.html FILE3.HTML FILE4.html...

Note: If you get a StackOverflowError error when using the vnu.jar file, try adjusting the thread stack size by providing the -Xss option to java:

  java -Xss512k -jar ~/vnu.jar FILE.html...

To check all documents in a particular directory as HTML:

  java -jar ~/vnu.jar some-directory-name/

To check all documents in a particular directory as HTML, but skip any documents whose names don’t end with the extensions .html, .htm, .xhtml, or .xht:

  java -jar ~/vnu.jar --skip-non-html some-directory-name/

To check all documents in a particular directory as CSS:

  java -jar ~/vnu.jar --force-css some-directory-name/

To check all documents in a particular directory as CSS, but skip any documents whose names don’t end with the extension .css:

  java -jar ~/vnu.jar --skip-non-css some-directory-name/

To check all documents in a particular directory, with documents whose names end in the extension .css being checked as CSS, and all other documents being checked as HTML:

  java -jar ~/vnu.jar --also-check-css some-directory-name/

To check all documents in a particular directory as SVG:

  java -jar ~/vnu.jar --force-svg some-directory-name/

To check all documents in a particular directory as SVG, but skip any documents whose names don’t end with the extension .svg:

  java -jar ~/vnu.jar --skip-non-svg some-directory-name/

To check all documents in a particular directory, with documents whose names end in the extension .svg being checked as SVG, and all other documents being checked as HTML:

  java -jar ~/vnu.jar --also-check-svg some-directory-name/

To check a Web document:

  java -jar ~/vnu.jar _URL_

  example: java -jar ~/vnu.jar http://example.com/foo

To check standard input:

  java -jar ~/vnu.jar -

  example: echo '<!doctype html><title>...' | java -jar ~/vnu.jar -

Options

When used from the command line as described in this section, the vnu.jar executable provides the following options:

--asciiquotes

Specifies whether ASCII quotation marks are substituted for Unicode smart
quotation marks in messages.

default: [unset; Unicode smart quotation marks are used in messages]

--errors-only

Specifies that only error-level messages and non-document-error messages are
reported (so that warnings and info messages are not reported).

default: [unset; all message reported, including warnings & info messages]

--Werror

Makes the checker exit non-zero if any warnings are encountered (even if
there are no errors).

default: [unset; checker exits zero if only warnings are encountered]

--exit-zero-always

Makes the checker exit zero even if errors are reported for any documents.

default: [unset; checker exits 1 if errors are reported for any documents]

--filterfile FILENAME

Specifies a filename. Each line of the file contains either a regular
expression or starts with "#" to indicate the line is a comment. Any error
message or warning message that matches a regular expression in the file is
filtered out (dropped/suppressed).

default: [unset; checker does no message filtering]

--filterpattern REGEXP

Specifies a regular expression. Any error message or warning message that
matches the regular expression is filtered out (dropped/suppressed).

As with all other vnu.jar options, this option may only be specified once.
So to filter multiple error messages or warning messages, you must provide a
single regular expression that will match all the messages. The typical way
to do that for regular expressions is to OR multiple patterns together using
the "|" character.

default: [unset; checker does no message filtering]

--format format

Specifies the output format for reporting the results.

default: "gnu"

possible values: "gnu", "xml", "json", "text" [see information at URL below]

https://github.com/validator/validator/wiki/Service-%C2%BB-Common-params#out

--help

Shows detailed usage information.

--skip-non-css

Check documents as CSS but skip documents that dont have *.css extensions.

default: [unset; all documents found are checked]

--css

Force all documents to be checked as CSS, regardless of extension.

default: [unset]

--skip-non-svg

Check documents as SVG but skip documents that dont have *.svg extensions.

default: [unset; all documents found are checked]

--svg

Force all documents to be checked as SVG, regardless of extension.

default: [unset]

--skip-non-html

Skip documents that dont have *.html, *.htm, *.xhtml, or *.xht extensions.

default: [unset; all documents found are checked, regardless of extension]

--html

Forces any *.xhtml or *.xht documents to be parsed using the HTML parser.

default: [unset; XML parser is used for *.xhtml and *.xht documents]

--also-check-css

Check CSS documents (in addition to checking HTML documents).

default: [unset; no documents are checked as CSS]

--also-check-svg

Check SVG documents (in addition to checking HTML documents).

default: [unset; no documents are checked as SVG]

--user-agent USERAGENT_

Specifies the value of the User-Agent request header to send when checking
HTTPS/HTTP URLs.

default: "Validator.nu/LV"

--no-langdetect

Disables language detection, so that documents are not checked for missing
or mislabeled html[lang] attributes.

default: [unset; language detection & html[lang] checking are performed]

--no-stream

Forces all documents to be be parsed in buffered mode instead of streaming
mode (causes some parse errors to be treated as non-fatal document errors
instead of as fatal document errors).

default: [unset; non-streamable parse errors cause fatal document errors]

--verbose

Specifies "verbose" output. (Currently this just means that the names of
files being checked are written to stdout.)

default: [unset; output is not verbose]

--version

Shows the vnu.jar version number.

Web-based checking with vnu.war or vnu.jar

The Nu Html Checkerーalong with being usable as a standalone command-line clientーcan be run as an HTTP service, similar to checker.html5.org, html5.validator.nu, and validator.w3.org/nu, for browser-based checking of HTML documents over the Web. To that end, the checker is released as two separate packages:

  • vnu.jar for deploying the checker as a simple self-contained service
  • vnu.war for deploying the checker to a servlet container such as Tomcat

Both deployments expose a REST API that enables checking of HTML documents from other clients, not just web browsers. And the vnu.jar package also includes a simple HTTP client that enables you to either send documents to a locally-running instance of the checker HTTP serviceーfor fast command-line checkingーor to any remote instance of the checker HTTP service running anywhere on the Web.

The latest releases of the vnu.jar and vnu.war packages are available from this fork of the validator project at github. The following are detailed instructions on using them.

Note: Replace "~/vnu.jar" or "~/vnu.war" below with the actual paths to those files on your system.

Standalone web server

To run the checker as a standalone service (using a built-in Jetty server), open a new terminal window and invoke vnu.jar like this:

    java -cp ~/vnu.jar nu.validator.servlet.Main 8888

Then open http://localhost:8888 in a browser. (To have the checker listen on a different port, replace 8888 with the port number.)

You’ll see a form similar to validator.w3.org/nu that allows you to enter the URL of an HTML document and have the results for that document displayed in the browser.

Note: If you get a StackOverflowError error when using the vnu.jar file, try adjusting the thread stack size by providing the -Xss option to java:

  java -Xss512k -cp ~/vnu.jar nu.validator.servlet.Main 8888

Deployment to servlet container

To run the checker inside of an existing servlet container such as Apache Tomcat you will need to deploy the vnu.war file to that server following its documentation. For example, on Apache Tomcat you could do this using the Manager application or simply by copying the file to the webapps directory (since that is the default appBase setting). Typically you would see a message similar to the following in the catalina.out log file.

May 7, 2014 4:42:04 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/vnu.war

Assuming your servlet container is configured to receive HTTP requests sent to localhost on port 80 and the context root of this application is vnu (often the default behavior is to use the WAR file's filename as the context root unless one is explicitly specified) you should be able to access the application by connecting to http://localhost/vnu/.

Note: You may want to customize the /WEB-INF/web.xml file inside the WAR file (you can use any ZIP-handling program) to modify the servlet filter configuration. For example, if you wanted to disable the inbound size limit-filter, you could comment out that filter like this:

<!--
  <filter>
      <filter-name>inbound-size-limit-filter</filter-name>
      <filter-class>nu.validator.servlet.InboundSizeLimitFilter</filter-class>
  </filter>
  <filter-mapping>
      <filter-name>inbound-size-limit-filter</filter-name>
      <url-pattern>/*</url-pattern>
  </filter-mapping>
-->

HTTP client (for fast command-line checking)

You can also use vnu.jar from the command line to either send documents to a locally-running instance of the checker HTTP serviceーfor fast command-line checkingーor to a remote instance anywhere on the Web.

To check documents locally, do this:

  1. Start up the checker as a local HTTP service, as described in the Standalone web server section.

  2. Open a new terminal window and invoke vnu.jar like this:

    java -cp ~/vnu.jar nu.validator.client.HttpClient FILE.html...

To send documents to an instance of the checker on the Web, such as html5.validator.nu/, use the nu.validator.client.host and nu.validator.client.port options, like this:

    java -cp ~/vnu.jar -Dnu.validator.client.port=80 \
     -Dnu.validator.client.host=html5.validator.nu \
     nu.validator.client.HttpClient FILE.html...

Other options are documented below.

HTTP client options

When using vnu.jar for sending documents to an instance of the checker HTTP service for checking, you can set Java system properties to control configuration options for the checker behavior.

For example, you can suppress warning-level messages and only show error-level ones by setting the value of the nu.validator.client.level system property to error, like this:

   java -Dnu.validator.client.level=error\
       -cp ~/vnu.jar nu.validator.client.HttpClient FILE.html...

Most of the properties listed below map to the validator.nu common input parameters documented at github.com/validator/validator/wiki/Service:-Common-parameters.

nu.validator.client.host

Specifies the hostname of the checker for the client to connect to.

default: "127.0.0.1"

nu.validator.client.port

Specifies the hostname of the checker for the client to connect to.

default: "8888"

example: java -Dnu.validator.client.port=8080 -jar ~/vnu.jar FILE.html

nu.validator.client.level

Specifies the severity level of messages to report; to suppress
warning-level messages, and only show error-level ones, set this property to
"error".

default: [unset]

possible values: "error"

example: java -Dnu.validator.client.level=error -jar ~/vnu.jar FILE.html

nu.validator.client.parser

Specifies which parser to use.

default: "html"; or, for *.xhtml input files, "xml"

possible values: [see information at URL below]

https://github.com/validator/validator/wiki/Service-%C2%BB-Common-params#parser

nu.validator.client.charset

Specifies the encoding of the input document.

default: [unset]

nu.validator.client.content-type

Specifies the content-type of the input document.

default: "text/html"; or, for *.xhtml files, "application/xhtml+xml"

nu.validator.client.out

Specifies the output format for messages.

default: "gnu"

possible values: [see information at URL below]

https://github.com/validator/validator/wiki/Service-%C2%BB-Common-params#out

nu.validator.client.asciiquotes

Specifies whether ASCII quotation marks are substituted for Unicode smart
quotation marks in messages.

default: "yes"

possible values: "yes" or "no"

HTTP servlet options

nu.validator.servlet.connection-timeout

Specifies the connection timeout.

default: 5000

possible values: number of milliseconds

example: -Dnu.validator.servlet.connection-timeout=5000

nu.validator.servlet.socket-timeout

Specifies the socket timeout.

default: 5000

possible values: number of milliseconds

example: -Dnu.validator.servlet.socket-timeout=5000

Pulling from Docker Hub

You can pull the checker from the https://hub.docker.com/r/validator/validator/ repo at Docker Hub.

To pull and run the latest version of the checker:

  docker run -it --rm -p 8888:8888 validator/validator:latest

To pull and run a specific Docker-Hub tag/version of the checker — for example, the 17.11.1 version:

  docker run -it --rm -p 8888:8888 validator/validator:17.11.1

To run the checker with a connection timeout and socket timeout different than the default 5 seconds, use the CONNECTION_TIMEOUT_SECONDS and SOCKET_TIMEOUT_SECONDS environment variables:

  docker run -it --rm \
     -e CONNECTION_TIMEOUT_SECONDS=15 \
     -e SOCKET_TIMEOUT_SECONDS=15 \
     -p 8888:8888 \
     validator/validator

To define a service named vnu for use with docker compose, create a Compose file named docker-compose.yml (for example), with contents such as the following:

  version: '2' services:
    vnu:
      image: validator/validator ports:
        - "8888:8888"
      network_mode: "host" #so "localhost" refers to the host machine.

Build instructions

Follow the steps below to build, test, and run the checker such that you can open http://localhost:8888/ in a Web browser to use the checker Web UI.

  1. Make sure you have git, python, and JDK 8 installed.

  2. Set the JAVA_HOME environment variable:

    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 <-- Ubuntu, etc.

    export JAVA_HOME=$(/usr/libexec/java_home) <-- MacOS

  3. Create a working directory:

    git clone https://github.com/validator/validator.git

  4. Change into your working directory:

    cd validator

  5. Start the build script:

    python ./build/build.py all

The first time you run the build script, you’ll need to be online and the build will need time to download several megabytes of dependencies.

The steps above will build, test, and run the checker such that you can open http://localhost:8888/ in a Web browser to use the checker Web UI.

Use python ./build/build.py --help to see command-line options for controlling the behavior of the script, as well as build-target names you can call separately; e.g.:

  • python ./build/build.py build (to build only)

  • python ./build/build.py build test (to build and test)

  • python ./build/build.py run (to run only)

  • python ./build/build.py jar (to compile vnu.jar)

changelog

With a few exceptions, this is a record of mainly just user-facing changes—that is, either changes to the actual behavior of the checker, or changes to any options/interfaces the checker exposes for developers.

18.3.0

24 March 2018

  • Add new major (optional) feature to command-line checker, Web-based checker, and network API to check CSS documents (in addition to HTML documents)
  • Add new major feature to check that style element contents and style attribute values in HTML documents are valid CSS
  • Add new (optional) feature to command-line checker to check SVG documents
  • Add new option to command-line checker for specifying User-Agent string
  • Add Dockerfile to Docker Hub https://hub.docker.com/r/validator/validator/
  • Add ability to Web-based checker to check SVG documents by file upload
  • Emit error (not warning) for HTML4/XHTML1 strict doctypes
  • Further restrict script[type] and style[type]
  • Allow the autocapitalize global attribute
  • Allow the slot attribute (for Shadow DOM interaction)
  • Allow the allowpaymentrequest attribute for the iframe element
  • Allow only one non-hidden main element per document
  • Allow only html, body, div, form, custom elements as main ancestor
  • Allow </caption> end tag to be omitted
  • Allow role=none where role=presentation is allowed
  • Allow role=rowgroup element to be contained in role=table element
  • Allow role=row element to be contained in role=table element
  • Allow more values for aria-haspopup per current ARIA spec
  • Allow more ARIA states & properties for role=menuitem
  • Allow CSP prefetch-src directive (updated to Salvation 2.4.0)
  • Disallow all character encodings other than UTF-8
  • Disallow script[charset]
  • Disallow nested interactive ARIA roles
  • Disallow the dropzone attribute
  • Disallow the menuitem element
  • Fix bug that caused the checker to incorrectly treat input[type] values case-sensitively when doing particular checks

17.11.1

07 October 2017

  • Fix bug that made the vnu.jar --Werror option not work as expected
  • Make vnu.jar exit 0 if all errors have been filtered out

17.11.0

06 October 2017

  • Allow DPUB roles on more elements (per ARIA in HTML spec updates)
  • Add --Werror option to the vnu.jar command-line checker. The option causes the checker to exit non-zero if any warnings are encountered (even if there are no errors).
  • Fix mismatch that caused message-filtering failures
  • Fix memory leak in language detector (patch from @tgyurci)
  • Stop reporting HTML4-specific parse errors for HTML4-doctype docs

17.9.0

20 August 2017

  • Allow script[nomodule]
  • Allow hover, any-hover, pointer, and any-pointer media features
  • Allow @scope, @updateviacache, @workertype for link[rel=serviceworker]
  • Allow &; (don’t report it as “& did not start a character reference”)
  • Add acceptlanguage query parameter, to specify an Accept-Language request-header value for checker to send when fetching remote documents
  • Update CSP checking to Salvation 2.3.0 https://github.com/shapesecurity/salvation/releases/tag/v2.3.0

17.7.0

26 June 2017

  • Add new major feature to filter out (drop/ignore/suppress) errors/warnings by regex. See https://github.com/validator/validator/wiki/Message-filtering
  • Replace a case of “Attribute "foo" not allowed on element "param" in this context” wording in error message with “Attribute "foo" not allowed on element "param" at this point” (for consistent working for that error between the command-line checker and the web-based checker).
  • Disallow the contextmenu attribute and type=contextmenu and type=toolbar for the menu element.
  • Allow link[rel=serviceworker]
  • Allow floating-point numbers in attribute values to start with decimal point
  • Allow a[href] in SVG wherever a[xlink:href] is allowed
  • Allow the focusable and tabindex attributes on SVG elements
  • Fix bug that disallowed progress & meter as label[for] targets
  • Default to text/html for checking file uploads
  • Emit warnings for use of rel={copyright,previous}
  • Prevent Bulgarian ➡ Russian misidentifications in language detector
  • Skip figcaption elements when running the language detector

17.3.0

26 March 2017

  • Allow color attribute with link[rel="mask-icon"]
  • Allow meta[name] to have itemref/itemscope/itemtype/itemid
  • Allow allow-top-navigation-by-user-activation in iframe[sandbox]
  • Stop hiding “sectioning roots” headings in “Heading-level outline”
  • Change error for role=none with img[alt=""] to warning
  • Fix from @xfq for longstanding bug in “Show source” behavior in Web UI
  • Fix from @xfq for controlling some runtime params for HTTP behavior
  • Fix from @zcorpan to drop unneeded warning for <menu type=toolbar>
  • Make “Corrupt GZIP trailer” a non-error
  • Add --asciiquotes option to vnu.jar command-line checker
  • Skip lang detection of elements w/ lang attributes not matching html[lang]
  • Drop Bulgarian lang detection, to prevent Russian misidentification
  • Update Estonian/Catalan lang profiles, to prevent Russian misidentification
  • Update ICU4J to 58.2

17.2.1

06 February 2017

  • Fix bug in language detector that when running the vnu.jar command-line checker on a list of documents caused it to sometimes misidentify the language of the 2nd, 3rd, 4th, etc., documents. The bug also caused the memory used by the checker to increase as the number of documents checked at the same time increased, and caused performance to degrade.
  • Allow aria-required attribute everywhere required attribute is allowed
  • Add --exit-zero-always option to vnu.jar command-line checker
  • Fix longstanding bug around code for identifying overlapping cells in table-integrity checker (the bug somewhat frequently gets hit when checking Wikipedia pages but otherwise in the wild gets hit only extremely rarely)

17.2.0

30 January 2017

  • Fix bug that broke vnu.jar command-line checking of URLs
  • Fix bug in rel="shortcut icon" checking
  • Add nu.client.EmbeddedValidator for use as library by other Java apps
  • Disallow tfoot before tbody

17.1.0

15 January 2017 This release adds the following changes to the vnu.jar command-line checker that had already been made available in the Web-based checker in the 17.0.1 release.

  • Allow custom elements (names containing “-”; e.g., <foo-bar>)
  • Allow anything in template element subtrees (exclude from checking)

17.0.1

08 January 2017

  • New language-detection feature; warns for missing/wrong html[lang]
  • New option --no-langdetect for vnu.jar disables language detection
  • Allow custom elements (names containing “-”; e.g., <foo-bar>)
  • Allow the is attribute (for custom elements)
  • Allow ARIA 1.1 roles/states/properties
  • Warn for viewport values that restrict resizing
  • Allow div in dl, to group dt+dd sets
  • Allow anything in template element subtrees (exclude from checking)
  • Allow link[rel=preload] in body
  • Disallow sizes attribute on non-icon link
  • Allow <link rel=apple-touch-icon sizes=…>
  • Allow comments before doctype (warning dropped)
  • Allow <video playsinline>
  • Allow <iframe allowusermedia>
  • Warn for sandbox="allow-scripts allow-same-origin"
  • New option to check error pages (404s and other non-200 responses)
  • Allow link[nonce]
  • Disallow input[datetime]
  • Disallow mediagroup attribute
  • Allow menu[type=popup], disallow menu[type=context]
  • Disallow non-http/https URLs in a[ping]
  • Allow referrerpolicy attribute
  • Warn for html[manifest] (obsolete)
  • Disallow keygen (obsolete)
  • Warn for about:legacy-compat in doctype
  • Align SVG+ARIA checking with ARIA requirements in current SVG spec
  • Allow h1-h6 & hgroup in legend
  • Ignore SSL errors when checking remote documents
  • Allow script[type=module] (supported in Edge but not in other UAs yet)
  • Disallow content in iframe (must be empty)
  • Make vnu.jar check .xhtml files using XML-specific RelaxNG grammar
  • Allow th[abbr]
  • Allow any value in SVG class attribute (not just XML-compatible names)
  • Disallow HTML4/XHTML1 Transitional doctype
  • Allow CSP require-sri-for directive (updated to Salvation 2.2.0)
  • Allow any element or text as content of SVG desc
  • Allow SVG vector-effect=non-scaling-stroke
  • Allow only text in rp
  • Disallow multiple meta[name=description]
  • Disallow URLs with port values greater than 65535
  • Disallow <input name=isindex>
  • Disallow empty autocomplete attribute

16.6.29

29 June 2016

  • JSON/gnu message formats updated to ensure doc URL is always included
  • <!--> (IE conditional comment end) is now (again) a non-error
  • <template> contents are now hidden from outline views

16.6.20

20 June 2016

  • fixes problem that made the release jars unusable with Scala sbt test
  • adds “Heading-level outline” in Web UI; shows simple h1-h6 hierarchy

16.6.18

18 June 2016

  • link[rel=stylesheet] in body now non-error (body-OK)
  • rel=dns-prefetch|preconnect|prefetch|preload|prerender non-error+body-OK
  • style[scoped] now error
  • iframe[seamless] now error
  • -- (consecutive hyphens) within a comment now non-error
  • new specific error for --!> at end of a comment
  • new specific error for <!-- within a comment
  • multiple meta[charset] now error
  • autocomplete checking now aligned with current spec
  • label[form] now error
  • a|area[rel=noopener] now non-error
  • allow-presentation/allow-orientation-lock in iframe[sandbox] non-error
  • label-less empty option now non-error if datalist child
  • section[role=navigation|complementary|banner] now non-error

16.3.3

3 March 2016

  • Made minlength a non-error for input[type=password]/input[type=text]
  • Made multiple values in integrity a non-error
  • Made <time> with element children an error if no datetime specified
  • Improved CSP checking (now using Salvation 2.0.1)
  • [WebUI] Dropped “Using the schema…”/“The Content-Type was…” Info msgs
  • [WebUI] Added some autofocus of URL field and Message Filtering button
  • [WebUI] Footer now tells whether document was served w/ charset param
  • [WebUI] Fixed bug/regression in Image Report image display
  • [build] Fixed bug caused by Rhino team building their jar with Java6
  • [build] Fixed some problems with running build script on Windows
  • [build] Made build script work with Python 3 (not just Python 2)

16.1.1

1 January 2016

  • Java8 is now required to run the checker (and to build it).
  • Made the <meta http-equiv=content-security-policy content="..."> element a non-error & added syntax checking of its content attribute and checking of the value of the Content-Security-Policy HTTP header.
  • Made the Content Security Policy nonce attribute a non-error.
  • Aligned on* event-handler-attribute checking with spec.
  • Aligned iframe[sandbox] checking with spec.
  • Made minlength attribute a non-error.
  • Dropped “heading needed” warning for cases where aria-label found.
  • Made unescaped ampersand a non-error in, e.g. href="foo?bar=1&baz=2".
  • Added error for img[alt=""] w/ role != presentation.
  • Made role=switch a non-error.
  • Made role=group for header & footer a non-error.
  • Made role=search for form a non-error.
  • Made the Subresource Integrity integrity attribute a non-error and added syntax checking for it.
  • Refined bad-URL error message to indicate which character is invalid.
  • Refined Web UI "Message Filtering" to show total error/warning counts
  • Refined Web UI to show green if there are 0 errors or warnings to show
  • Fixed "input[type=hidden] label descendants" bug (@takenspc patch)
  • Refined Web UI to remove background colors and increase font size
  • Made a variety of refinements and fixes to ARIA role checking.
  • Made ol>li[role=menuitem] & ol>li[role=tab] non-errors.
  • Added warnings for use of ARIA roles with implicit-semantics elements.
  • Made nesting of time elements a non-error.
  • Made checker ignore input[type=hidden] label descendants in checks.
  • Improved errors for obsolete media types/features.
  • Fixed bug in checking of the content model for the ruby element.

15.6.29

29 June 2015

  • Added error messages for deprecated CSS media types/features.
  • Changed checking of the accept attribute for input[type=file] to allow file extensions in the value (per spec).
  • Added error for documents that have multiple autofocus attributes.
  • Made the <rb> and <rtc> elements non-errors.
  • Made use of data-* attributes for SVG & MathML elements non-errors.
  • Made use of HTML content in the SVG <desc>, <title>, and <metadata> elements a non-error (per spec).
  • Changed error message for the inputmode attribute to a warning.
  • Fixed a bug that caused spurious error to be emitted for ID references in aria-controls and aria-labelledby with trailing whitespace.
  • Fixed a bug that prevented the command-line checker from being able to check URLs when run in a Windows environment. (patch from @mariusj)
  • Added option to disable log4j when using Java API. (patch from @abrin)

15.4.12

12 April 2015

  • Fixed regression that caused spurious errors for input[type=email].
  • Fixed regression in war caused by missing jar needed for gzip handling.

15.3.28

28 March 2015

  • Renamed from “Nu HTML Checker” to “Nu Html Checker”.
  • Improved error messages for input[type] attribute mismatches.
  • Added support for checking object[typemustmatch] per-spec.
  • Added error message for title element that only has whitespace.
  • Dropped all meta[name] checking. Any arbitrary meta[name] value is now accepted unchecked.
  • Made a couple select/option error messages more precise.
  • Added useragent parameter, for allowing you to specify any arbitrary user-agent string for the checker to use when fetching remote documents.
  • Added option to limit maximum number of errors shown. Exposed thru nu.validator.messages.limit Java system prop & --messages-limit option for the build script. Controls limit on maximum number of messages the checker service will report for a single document before stopping with a “Too many messages” fatal error.
  • Make the API/CLI (command-line interface) emit source extracts & “hilite” info. When you set the --format option to json, xml, xhtml, or html (but not gnu or text), the output now includes:
    • an extract from the doc source (extract field in JSON output)
    • which extract part to hilight (JSON hiliteLength & hiliteStart)
    • error range starting line/column (JSON firstColumn & firstLine)
  • Added full support for checking documents at SNI origins.
  • Fixed regression that caused CLI/API to parse .xhtml docs as text/html instead of using the XML parser.
  • Changed backend handling for the case when the “promiscuous-ssl” option is on (that is, when you’re requesting the doc-fetching backend ignore any SSL/TLS cert errors). This should be a transparent change.
  • Now available from (Maven) Central Repository (nu.validator.validator).
  • Made a number of look&feel refinements to the Web frontend.
  • Replaced all Jena IRI code dependencies with dependency on galimatias.
  • Updated doc-fetching backend to Apache HTTP Components HttpClient 4.4.
  • Upgraded to Jetty 9.2.9 & upgraded many other build/run dependencies to latest versions; e.g., log4j 1.2.17, Apache Commons Codec 1.10.
  • Dropped some dependencies that aren’t actually needed.
  • Changed build to cut dependency download size from ~300MB down to ~16MB.
  • Made change to force java to always use Saxon instead of Xalan.
  • Renamed all org.whattf classes to nu.validator.
  • Did large reorganization/consolidation of sources.
  • Added --javaversion option, to generate class files targeted for particular VM versions (compiles for Java6/1.6 by default).

16 February 2015

  • added new "sizes attr required when srcset specifies width" check
  • added --skip-non-html option to CLI; http://goo.gl/sKjRD5 This change alters the default CLI handling of non-HTML files. Before the CLI by default skipped any files without .html, .htm, .xhtml, or .xht extensions; instead now by default all files found are checked, regardless of extension. The --skip-non-html option provides the old default behavior: it make the checker skip any files without .html, .htm, .xhtml, or .xht extensions.
  • added --javaversion option to build script and changed default build behavior to now generate vnu.jar/vnu.war builds that can run in Java6 VMs (as well as in any newer VMs). To generate a vnu.jar/vnu.war build with a newer/different VM target, use, e.g., --javaversion=1.8.
  • added --stacksize option to build script & removed harcoded stack size
  • fixed several bugs in sizes checking
  • fixed position reporting of bad character refs in title & textarea
  • fixed ARIA checking to allow li[role=separator] & time[role=timer]
  • refined content-type check to treat .csl uploads as application/xml
  • refined "unexpected content-type" error msg to include URL of document
  • refined a few things in TestRunner
  • updated Rhino dependency to rhino1_7R5

07 February 2015

  • made SVG <style> not require the type attribute
  • added initial (liberal) support for ARIA in SVG
  • dropped error for X-UA-Compatible: IE=Edge HTTP header. Thx @zcorpan
  • dropped error for meta[http-equiv=X-UA-Compatible][content=IE=Edge]
  • added version info to jar manifest file
  • made nu.validator.client.TestRunner exit non-zero for test failures
  • made build script explicitly request Python2. Thx @kurosawa-takeshi
  • code cleanup to build script and some Java sources. Thx @cvrebert

06 October 2014

01 September 2014

25 August 2014

  • added support for the <picture> element
  • improved ARIA support for various table elements
  • made refinements to outline handling
  • added experimental warnings for some heading/outline issues
  • improved checking for meta@name and link@rel values
  • CLI now exits with 1 if any errors are found
  • CLI no longer says XHTML element in error messages
  • switched to galimatias for URL checking
  • updated to latest ICU4J
  • release now includes WAR file

02 February 2014

  • initial vnu.jar release