Register |  Login

WAVE Testing Engine Documentation

Usage Instructions

Embed the WAVE engine script (typically api.min.js) within the web page (or parent web page) to be tested. The script must be processed within a web page in a rendered browser context/DOM - headless browser contexts, such as Selenium, Chrome Driver, or Puppeteer are supported. Selenium Web Driver files (JavaScript) and Puppeteer scripts are available.

Define testing scope

You can scope the evaluation to a particular page element by setting wave.page, for example:
wave.page = document.getElementById("idOfElementToBeTested");

This can allow analysis of a distinct page element. If wave.page is not set, the entire page document will be evaluated. If wave.page is set to anything other than the document, WAVE will return errors for things like missing page title, etc. because these don't exist for a non-document element.

Initiate testing engine

Initiate the evaluation with:
wave.init();
This function can be called via the browser Console in DevTools or via a separate script.

If you have a need for the CSS selector values for elements in the results, then use:
wave.init(4);

The numeric value passed with wave.init() aligns with the reporttype values as explained in the API documentation.

Parse WAVE results

A wave.results object is created with all of the WAVE data for you to handle.

Reset WAVE Engine

If you want to test the same page or page element again (without reloading the page/script), then reset everything before re-initiating the engine with:
wave.engine.fn.resetEngine();

The WAVE testing process will add data-waveid attributes to most page elements. If desired, these can be removed by calling:
wave.fn.removeWaveIds();

Terms of Use

By licensing or testing the WAVE Accessibility Tool stand-alone online web service, API, and/or related systems (hereafter referred to as WAVE), you acknowledge that you have read, understood, and agree to be bound by the WAVE Terms of Use for your license or trial software.