UNPKG

axe-core

Version:

Accessibility engine for automated Web UI testing

34 lines (30 loc) 1.02 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Example Mocha Test</title> <link rel="stylesheet" href="../node_modules/mocha/mocha.css" type="text/css" charset="utf-8" /> </head> <body> <!-- Required for browser reporter --> <div id="mocha"></div> <script src="../node_modules/mocha/mocha.js" type="text/javascript" charset="utf-8"></script> <script src="../node_modules/chai/chai.js" type="text/javascript" charset="utf-8"></script> <script src="../node_modules/axe-core/axe.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> mocha.setup('bdd'); var expect = chai.expect; </script> <!-- Include aXe --> <!-- Spec files --> <script src="a11y.js" type="text/javascript" charset="utf-8"></script> <div id="working"> <label for="labelfld">Label for this text field.</label> <input type="text" id="labelfld"> </div> <div id="broken"> <p>Label for this text field.</p> <input type="text" id="nolabelfld"> </div> </body> </html>