Code Monkey home page Code Monkey logo

protractor-accessibility-plugin's Introduction

Accessibility Plugin

Protractor comes with support for three accessibility testing options:

  • Accessibility Developer Tools
  • aXe Accessibility Engine
  • Tenon.io

Protractor will run each set of audits (depending on your configuration) on your existing end-to-end tests to ensure your site is free of obvious errors. In this kind of testing, there is no concept of "warnings"–only pass or fail. In your configuration, you can decide whether warnings should pass or fail your build.

To understand how each of these tools can be used, see this support matrix:

Testing Library Pricing API Key External Request No. of Tests Info
Chrome Accessibility Developer Tools Free No No 14 GitHub
aXe Accessibility Engine Free No No 53 GitHub
Tenon.io Free limited accounts, paid subscriptions Yes Yes 63 Tenon.io

Protractor now supports the Accessibility Developer Tools, the same audit library used by the Chrome browser extension. Protractor runs an audit locally by injecting the Dev Tools script into WebDriver pages, and it can diagnose issues including missing labels, incorrect ARIA attributes and color contrast. This is a great starting point if you can't send source code over the wire through an API.

aXe operates similarly to Chrome's Accessibility Developer Tools by injecting axe-core into all frames and checking the content against 53 accessibility rules.

Tenon.io has a more robust set of tests to help you find accessibility issues, but it requires registering for an API key and making an external request for each test, which may not work for everyone. Some people use Tenon with introspection services like ngrok or localtunnel to securely test local web servers. Protractor takes the options you provide in the plugin configuration and sends them with the page source to the Tenon API. One limitation of this approach is that all scripts must be reachable from the page source as a string, for example, by using a CDN. For projects with an MIT license, Tenon is free but with a limited daily API limit. Paid subscriptions are available for enterprise and commercial projects.

Enable this plugin in your config file:

  // Chrome Accessibility Dev Tools only:
  exports.config = {
      ...
      plugins: [{
        chromeA11YDevTools: {
          treatWarningsAsFailures: true,
          auditConfiguration: {
            auditRulesToRun: [
              'audioWithoutControls',
              'badAriaAttributeValue',
              'badAriaRole',
              'controlsWithoutLabel',
              'elementsWithMeaningfulBackgroundImage',
              'focusableElementNotVisibleAndNotAriaHidden',
              'imagesWithoutAltText',
              'linkWithUnclearPurpose',
              'lowContrastElements',
              'mainRoleOnInappropriateElement',
              'nonExistentAriaLabelledbyElement',
              'pageWithoutTitle',
              'requiredAriaAttributeMissing',
              'unfocusableElementsWithOnClick',
              'videoWithoutCaptions'
            ],
            auditRulesToSkip: []
          }
        },
        package: 'protractor-accessibility-plugin'
      }]
    }
  // aXe only:
  exports.config = {
      ...
      plugins: [{
        axe: true,
        package: 'protractor-accessibility-plugin'
      }]
    }
  // Tenon.io only:
  exports.config = {
      ...
      plugins: [{
        tenonIO: {
          options: {
            // See http://tenon.io/documentation/understanding-request-parameters.php
            // options.src will be added by the test.
          },
          printAll: false, // whether the plugin should log API response
        },
        chromeA11YDevTools: true,
        package: 'protractor-accessibility-plugin'
      }]
    }

protractor-accessibility-plugin's People

Contributors

angela-choo avatar contolini avatar evilaliv3 avatar sjelin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protractor-accessibility-plugin's Issues

Update axe-webdriverjs to 0.5.0

@sjelin could you upgrade protractor-accessibility-plugin to use axe-webdriverjs?

axe-webdriverjs 0.2.0 is still coupled to selenium-webdriver@^2.46.1 and this makes it incompatible with protractor 3.0.0 that is embedding selenium 3.0.1.

\cc @juliemr

Protractor & Tenon configuration steps

Hi all, i need help!!
Do you have any example with the Tenon configuration? what are the parameters i need to setup?
I have added the plugin as it is in the documentation but what else?

  exports.config = {
      ...
      plugins: [{
        tenonIO: {
          options: {
            // See http://tenon.io/documentation/understanding-request-parameters.php
            // options.src will be added by the test.
          },
          printAll: false, // whether the plugin should log API response
        },
        chromeA11YDevTools: true,
        package: 'protractor-accessibility-plugin'
      }]
    }

Thanks

Protractor suites and Accessibility-pluging

Is it possible to run protractor suites with the accessibility-pluging to get A11y vulnerabilities for each suite?

protractor protractor.conf.js --suite homepage

plugins: [
  {
    chromeA11YDevTools: {
      treatWarningsAsFailures: true
    },
    package: 'protractor-accessibility-plugin'
  }
],

I am receiving the following issue:

C:\MySolution_Git\>protractor config/protractor.config.js --suite dataPrivacy
[launcher] Process exited with error code 1
C:\Program Files\nodejs\node_modules\protractor\node_modules\q\q.js:126
                    throw e;
                    ^

Error: Cannot find module 'protractor-accessibility-plugin'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at C:\Program Files\nodejs\node_modules\protractor\lib\plugins.js:36:19
    at Array.forEach (native)
    at new Plugins (C:\Program Files\nodejs\node_modules\protractor\lib\plugins.js:25:20)
    at Runner.run (C:\Program Files\nodejs\node_modules\protractor\lib\runner.js:250:17)
    at TaskRunner.run (C:\Program Files\nodejs\node_modules\protractor\lib\taskRunner.js:123:19)
    at createNextTaskRunner (C:\Program Files\nodejs\node_modules\protractor\lib\launcher.js:223:20)

But, If I gun a gulp task executing all my specs it runs BUT the Accessibility results are over the latest page:

gulp.task('test:e2e', function(cb) {
    gulp.src(['/test/javascript/e2e/*.spec.js']).pipe(protractor({
        configFile: __dirname + '/config/protractor.config.js',
        //args: ['--baseUrl', 'http://localhost:3383/'],
        debug: false
    })).on('error', function(e) {
        console.log(e);
    }).on('end', cb);
});

Getting Protractor to correctly interpret Pass/Fail results from the protractor-accessibility-plugin

As far as I can tell, the pass/fail status of Chrome-A11Y assertions are sent to STDOUT by the protractor-accessibility-plugin, separate from Protractor spec assertions themselves.

In other words, if the Protractor specs that precede the Chrome-A11Y assertions succeed, the overall test result will always be positive, regardless of whether the Chrome-A11Y specs generated failure messages.

Does this make sense? I was trying to use the protractor-console-plugin to manage the Chrome-A11Y results, but I don't think that is possible, since those results are essentially a separate entity from the Protractor specs themselves.

I'm a Protractor noob, so please forgive if this is a dumb question!

some rules issues we found

Hi people,

We are using the plugin and found some rule issues...

We are using:

Our config file is:

chromeA11YDevTools: { treatWarningsAsFailures: true, auditConfiguration: { auditRulesToRun: [ 'ariaOnReservedElement', 'ariaOwnsDescendant', 'ariaRoleNotScoped', 'audioWithoutControls', 'badAriaAttribute', 'badAriaAttributeValue', 'badAriaRole', 'controlsWithoutLabel', 'duplicateId', 'focusableElementNotVisibleAndNotAriaHidden', 'humanLangMissing', 'imagesWithoutAltText', 'linkWithUnclearPurpose', 'mainRoleOnInappropriateElement', 'elementsWithMeaningfulBackgroundImage', 'multipleAriaOwners', 'multipleLabelableElementsPerLabel', 'nonExistentRelatedElement', // 'nonExistentAriaLabelledbyElement', -> is on the docs, but does not exist 'pageWithoutTitle', 'requiredAriaAttributeMissing', 'requiredOwnedAriaRoleMissing', 'roleTooltipRequiresDescribedby', 'tabIndexGreaterThanZero', 'tableHasAppropriateHeaders', 'uncontrolledTabpanel', 'unfocusableElementsWithOnClick', 'unsupportedAriaAttribute', 'videoWithoutCaptions' ], auditRulesToIgnore: [] } }, package: 'protractor-accessibility-plugin'

some plugins is not working...

// 'nonExistentAriaLabelledbyElement', -> is on the docs, but does not exist

auditRulesToIgnore - on docs this property is pointed as auditRulesToSkip

The error log when we add the nonExistentAriaLabelledbyElement rule :

[16:07:52] I/plugins - Fail: protractor-accessibility-plugin Plugin Tests [16:07:52] E/plugins - Failure during teardown: unknown error: Cannot read property 'canRun' of null (Session info: chrome=55.0.2883.87) (Driver info: chromedriver=2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30),platform=Windows NT 10.0.14393 x86_64) [16:07:52] E/plugins - WebDriverError: unknown error: Cannot read property 'canRun' of null (Session info: chrome=55.0.2883.87) (Driver info: chromedriver=2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30),platform=Windows NT 10.0.14393 x86_64) at Object.checkLegacyResponse (C:\projects\transempregos\node_modules\selenium-webdriver\lib\error.js:639:15) at parseHttpResponse (C:\projects\transempregos\node_modules\selenium-webdriver\http\index.js:538:13) at client_.send.then.response (C:\projects\transempregos\node_modules\selenium-webdriver\http\index.js:472:11) at ManagedPromise.invokeCallback_ (C:\projects\transempregos\node_modules\selenium-webdriver\lib\promise.js:1379:14) at TaskQueue.execute_ (C:\projects\transempregos\node_modules\selenium-webdriver\lib\promise.js:2913:14) at TaskQueue.executeNext_ (C:\projects\transempregos\node_modules\selenium-webdriver\lib\promise.js:2896:21) at asyncRun (C:\projects\transempregos\node_modules\selenium-webdriver\lib\promise.js:2820:25) at C:\projects\transempregos\node_modules\selenium-webdriver\lib\promise.js:639:7 at process._tickCallback (internal/process/next_tick.js:103:7) From: Task: a11y developer tool rules at Driver.schedule (C:\projects\transempregos\node_modules\selenium-webdriver\lib\webdriver.js:377:17) at ProtractorBrowser.executeScriptWithDescription (C:\projects\transempregos\node_modules\protractor\built\browser.js:210:28) at runChromeDevTools (C:\projects\transempregos\node_modules\protractor-accessibility-plugin\index.js:172:18) at Object.teardown (C:\projects\transempregos\node_modules\protractor-accessibility-plugin\index.js:66:17) at resolver (C:\projects\transempregos\node_modules\protractor\built\plugins.js:197:49) at Function.promise (C:\projects\transempregos\node_modules\q\q.js:682:9) at Plugins.safeCallPluginFun (C:\projects\transempregos\node_modules\protractor\built\plugins.js:209:49) at C:\projects\transempregos\node_modules\protractor\built\plugins.js:221:30 at Array.map (native) at Plugins.teardown (C:\projects\transempregos\node_modules\protractor\built\plugins.js:220:18) [16:07:52] I/launcher - 0 instance(s) of WebDriver still running [16:07:52] I/launcher - chrome #01 failed 1 test(s) [16:07:52] I/launcher - overall: 1 failed spec(s) [16:07:52] E/launcher - Process exited with error code 1 [16:07:52] { [Error: protractor exited with code 1] message: 'protractor exited with code 1', showStack: false, showProperties: true, plugin: 'gulp-protractor', __safety: { toString: [Function: bound ] } } [16:07:52] 'test:acceptance' errored after 6.25 s [16:07:52] Error in plugin 'gulp-protractor'

Tests fail with "Angular could not be found on the page" error

Hi,

I downloaded master, did npm install and then npm test, but the tests fail with the error below. The webdriver server is up and running and it does load the page and produce the axe results afterwards, but the test still fails.

Any thoughts on what i'm doing wrong?

Thanks!

Failures:
1) check if accessibility plugin works on bad apps should have accessibility problems on markup
  Message:
    Failed: Angular could not be found on the page http://localhost:8081/badMarkup.html. If this is not an Angular application, you may need to turn off waiting for Angular. Please see https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular-on-page-load
  Stack:
    Error: Angular could not be found on the page http://localhost:8081/badMarkup.html. If this is not an Angular application, you may need to turn off waiting for Angular. Please see https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular-on-page-load
        at /Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/node_modules/protractor/built/browser.js:506:23
        at ManagedPromise.invokeCallback_ (/Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/node_modules/selenium-webdriver/lib/promise.js:1379:14)
        at TaskQueue.execute_ (/Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/node_modules/selenium-webdriver/lib/promise.js:2913:14)
        at TaskQueue.executeNext_ (/Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/node_modules/selenium-webdriver/lib/promise.js:2896:21)
        at asyncRun (/Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/node_modules/selenium-webdriver/lib/promise.js:2775:27)
        at /Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/node_modules/selenium-webdriver/lib/promise.js:639:7
        at process._tickCallback (internal/process/next_tick.js:103:7)
    From: Task: Run it("should have accessibility problems on markup") in control flow
        at Object.<anonymous> (/Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/node_modules/jasminewd2/index.js:79:14)
    From asynchronous test: 
    Error
        at Suite.<anonymous> (/Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/spec/fail_spec.js:2:3)
        at Object.<anonymous> (/Users/sms/Development/vagrant/repositories/components/protractor-accessibility-plugin/spec/fail_spec.js:1:1)
        at Module._compile (module.js:571:32)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:488:32)
        at tryModuleLoad (module.js:447:12)

1 spec, 1 failure
Finished in 10.381 seconds

aXe audits for end-to-end tests

I'm running through my end-to-end tests and noticed that aXe is only running the audit at the end of the end-to-end test. Correct me if I'm wrong, audits should be done all the time and not just at the end. Has anyone encountered this problem?

aXe operates similarly to Chrome's Accessibility Developer Tools by injecting axe-core into all frames and checking the content against 53 accessibility rules.

Thank you.

Running on a per test basis

Hey, does anyone know of a way to make these fail only for particular tests? As it, the plugin is enabled by the protractor conf file, but I want to make it the plugin only fails for particular suites.

Incompatibility with protractor 4.0.10

While working on GlobaLeaks i just found that the current release of protractor-accessibility-plugin is no more compatible with protractor 4.0.10

[17:14:23] I/direct - Using ChromeDriver directly...
[17:14:23] I/launcher - Running 1 instances of WebDriver
Started
.


1 spec, 0 failures
Finished in 1.128 seconds

[17:14:26] I/plugins -       Fail:  protractor-accessibility-plugin Plugin Tests 
[17:14:26] E/plugins -      Failure during teardown: browser.executeScript_ is not a function
[17:14:26] E/plugins -      TypeError: browser.executeScript_ is not a function
            at runChromeDevTools (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/protractor-accessibility-plugin/index.js:167:18)
            at Object.teardown (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/protractor-accessibility-plugin/index.js:61:17)
            at Plugins.safeCallPluginFun (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/protractor/built/plugins.js:208:45)
            at /home/evilaliv3/Devel/GlobaLeaks/client/node_modules/protractor/built/plugins.js:246:36
            at Array.forEach (native)
            at Plugins.teardown (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/protractor/built/plugins.js:244:25)
            at /home/evilaliv3/Devel/GlobaLeaks/client/node_modules/protractor/built/runner.js:359:28
            at _fulfilled (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/q/q.js:834:54)
            at self.promiseDispatch.done (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/q/q.js:863:30)
            at Promise.promise.promiseDispatch (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/q/q.js:796:13)
            at /home/evilaliv3/Devel/GlobaLeaks/client/node_modules/q/q.js:556:49
            at runSingle (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/q/q.js:137:13)
            at flush (/home/evilaliv3/Devel/GlobaLeaks/client/node_modules/q/q.js:125:13)
            at _combinedTickCallback (internal/process/next_tick.js:67:7)
            at process._tickCallback (internal/process/next_tick.js:98:9)

\cc @juliemr @sjelin @cnishina

getOuterHtml() has been deprecated, and that issue was fixed in this repo, but the change was not published to NPM.

I'm running some protractor e2e tests, and I'm getting errors like:
[16:43:19] E/plugins - TypeError: elem.getOuterHtml is not a function

This is caused because the module still uses thee deprecated getOuterHtml() method.
This issue was fixed in this repo, getOuterHtml was removed and replaced correctly by getAttribute("outerHTML"), but this change was not published. The latest version is 0.3.0, dated 2 years ago.

elem.getAttribute('outerHTML').then(function(text) {

It would be from great help if you publish the latest code. Thanks a lot in advance.

Chrome a11y dev tools fail with auditRulesToRun configuration

I originally thought this was related to #26, but I found the same issue here #12 (comment) . I think I've narrowed down the root cause but I'm not sure what the fix is. This bug only happens on the master branch with the latest version of protractor.

If I run the plugin with this configuration:

            auditConfiguration: {
                auditRulesToRun: [
                    "audioWithoutControls",
                    "badAriaAttributeValue",
                    "badAriaRole",
                    "imagesWithoutAltText",
                    "linkWithUnclearPurpose",
                    "mainRoleOnInappropriateElement",
                    "nonExistentAriaLabelledbyElement",
                    "pageWithoutTitle",
                    "requiredAriaAttributeMissing",
                    "unfocusableElementsWithOnClick",
                    "videoWithoutCaptions"
                ],
                auditRulesToSkip: [
                    "controlsWithoutLabel",
                    "lowContrastElements",
                    "elementsWithMeaningfulBackgroundImage",
                    "focusableElementNotVisibleAndNotAriaHidden"
                ],
                showUnsupportedRulesWarning: false,
                // Ignore controls without label on react-select boxes
                // Ignore <video>
                rules_: {
                    controlsWithoutLabel: {
                        "ignore": [".Select-control", ".form-control", "video"]
                    }
                }
            }

I get the following error:

[16:01:49] I/plugins -  	 Fail:  protractor-accessibility-plugin Plugin Tests
[16:01:49] E/plugins - 		Failure during teardown: unknown error: Cannot read property 'collectIdRefs' of null
  (Session info: chrome=56.0.2924.87)
  (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Mac OS X 10.11.6 x86_64)
[16:01:49] E/plugins - 		WebDriverError: unknown error: Cannot read property 'collectIdRefs' of null
		  (Session info: chrome=56.0.2924.87)
		  (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Mac OS X 10.11.6 x86_64)
		    at WebDriverError (/Users/james.hush/git/web-webpack/node_modules/selenium-webdriver/lib/error.js:27:5)
		    at Object.checkLegacyResponse (/Users/james.hush/git/web-webpack/node_modules/selenium-webdriver/lib/error.js:505:15)
		    at parseHttpResponse (/Users/james.hush/git/web-webpack/node_modules/selenium-webdriver/lib/http.js:509:13)
		    at doSend.then.response (/Users/james.hush/git/web-webpack/node_modules/selenium-webdriver/lib/http.js:440:13)
		    at process._tickCallback (internal/process/next_tick.js:103:7)
		From: Task: a11y developer tool rules
		    at Driver.schedule (/Users/james.hush/git/web-webpack/node_modules/selenium-webdriver/lib/webdriver.js:816:17)
		    at ProtractorBrowser.executeScriptWithDescription (/Users/james.hush/git/web-webpack/node_modules/protractor/lib/browser.ts:583:24)
		    at runChromeDevTools (/Users/james.hush/git/web-webpack/node_modules/protractor-accessibility-plugin/index.js:172:18)
		    at Object.teardown (/Users/james.hush/git/web-webpack/node_modules/protractor-accessibility-plugin/index.js:66:17)
		    at resolver (/Users/james.hush/git/web-webpack/node_modules/protractor/lib/plugins.ts:460:52)
		    at Function.promise (/Users/james.hush/git/web-webpack/node_modules/q/q.js:682:9)
		    at Plugins.safeCallPluginFun (/Users/james.hush/git/web-webpack/node_modules/protractor/lib/plugins.ts:471:16)
		    at promises.pluginObjs.filter.map.pluginObj (/Users/james.hush/git/web-webpack/node_modules/protractor/lib/plugins.ts:499:28)
		    at Array.map (native)
		    at Plugins.teardown (/Users/james.hush/git/web-webpack/node_modules/protractor/lib/plugins.ts:497:16)
[16:01:49] I/launcher - 0 instance(s) of WebDriver still running
[16:01:49] I/launcher - chrome #01 failed 1 test(s)
[16:01:49] I/launcher - overall: 1 failed spec(s)
[16:01:49] E/launcher - Process exited with error code 1

However, if I remove the auditRulesToRun rule:

            auditConfiguration: {
                auditRulesToSkip: [
                    "controlsWithoutLabel",
                    "lowContrastElements",
                    "elementsWithMeaningfulBackgroundImage",
                    "focusableElementNotVisibleAndNotAriaHidden"
                ],
                showUnsupportedRulesWarning: false,
                // Ignore controls without label on react-select boxes
                // Ignore <video>
                rules_: {
                    controlsWithoutLabel: {
                        "ignore": [".Select-control", ".form-control", "video"]
                    }
                }
            }

Everything works fine. I'm guessing it might have something to do with this change https://github.com/angular/protractor-accessibility-plugin/pull/13/files#diff-168726dbe96b3ce427e7fedce31bb0bcR167. My guess is protractor might execute scripts a bit differently now.

Using the same configuration in jsfiddle works completely fine https://jsfiddle.net/jamsea/ejv52v5r/1/ it's only in the plugin where I'm having the issue. For now the "fix" (which might help @FJLopezGarcia) is to remove auditRulesToRun and only use auditRulesToSkip. If master gets published to npm as is there should be a major version bump because of the breaking changes.

exclude does not work for axe

Hello guys. I am using protractor-accessibility-plugin and I want to exclude from testing the application's header (I know class, id etc), however, my "exclude" in configuration does not work. At the same time, runOnly restriction works from my config. What am I doing wrong?
plugins: [{
axe: {
exclude: [
['#divTopbar']
],
...

Disable rules for aXe

I'm trying to disable rules inside protractor.conf.js for aXe but does not seem to work. Please see my code below. Thank you!

plugins: [{
        axe: ({
            rules:{
                "aria-required-children": { "enabled": false },
                "color-contrast": { "enabled": false }
            }
        }),
        package: 'protractor-accessibility-plugin'
    }],

Also raised question here: dequelabs/axe-core#267

"Anonymous AMD module used" error.

HI! So I'm currently running accessibility audits on non-angular and angular webpages, but I'm noticing a commonly occurring error. On angular pages, I get the same error message and the test terminates; Failure during teardown: unknown error: Anonymous AMD module used, but it was not included as a dependency. This is most often caused by an anonymous define() from a script tag.

Has anyone else come across this error? It keeps me from getting alot done so I'd love some insight if anyone has any. Thanks a bunch!

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.