Giter VIP home page Giter VIP logo

nemo-accessibility's Introduction

nemo-accessibility

nemo-accessibility is a nemo plugin aimed to run accessibility scans during nemo tests. nemo-accessibility plugin uses axe-core, htmlcode smiffer and chrome engines to run accessibility scans on a given page or on a given element on a page.

How to Use

  1. Install this package npm install nemo-accessibility --save-dev
  2. Add nemo-accessibility to your config/nemo-plugins.json file like below
 "nemo-accessibility":{
        "module":"nemo-accessibility",
      "arguments": [
                    {
                       "engine":"axe"
                       "engine":"chrome"
                       "engine":"htmlcs"
                    }
                  ]
    }
  1. Call Scan method let results= await nemo.accessibility.scan({'project': 'mynodewebproject', 'page': 'somepageName'})

Details

Once nemo-accessibility plugin is registered, you should now have nemo.accessibility namespace available in your tests. nemo.accessibility exposes a method called scan to help you run accessibility evaluation against your page/element.

scan method returns a promise with resulting json` response and you can then write the HTML to a file or parse JSON response for later reporting. For example,

   nemo.driver.get('http://www.paypal.com');
   nemo.accessibility.scan().then(function (result) {
     fs.writeFile('report/accessibility.json', result, function (err) {
         done();
     });
   });

See usingNemoAccessibility.js. You can run that on Debug mode like DEBUG=nemo* node node_modules/nemo-accessibility/example/usingNemoAccessibility.js

Support

Please file a Nemo a11y plugin issue for any nemo plugin related questions or file a issue for AATT for any AATT related questions

Copyright and License

Copyright 2019, PayPal under the BSD license.

Contributors

nemo-accessibility's People

Contributors

mpnkhan avatar nikulkarni avatar duaneobrien avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.