Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the undocumented tagExclude option #620

Open
dylanb opened this issue Nov 16, 2017 · 2 comments
Open

Remove the undocumented tagExclude option #620

dylanb opened this issue Nov 16, 2017 · 2 comments
Labels
feat New feature or enhancement help wanted We welcome PRs or discussions for issues marked as help wanted
Milestone

Comments

@dylanb
Copy link
Contributor

dylanb commented Nov 16, 2017

There is currently no documentation in the API docs describing how it works or what the default setting is

@dylanb dylanb added docs Documentation changes feat New feature or enhancement labels Nov 16, 2017
@marcysutton
Copy link
Contributor

marcysutton commented Nov 17, 2017

To supply some info I uncovered today, you can run enabled experimental rules with this API:

axe.configure({tagExclude: []});
axe.run(document, (error, results) => { console.log(results); });

This wipes out the default tagExclude in axe-core where experimental rules get skipped.

But for any experimental rules that are disabled by default, like the hidden content rule, that doesn't work. You have to use runOnly to run them with the union of WCAG and best practice rules:

axe.run(document, {"runOnly": {
        type: 'tag',
        values: ['wcag2a', 'wcag2aa', 'experimental', 'best-practice']
    }}, function(error, results) {
        console.log(results);
    })

Both of those APIs are pretty clumsy. I think we could improve them, especially when working with the mix of enabled/disabled experimental rules. I'm not sure why we use enabled/disabled at all when they all get skipped by axe-core without configuring them otherwise.

@WilcoFiers
Copy link
Contributor

WilcoFiers commented Nov 17, 2017

@dylanb The lack of documentation is intentional. As Marcy points out, the way to run experimental rules is to add it to your runOnly option. I think tagExclude is pretty confusing as far as APIs go (enable rules by passing in an empty array). We built it as a quick fix for FireEyes, but I don't think it's good enough to be used by people not familiar with the internals of axe-core.

I agree with Marcy. If we want to expose these kinds of features, we should improve the API first. Over the years we've collected some pretty great ideas for an engine/API redesign, we can start putting those in place throughout 3.x and pull out the deprecated stuff by 4.0.

@WilcoFiers WilcoFiers added this to the Axe-core 4.0 milestone Mar 30, 2020
@WilcoFiers WilcoFiers changed the title Document the tagExclude option Remove the undocumented tagExclude option Apr 28, 2020
@WilcoFiers WilcoFiers removed this from the Axe-core 4.0 milestone Jun 22, 2020
@dylanb dylanb added help wanted We welcome PRs or discussions for issues marked as help wanted and removed docs Documentation changes labels Mar 12, 2021
@WilcoFiers WilcoFiers added this to the Axe-core 5.0 milestone Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or enhancement help wanted We welcome PRs or discussions for issues marked as help wanted
Projects
None yet
Development

No branches or pull requests

3 participants