diff --git a/accessibility-checker/boilerplates/mocha-puppeteer-ts/achecker.js b/accessibility-checker/boilerplates/mocha-puppeteer-ts/achecker.js index e9cede9be..887d9118a 100644 --- a/accessibility-checker/boilerplates/mocha-puppeteer-ts/achecker.js +++ b/accessibility-checker/boilerplates/mocha-puppeteer-ts/achecker.js @@ -2,7 +2,7 @@ module.exports = { // optional - Specify the rule archive // Default: latest // Run `npx aat archives` for a list of valid ruleArchive ids and policy ids - ruleArchive: 'latest', + ruleArchive: 'versioned', // optional - Specify one or many policies to scan. // Run `npx aat archives` for a list of valid ruleArchive ids and policy ids diff --git a/java-accessibility-checker/boilerplates/junit-playwright/lib/build.gradle b/java-accessibility-checker/boilerplates/junit-playwright/lib/build.gradle index 18de9eba5..07bc2a491 100644 --- a/java-accessibility-checker/boilerplates/junit-playwright/lib/build.gradle +++ b/java-accessibility-checker/boilerplates/junit-playwright/lib/build.gradle @@ -22,7 +22,7 @@ dependencies { testImplementation libs.junit implementation 'com.microsoft.playwright:playwright:1.46.0' - implementation 'com.ibm.able:accessibility-checker:1.0.0-beta-4' + implementation 'com.ibm.able:accessibility-checker:3.1.77' } // Apply a specific Java toolchain to ease working on different environments. diff --git a/java-accessibility-checker/boilerplates/junit-selenium/lib/build.gradle b/java-accessibility-checker/boilerplates/junit-selenium/lib/build.gradle index 53f9c854c..9cb332dcf 100644 --- a/java-accessibility-checker/boilerplates/junit-selenium/lib/build.gradle +++ b/java-accessibility-checker/boilerplates/junit-selenium/lib/build.gradle @@ -23,7 +23,7 @@ dependencies { // https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java implementation 'org.seleniumhq.selenium:selenium-java:4.23.0' - implementation 'com.ibm.able:accessibility-checker:1.0.0-beta-4' + implementation 'com.ibm.able:accessibility-checker:3.1.77' } // Apply a specific Java toolchain to ease working on different environments. diff --git a/java-accessibility-checker/src/main/java/com/ibm/able/equalaccess/AccessibilityChecker.java b/java-accessibility-checker/src/main/java/com/ibm/able/equalaccess/AccessibilityChecker.java index 2cdefd2a7..c6a8abb6a 100644 --- a/java-accessibility-checker/src/main/java/com/ibm/able/equalaccess/AccessibilityChecker.java +++ b/java-accessibility-checker/src/main/java/com/ibm/able/equalaccess/AccessibilityChecker.java @@ -163,8 +163,8 @@ public static ACReport getBaseline(String label) { * } * ] */ - public static DiffResult[] diffResultsWithExpected(ACReport actual, ACReport expected) { - return BaselineManager.diffResultsWithExpected(actual, expected); + public static DiffResult[] diffResultsWithExpected(ACReport actual, ACReport expected, boolean clean) { + return BaselineManager.diffResultsWithExpected(actual, expected, clean); } // export function addRuleset(ruleset) { diff --git a/java-accessibility-checker/src/main/java/com/ibm/able/equalaccess/engine/ACReport.java b/java-accessibility-checker/src/main/java/com/ibm/able/equalaccess/engine/ACReport.java index 2066a06b4..a0556a691 100644 --- a/java-accessibility-checker/src/main/java/com/ibm/able/equalaccess/engine/ACReport.java +++ b/java-accessibility-checker/src/main/java/com/ibm/able/equalaccess/engine/ACReport.java @@ -16,6 +16,7 @@ package com.ibm.able.equalaccess.engine; import java.lang.reflect.Type; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -118,6 +119,17 @@ public Object clone() { return super.clone(); } + public Result copyClean() { + Result issue = new Result(); + issue.ruleId = this.ruleId; + issue.reasonId = this.reasonId; + // Make sure that the xpath in the case there is a [1] we replace it with "" + // to support some browser which return it differently + issue.path = new HashMap(); + issue.path.put("dom", this.path.get("dom").replaceAll("\\[1\\]", "")); + return issue; + } + public String toHelpData() { return gsonMinimal.toJson(this); } @@ -301,6 +313,20 @@ public Object clone() { return ret; } + public ACReport copyClean() { + // Shallow copy + ACReport ret = new ACReport(); + ret.label = this.label; + ArrayList temp = new ArrayList(results.length); + for (int idx=0; idx