angular / protractor-accessibility-plugin

Runs a set of accessibility audits
MIT License
266 stars 37 forks source link

Disable rules for aXe #14

Closed angela-choo closed 7 years ago

angela-choo commented 7 years ago

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: https://github.com/dequelabs/axe-core/issues/267

sjelin commented 7 years ago

It appears that we're not passing on the information in the axe property to . Would you be interested in writing this feature yourself? I think you'd just want to change this part to:

  AxeBuilder(browser.driver)
    .options(context.axe.options)
    .analyze(function(results) {
      deferred.resolve(results);
    });
jamsea commented 7 years ago

@angela-choo and @sjelin I started working on this functionality here: https://github.com/nfl/protractor-accessibility-plugin/tree/feature/configAXE I've been pulled off this though and won't have time to get back to it until the new year. This might help you out

angela-choo commented 7 years ago

@jamsea Great, I will take a look at it!

@sjelin Sure, would be happy to work on this feature.

angela-choo commented 7 years ago

@sjelin added the feature and submitted PR here: angular/protractor-accessibility-plugin#15 I am wondering once the PR is approved, when will be the next release? Thanks!

sjelin commented 7 years ago

I can do a release whenever

sjelin commented 7 years ago

0.3.0 released! Thanks for the PR

rolandjitsu commented 7 years ago

Note that if you provide both:

axe: {
    runOnly: {},
    rules: {}
}

rules is ignored.