Created
August 31, 2016 21:47
-
-
Save marcysutton/c221a5b855bccbfd32bc7442738e3d49 to your computer and use it in GitHub Desktop.
Revisions
-
marcysutton renamed this gist
Aug 31, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
marcysutton created this gist
Aug 31, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ var jsdom = require('jsdom'); // Some html page var html = [ '<html>', '<body>', '<p>An image without an alt tag! <img src="some.jpg" /></p>', '<h2>Not an h1</h2>', '<h5>blabla</h5>', '<h4></h4>', '</body>', '</html>' ].join('\n'); jsdom.env(html, function(err, window) { global.window = window; global.Node = window.Node; global.NodeList = window.NodeList; var axe = require('./axe.js'); // var config = { // rules: { // 'color-contrast': {enabled: false} // } // } var config = {}; // Run the checks axe.a11yCheck(window.document, config, function(data) { console.log(data); }); });