Migrating to axe DevTools HTML v4.x CLI

Link to Migrating to axe DevTools HTML v4.x CLI copied to clipboard

Steps for migrating to version 4.x of axe DevTools HTML CLI

To migrate from AGet to axe DevTools HTML CLI go through the following steps:

  1. Uninstall AGet

  2. Follow the installation instructions

  3. Upgrade scripts that use AGet to use axe DevTools HTML CLI instead.

  4. If you are using a custom ruleset, make sure to regenerate it for axe-core 4.0. Additionally:

    • If you use ATTEST_PATH, change it to AXE_RULESET_PATH.
    • If you ave using a local attest.json file, rename it to axe-ruleset.json.
  5. If you are using the attest-reporter CLI, replace it with axe reporter.

  6. If you are using the attest-standards CLI, replace it with axe ruleset.

Uninstall

Uninstall AGet executable

The only thing needed to uninstall AGet is to delete it from your file system. If you are unsure where it is installed, type which aget in the command line.

Uninstall AGet package

To uninstall AGet from a local package, run npm remove @deque/aget. To remove AGet globally, add the -g flag to this command. If you are using the unscoped AGet package, type remove aget instead of remove @deque/aget.

Upgrade scripts

Look for any scripts that use AGet, there you will need to replace the aget command with axe. Keep in mind, these scripts can live in a variety of places, such as:

  • bash script files
  • CI configuration files
  • test scripts
  • package configuration files

In axe DevTools HTML 4.0 the "uri" command has been deprecated. Instead, URLs can be passed directly to the "axe" command. To migrade, take out "uri" from all axe commands that use it.

aget uri deque.com

In axe DevTools HTML 4.0, this becomes:

axe deque.com

Upgrade to axe reporter

The attest-reporter is no longer available as a stand-alone CLI. The reporter is now available as part of axe DevTools HTML CLI.

  1. Make sure to uninstall attest-reporter
  2. Upgrade scripts to use axe reporter instead of attest-reporter

Upgrade to axe ruleset

The attest-standards is no longer available as a stand-alone CLI. Standards generation is now available as part of axe DevTools HTML CLI.

  1. Make sure to uninstall attest-standards
  2. Upgrade scripts to use axe ruleset instead of attest-standards

Noteworthy Changes

Asides installation and usage changes with the outlined commands, some noteworthy changes include:

  • Axe ruleset no longer supports custom rule matches functions and check evaluate and after functions. You can only use the ID to built-in axe functions.