Skip to content

W3C ACT Implementation

Tom Brunet edited this page Sep 12, 2024 · 19 revisions

Overview - Accessibility Conformance Testing (ACT)

The W3C established a community of developers of accessibility evaluation methodologies and testing tools and some accessibility Subject Matter Experts (SMEs). The community establishes and documents ACT Rules for testing the conformance of WCAG and ARIA. These test rules address automated, semi-automated, and manual testing, but since the Checker is primarily an automated test tool, that is the primary interest. ACT’s goal is to make accessibility testing more transparent, and thus reduce confusion caused by different interpretations of the standards (WCAG Success Criteria). ACT members write & share with the community and implement ACT Rules into their products and services. They also test their tool against the ACT Rules and measure consistency and accuracy as reported in their ACT Implementation reports. ACT is not intended for end-users of accessibility tools, web developers, content authors, QA testers, etc. For more overview and background information, see Accessibility Conformance Testing (ACT) Overview.

ACT Rules

  1. All ACT rules are listed by the standard or specification that they cover, including WCAG, ARIA, Proposed Rules, and beyond.

  2. All ACT rules follow a review and publishing process.

  3. Each ACT rule has a 6 character Rule ID, description, applicability, expectations, assumptions, the WCAG criteria it maps to (reports against), and example test cases.

  4. Each rule’s Test Cases include Passing examples, Failing examples, and Inapplicable examples

Checker mapping to ACT

The ACT community describes how implementations, such as the Checker, should approach the Mapping to Rules. Individual Checker rules may test and report against (map to) one or more ACT rules by identifying the ACT rule's ID (6 character) in its checker_rule_name_.ts file using the act: [ _act_6_character_rule_ID_here_ ], declaration:

  • See example img_alt_valid.ts, this Checker rule maps to act: "23a2a8" at around line 53 in the rule’s logic code.

  • See example aria_id_unique.ts where a single Checker rule maps to two ACT rules: act: ["59796f", "6a7281"],

  • See example aria_graphic_labelled.ts where a single Checker rule maps to multiple ACT test cases depending on the Fail reasons: act: [{ "7d6734": {"Pass_0": "pass", "Fail_1": "inapplicable", "Fail_2": "fail", "Fail_3": "inapplicable" } }],. These more complex mappings may be due to our rules having different scope than the related ACT rule, or our rule split across multiple ACT rules.

  • See example aria_img_labelled.ts where a single Checker rule maps to multiple ACT Rules and multiple test cases:

act: ["23a2a8", { "7d6734": {
                  "Pass_0": "pass",
                  "Fail_1": "inapplicable",
                  "Fail_2": "fail",
                  "Fail_3": "inapplicable"
                 }
      }],
  • The Checker reports the individual ACT test case results with one of the following values in the outcome:
    • earl:passed: A node in the test case passed the rule
    • earl:failed: A node in the test case failed the rule
    • earl:inapplicable: The rule is inapplicable in the test case
    • earl:cantTell: The tool could not be sure whether or not a node passed of failed the rule
    • earl:untested: The rule was not executed on the test case

ACT Results

  1. See .../accessibility-checker/test-act-w3/main.js in the Checker repo that uses Puppeteer to run the ACT test cases and report the results.

  2. See the ACT Test Results (act-report-v2.txt) Artifact created from Actions by each PR build that details the results of running the Checker against the ACT rule Test Cases. The results file is available in Actions for debugging and QA purposes.

    1. Each ACT rule is listed, each test case is listed, and if there is a mismatch, then there is a message, such as “Expected passed, but returned earl:failed”

    2. If no Checker rule maps to an ACT rule, then a message: “? No checker rules“ is listed under that ACT rule.

    3. See sample ACT Test Results (act-report-v2.txt) file saved to Box. But, it is best to view the Artifact file from Actions for the most current results.

ACT Implementation report

Background for contributors

The following statements help clear up the purpose and high level understanding of these related topics and specs: