act-rules-format.md
2.38 KB
W3C Standardized Rules
Deque Systems is one of leading organizations in the development of standardized accessibility conformance testing rules. The axe-core rules proposal format is an adaptation of the Accessibility Conformance Testing Rules Format.
There are two ways a rule written in the axe-core rule format can be transformed into the ACT Rules format:
Method 1: Create a single rule
This method is useful for rules with a small number of checks.
- Add the test input type to it:
rendered page
- Add an
assumptions
section, add possible assumptions to it - Add an
outcomes
section, describing the different possible outcomes of the rule - Add a
Validation Tests
section, that links to the integration tests - Update the check to return pass/fail/cantTell instead of true/false/undefined
- Add control flow to the checks:
-
any
checks should only returnfail
in the last step. All steps leading up to it either returnpass
or saycontinue to the next step
. -
all
andnone
checks should only returnpass
in the last step. All steps leading up to it either returnfail
or saycontinue to the next step
.
- Rename
checks
tosteps
and add astep X
(where X is the step number) to the heading with the check name. - Replace the
tags
section with aAccessibility Requirements
. The requirements can be determined based on thewcag###
tags.
Method 2: Create a rule group
This method is useful for larger rules with any
checks. This effectively turns every check into its own rule, and turns the rule into a rule group.
- Copy each check into a new document
- Add a
steps
heading - Add the test input type to it:
rendered page
- Add an
assumptions
section, add possible assumptions to it - Add an
outcomes
section, describing the different possible outcomes of the rule - Copy the
selector
section from the original rule into the new rule documents - Update the check to return pass/fail/cantTell instead of true/false/undefined
- Add a
Validation Tests
section, that links to only those integration tests relevant for this check (now a new rule). - Indicate that the new rule is part of a group, using the original axe-core rule ID as the group name.
- Replace the
tags
section with aAccessibility Requirements
. The requirements can be determined based on thewcag###
tags.