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

Check the "axeVersion" property for axe.configure for compatibility #1780

Closed
WilcoFiers opened this issue Aug 21, 2019 · 11 comments
Closed

Check the "axeVersion" property for axe.configure for compatibility #1780

WilcoFiers opened this issue Aug 21, 2019 · 11 comments
Assignees
Labels
core Issues in the core code (lib/core) docs Documentation changes feat New feature or enhancement
Milestone

Comments

@WilcoFiers
Copy link
Contributor

WilcoFiers commented Aug 21, 2019

When calling axe.configure() with a "axeVersion" property, axe-core should check if that version of the custom rule is compatible with the axe-core version that's used. Custom rules are compatible with all patch and minor updates that are the same as, or newer than those in "axeVersion". So:

axe.configure({
  rulesetVersion: '2.5.1',
  rules,
  checks
})
  • 2.5.1 is compatible with 2.5.1
  • 2.5.1 is compatible with 2.6.2
  • 2.5.1 is compatible with 2.5.1-canary.2664bae
  • 2.5.1-canary.2664bae is compatible with 2.5.2
  • 2.5.1 is not compatible with 2.5.0
  • 2.5.1 is not compatible with 2.4.3
  • 2.5.1 is not compatible with 3.x.x
  • 2.5.1-canary.2664bae is not compatible with 2.5.1
  • 2.5.1-canary.2664bae is not compatible with 2.5.1-canary.a5d727c (since we can't tell which was released first, canary versions are only compatible with themselves, and any future stable release).

If axe.configure is called with an incompatible version, axe-core should throw a meaningful error.

Edit: The ver property has been renamed to axeVersion. We will add support for ver, but have it only be available as a deprecated feature, that will be removed as of the next major release.

@WilcoFiers WilcoFiers added feat New feature or enhancement core Issues in the core code (lib/core) labels Aug 21, 2019
@WilcoFiers WilcoFiers modified the milestones: Axe-core 3.4, axe-core 3.5 Aug 21, 2019
@WilcoFiers WilcoFiers added the docs Documentation changes label Aug 26, 2019
@straker straker self-assigned this Aug 29, 2019
@stephenmathieson
Copy link
Member

Why "ver"? It's not a word.

@WilcoFiers WilcoFiers changed the title Check the "ver" property for axe.configure for compatibility Check the "rulesetVersion" property for axe.configure for compatibility Sep 4, 2019
@WilcoFiers
Copy link
Contributor Author

WilcoFiers commented Sep 4, 2019

See update above, renamed ver to axeVersion.

@WilcoFiers WilcoFiers changed the title Check the "rulesetVersion" property for axe.configure for compatibility Check the "axeVersion" property for axe.configure for compatibility Sep 4, 2019
@isner
Copy link
Contributor

isner commented Sep 4, 2019

Corresponding Comply ticket to accommodate this change:

Accommodate axe 3.4 version-compatibility checking
https://dequesrc.atlassian.net/browse/COM-1865

@WilcoFiers
Copy link
Contributor Author

I've updated the above example to include canary versions.

@jeankaplansky
Copy link
Contributor

Added to axe-core 3.4 release notes on 9/12.

@chandana7393
Copy link

@straker what needs to be QA here?? Can you please provide the required steps.

@straker
Copy link
Contributor

straker commented Sep 16, 2019

Just that setting different axeVersion values of against the used version of axe either throws an error or doesn't in accordance with @WilcoFiers description.

@somaalapati
Copy link

somaalapati commented Sep 17, 2019

@chandana7393 steps to verify this ticket:

  1. Launch Attest extension.
  2. Navigate to Rules panel.
  3. Select axe-version '3.0.3' from axe versions dropdown.
  4. Create a custom rule by setting 'rulesetVersion' as 2.5.1
  5. Analyse a page using this custom rule.

Expected: You should see a meaningful error.

@WilcoFiers Can you please confirm these steps are correct and provide an example custom rule that contains axe.configure

@somaalapati
Copy link

Comment from @WilcoFiers : You can’t verify this with the Attest extension. You’ll need to download axe-core@next from NPM, include it in any of the Attest APIs, (or axe-cli) and try to pass it a custom ruleset with an axeVersion set that’s incompatible.

@padmavemulapati See if you can verify this ticket.

@somaalapati
Copy link

@padmavemulapati This ticket is in "ReadyForQA" for a long time. Please verify asap.

@padmavemulapati
Copy link

Installed different axe versions with Node's get() , and apply in the APIs 'configure - obviously lower versions are incompatible and higher versions are compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues in the core code (lib/core) docs Documentation changes feat New feature or enhancement
Projects
None yet
Development

No branches or pull requests

8 participants