equal-access
equal-access copied to clipboard
[ACT] Improve ACT mapping for two rules: `aria_attribute_valid` and `a_text_purpose`
Fix mapping to ACT for these two ACT rules
- [x] ACT rule: Element marked as decorative is not exposed for test case the Checker 1. rule should report fails (map to) as
ARIA
, not4.1.2
- [x] ACT rule: Link has non-empty accessible name for test case the Checker currently reports as
2.4.4
. ACT also expects4.1.2
. The Checker 2. rule should report both.
1. Rule ID: aria_attribute_valid
Now part of aria_semantics.ts file due to dependencies of running rules in a certain order.
- [x] No change needed to fail reasons:
"Fail_invalid_role_attr": "The ARIA attributes \"{0}\" are not valid for the element <{1}> with ARIA role \"{2}\"",
"Fail_invalid_implicit_role_attr": "The ARIA attributes \"{0}\" are not valid for the element <{1}> with implicit ARIA role \"{2}\""
And, because the Help uses the term "may":
... If invalid ARIA attributes are used, assistive technologies may not be able to interpret and operate the element accurately for users.
- [x] no change is needed to the help even though it references 4.1.2, since "may" is still valid for UI components:
About this requirement IBM 4.1.2 Name, Role, Value ARIA specification - States and Properties
- [x] However, per the ARIA spec, the Checker rule
group
message needs to be "softened" from "must" to "should":
ARIA attributes ~~must~~ should be valid for the element and ARIA role to which they are assigned
- [x] No change needed in automated test cases because no fail messages changed, only mapping and
group
message.
Note: Because the Checker rule aria_attribute_valid also maps to ACT rule 5c01ea
: Proposed: ARIA state or property is permitted which includes no primary WCAG mapping and Secondary Requirement mapping to WCAG 4.1.2
, the Checker rule is currently reported as "Consistent" (unless changed in the future W3C ACT review/approval process) even though this Checker rule reports against ARIA
.
2. Rule ID: a_text_purpose
Because 4.1.2 applies to "user interface components" and "links" are also "UI components", the Checker rule should report both 2.4.4 and 4.1.2 as ACT does.
- [x] The a_text_purpose rule help would need to add the reference to 4.1.2 because it currently only references 2.4.4
About this requirement IBM 2.4.4 Link Purpose (in Context) WCAG technique H30 WCAG technique ARIA7
- [x] No change needed in automated test cases because no fail messages changed, only mapping and Help references.
Fixed environment issues, proceeding with changes. Installing Xcode on MacOS dev machines solved Git dependency
Some rules have changed & been modified which impacts this issue.
ruleID aria_attribute_valid
was moved to inside aria_semantics.ts
and not as a separate .ts file as originally indicated above.
issue title will change
actually ruleID was valid, just not part of aria_attribute_allowed.ts
changing title back and correcting links in description.
3 files updated per the checkboxes in the description above
group
message change caused Mocha, Karma, & Selenium baselines to fail because expected message* doesn't match:
-
`...accessibility-checker/test/baselines/JSONObjectStructureVerification.html.json`
-
`...accessibility-checker/test/baselines/JSONObjectStructureVerificationSelenium.html.json`
-
`...karma-accessibility-checker/test/client/baseline/JSONObjectStructureVerification.html.json`
"lhs": "Hyperlinks must have accessible text for their purpose",
"rhs": "Hyperlinks must have a text description of their purpose"
*Note: it's not as common now to have group/"0" messages in a baseline, these two are "old style" baselines. Best practice now is to have "failure" messages in the baseline.
Baselines also had to be updated to pass build because of change in group/"0" message:
accessibility-checker/test/baselines/JSONObjectStructureVerification.html.json accessibility-checker/test/baselines/JSONObjectStructureVerificationSelenium.html.json karma-accessibility-checker/test/client/baseline/JSONObjectStructureVerification.html.json
Before this change, the Checker implementation report for ACT rules:
Number of Rules Implemented
- WCAG 2 rules: 20 Consistent; 6 Partially Consistent
- Proposed rules: 2 Consistent; 4 Partially Consistent
Following this change, when deployed, the latest Checker implementation report for ACT rules will report 2 more consistent (2 fewer partials):
Number of Rules Implemented
- WCAG 2 rules: 22 Consistent; 4 Partially Consistent
- Proposed rules: 2 Consistent; 4 Partially Consistent
The two new consistent ACT rules will be:
- Element marked as decorative is not exposed (previously Partial)
- Link has non-empty accessible name (previously Partial)
@shunguoy After reviewing the WCAG resources, I agree the term "accessible text..." should be replaced by "accessible name..." in the group message and baselines:
Hyperlinks must have an accessible ~~text~~ name for their purpose