Skip to content

W3C ACT Implementation

Phill Jenkins edited this page Sep 9, 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" } }],

  • 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"
                 }
      }],

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.

    • The data sent to W3C ACT is ...@next/act-report-v2.json.
    • The isPartOf is the mapping (reporting) to WCAG that the Checker reports in the results and ACT will use to match the results.
    • How the Success Criteria #'s (scID's) are defined is in the ...accessibility-checker-engine/src/v4/sc-urls.json. Some examples:
      • "isPartOf": ["WCAG2:identify-input-purpose" is defined by "scId": "WCAG2:non-text-content" that maps to "num": "1.1.1".
      • "isPartOf": [ [] ] is defined by ARIA and HTML as "scId": [], that maps to None by ACT.
      • "isPartOf": ["HTML:html-specification" is defined by "scId": [], that maps to None by ACT.
    • The scID's, such as "WCAG2:non-text-content" are defined by ACT at ?
  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 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.

    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: