equal-access icon indicating copy to clipboard operation
equal-access copied to clipboard

[ACT] Improve ACT mapping for two rules: `aria_attribute_valid` and `a_text_purpose`

Open philljenkins opened this issue 1 year ago • 5 comments

Fix mapping to ACT for these two ACT rules

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.

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.

philljenkins avatar Nov 28 '23 22:11 philljenkins

Fixed environment issues, proceeding with changes. Installing Xcode on MacOS dev machines solved Git dependency

philljenkins avatar Mar 13 '24 15:03 philljenkins

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

philljenkins avatar Mar 13 '24 16:03 philljenkins

actually ruleID was valid, just not part of aria_attribute_allowed.ts

changing title back and correcting links in description.

philljenkins avatar Mar 13 '24 21:03 philljenkins

3 files updated per the checkboxes in the description above

philljenkins avatar Mar 13 '24 22:03 philljenkins

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

philljenkins avatar Mar 13 '24 23:03 philljenkins

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:

  1. Element marked as decorative is not exposed (previously Partial)
  2. Link has non-empty accessible name (previously Partial)

philljenkins avatar Mar 14 '24 19:03 philljenkins

@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

philljenkins avatar Mar 14 '24 20:03 philljenkins