Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(engine): Remapping engine rules from 4.1.1 Parsing to HTML and ARIA #1686

Merged
merged 28 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
058459d
update rules #1680
shunguoy Sep 14, 2023
da35b05
update the rule categories #1680
shunguoy Sep 15, 2023
0a831a1
ruleset update to include wcag 2.2 #1680
shunguoy Sep 15, 2023
db69338
Merge branch 'master' into dev-1680
shunguoy Sep 18, 2023
896edb6
Merge branch 'master' into dev-1680
shunguoy Sep 19, 2023
5abbf4c
Remove reference to 4.1.1
philljenkins Sep 19, 2023
3a6dca0
Remove 4.1.1
philljenkins Sep 19, 2023
45a4449
Remove 4.1.1
philljenkins Sep 19, 2023
51ab2b0
Remove 4.1.1
philljenkins Sep 19, 2023
09597e8
Remove 4.1.1
philljenkins Sep 19, 2023
f78dd15
Remove 4.1.1
philljenkins Sep 19, 2023
295eee6
Remove 4.1.1
philljenkins Sep 19, 2023
7a4d534
Merge branch 'master' into dev-1680
philljenkins Sep 19, 2023
3f37596
4.1.1 note simplified
philljenkins Sep 20, 2023
41ffc18
Simplified 4.1.1 note
philljenkins Sep 20, 2023
1644fa1
Simplified 4.1.1 note
philljenkins Sep 20, 2023
1189d91
Simplified 4.1.1 note
philljenkins Sep 20, 2023
cdc0f09
Simplify 4.1.1 note
philljenkins Sep 20, 2023
aef7a25
Simplify 4.1.1 note
philljenkins Sep 20, 2023
84e05b0
HTML and ARIA to rule set descriptions
philljenkins Sep 22, 2023
2d67930
4.1.1 note updated
philljenkins Sep 22, 2023
2ff9c0a
4.1.1 note updated
philljenkins Sep 22, 2023
cd2f7c3
4.1.1 note updated
philljenkins Sep 22, 2023
9b9e792
4.1.1 note updated
philljenkins Sep 22, 2023
e3f8a5c
4.1.1 note updated
philljenkins Sep 22, 2023
6848244
Merge branch 'master' into dev-1680
philljenkins Sep 22, 2023
0247e52
Merge branch 'master' into dev-1680
ErickRenteria Oct 2, 2023
8b210ff
Removing line 73 fro 4.1.1
ErickRenteria Oct 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ <h3 id="ruleMessage"></h3>

* Replace deprecated roles and attributes with those preferred in the current version of the specification.

Note: The [4.1.1 Parsing](https://www.w3.org/WAI/WCAG21/Understanding/parsing.html) requirement was removed from WCAG.
However, the Checker will report an issue against another accessibility requirement when it detects it causes an accessibility issue.

</script></mark-down>
<!-- End main panel -->
<!-- This is where the rule id is injected -->
Expand All @@ -77,7 +80,7 @@ <h3 id="ruleMessage"></h3>

### About this requirement

* [IBM 4.1.1 Parsing](https://www.ibm.com/able/requirements/requirements/#4_1_1)
<!-- Replace 4.1.1 * [IBM 4.1.1 Parsing](https://www.ibm.com/able/requirements/requirements/#4_1_1) -->
* [ARIA 1.2 - Deprecated Requirements](https://www.w3.org/TR/wai-aria-1.2/#deprecated)

### Who does this affect?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ <h3 id="ruleMessage"></h3>

### What to do

Remove the redundant ARIA role from the element.
* Remove the redundant ARIA role from the element.

Note the redundant ARIA and HTML roles shown in the following examples.
Note the redundant ARIA and HTML roles shown in the following examples:

```
<button type="button" role="button">Save</button>
Expand All @@ -69,6 +69,9 @@ <h3 id="ruleMessage"></h3>
<input type="button" value="Save">
```

Note: The [4.1.1 Parsing](https://www.w3.org/WAI/WCAG21/Understanding/parsing.html) requirement was removed from WCAG.
However, the Checker will report an issue against another accessibility requirement when it detects it causes an accessibility issue.

</script></mark-down>
<!-- End main panel -->
<!-- This is where the rule id is injected -->
Expand All @@ -80,7 +83,7 @@ <h3 id="ruleMessage"></h3>

### About this requirement

* [IBM 4.1.2 Name, role, value](https://www.ibm.com/able/requirements/requirements/#4_1_2)
<!-- Remove 4.1.1 * [IBM 4.1.2 Name, role, value](https://www.ibm.com/able/requirements/requirements/#4_1_2) -->
* [ARIA in HTML - Avoid specifying redundant roles](https://www.w3.org/TR/html-aria/#avoid-specifying-redundant-roles)

### Who does this affect?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ <h3 id="ruleMessage"></h3>
### About this requirement

* [IBM 3.3.2 Labels and Instructions](https://www.ibm.com/able/requirements/requirements/#3_3_2)
* [WebAIM - The accesskey attribute](https://webaim.org/techniques/keyboard/accesskey#spec)
* [ARIA practices - Developing a Keyboard Interface](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ <h3 id="ruleMessage"></h3>
<button type="button" name="testButton1" id="button1" accesskey="a">Accept</button>
<button type="button" name="testButton2" id="button2" accesskey="r">Reject</button>
```
Note: The [4.1.1 Parsing](https://www.w3.org/WAI/WCAG21/Understanding/parsing.html) requirement was removed from WCAG.
However, the Checker will report an issue against another accessibility requirement when it detects it causes an accessibility issue.

</script></mark-down>
<!-- End main panel -->
Expand All @@ -71,7 +73,9 @@ <h3 id="ruleMessage"></h3>

### About this requirement

* [IBM 4.1.1 Parsing](https://www.ibm.com/able/requirements/requirements/#4_1_1)
<!-- * [IBM 4.1.1 Parsing](https://www.ibm.com/able/requirements/requirements/#4_1_1) -->
* [WebAIM - The accesskey attribute](https://webaim.org/techniques/keyboard/accesskey#spec)
* [ARIA practices - Developing a Keyboard Interface](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ <h3 id="ruleMessage"></h3>

### What to do

Replace deprecated elements and attributes with those preferred in the current version of the specification.
* Replace deprecated elements and attributes with those preferred in the current version of the specification.

Note: The [4.1.1 Parsing](https://www.w3.org/WAI/WCAG21/Understanding/parsing.html) requirement was removed from WCAG.
However, the Checker will report an issue against another accessibility requirement when it detects it causes an accessibility issue.

</script></mark-down>
<!-- End main panel -->
<!-- This is where the rule id is injected -->
Expand All @@ -77,7 +80,7 @@ <h3 id="ruleMessage"></h3>

### About this requirement

* [IBM 4.1.1 Parsing](https://www.ibm.com/able/requirements/requirements/#4_1_1)
<!-- * [IBM 4.1.1 Parsing](https://www.ibm.com/able/requirements/requirements/#4_1_1) -->
* [HTML 5 - Obsolete Features](https://dev.w3.org/html5/pf-summary/obsolete.html)

### Who does this affect?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h3 id="ruleMessage"></h3>

### What to do

* For each element with an `id` attribute, provide a unique, non-empty value.
* For each element with an `id` attribute, provide a unique, non-empty value.

For example:

Expand All @@ -64,6 +64,9 @@ <h1 id="news">Breaking news</h1>
</div>
```

Note: The [4.1.1 Parsing](https://www.w3.org/WAI/WCAG21/Understanding/parsing.html) requirement was removed from WCAG.
However, the Checker will report an issue against another accessibility requirement when it detects it causes an accessibility issue.

</script></mark-down>
<!-- End main panel -->
<!-- This is where the rule id is injected -->
Expand All @@ -75,13 +78,13 @@ <h1 id="news">Breaking news</h1>

### About this requirement

* [IBM 4.1.1 Parsing ](https://www.ibm.com/able/requirements/requirements/#4_1_1)
* [WCAG technique H93](https://www.w3.org/WAI/WCAG21/Techniques/html/H93)
* [WCAG technique F77](https://www.w3.org/WAI/WCAG21/Techniques/failures/F77)
<!-- Remove 4.1.1 * [IBM 4.1.1 Parsing ](https://www.ibm.com/able/requirements/requirements/#4_1_1) -->
* [WCAG technique H93 - Ensuring that ID attributes are unique on a Web page](https://www.w3.org/WAI/WCAG21/Techniques/html/H93)
* [WCAG technique F77 - Failure due to duplicate values of type ID](https://www.w3.org/WAI/WCAG21/Techniques/failures/F77)

### Who does this affect?

* People using a screen reader, including blind, low vision and neurodivergent people
* People using a screen reader, including blind, low vision, and neurodivergent people

</script></mark-down>
<!-- End side panel -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export let aria_attribute_deprecated: Rule = {
}
},
rulesets: [{
"id": ["IBM_Accessibility", "WCAG_2_1", "WCAG_2_0"],
"num": ["4.1.1"],
"id": ["IBM_Accessibility"],
"num": ["ARIA"],
"level": eRulePolicy.RECOMMENDATION,
"toolkitLevel": eToolkitLevel.LEVEL_ONE
"toolkitLevel": eToolkitLevel.LEVEL_THREE
}],
act: [],
run: (context: RuleContext, options?: {}, contextHierarchies?: RuleContextHierarchy): RuleResult | RuleResult[] => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export let aria_role_redundant: Rule = {
}
},
rulesets: [{
"id": ["IBM_Accessibility", "WCAG_2_1", "WCAG_2_0"],
"num": ["4.1.1"],
"id": ["IBM_Accessibility"],
"num": ["ARIA"],
"level": eRulePolicy.RECOMMENDATION,
"toolkitLevel": eToolkitLevel.LEVEL_FOUR
"toolkitLevel": eToolkitLevel.LEVEL_THREE
}],
act: [],
run: (context: RuleContext, options?: {}, contextHierarchies?: RuleContextHierarchy): RuleResult | RuleResult[] => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export let element_accesskey_unique: Rule = {
}
},
rulesets: [{
"id": ["IBM_Accessibility", "WCAG_2_1", "WCAG_2_0"],
"num": ["4.1.1"],
"id": ["IBM_Accessibility"],
"num": ["HTML"],
"level": eRulePolicy.VIOLATION,
"toolkitLevel": eToolkitLevel.LEVEL_THREE
}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ export let element_attribute_deprecated: Rule = {
}
},
rulesets: [{
"id": ["IBM_Accessibility", "WCAG_2_1", "WCAG_2_0"],
"num": ["4.1.1"],
"id": ["IBM_Accessibility"],
"num": ["HTML"],
"level": eRulePolicy.RECOMMENDATION,
"toolkitLevel": eToolkitLevel.LEVEL_ONE
"toolkitLevel": eToolkitLevel.LEVEL_THREE
}],
act: [],
run: (context: RuleContext, options?: {}, contextHierarchies?: RuleContextHierarchy): RuleResult | RuleResult[] => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export let element_id_unique: Rule = {
}
},
rulesets: [{
"id": ["IBM_Accessibility", "WCAG_2_1", "WCAG_2_0"],
"num": ["4.1.1"],
"id": ["IBM_Accessibility"],
"num": ["HTML"],
"level": eRulePolicy.VIOLATION,
"toolkitLevel": eToolkitLevel.LEVEL_THREE
}],
Expand Down
7 changes: 4 additions & 3 deletions accessibility-checker-engine/src/v4/rulesets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ const summaries = {
"3.3.2": "Labels or instructions are provided when content requires user input.",
"3.3.3": "If an input error is automatically detected and suggestions for correction are known, then the suggestions are provided to the user, unless it would jeopardize the security or purpose of the content.",
"3.3.4": "For content that cause legal commitments or financial transactions for the user to occur, that modify or delete user-controllable data in data storage systems, or that submit user test responses, the user can reverse, correct, or confirm the action.",
"4.1.1": "In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features.",
"4.1.2": "For all user interface components (including, but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies.",
"4.1.3": "In content implemented using markup languages, status messages can be programmatically determined through role or properties such that they can be presented to the user by assistive technologies without receiving focus.",
}
"HTML": "The HTML specification issues that cause accessibility issues may be covered by other rules and will be reported under those accessibility requirements. However, some non-conforming HTML specification issues are reported.",
"ARIA": "The ARIA specification issues that cause accessibility issues may be covered by other rules and will be reported under those accessibility requirements. However, some non-conforming ARIA specification issues are reported.",
}

export let a11yRulesets: Guideline[] = [
// {
Expand Down Expand Up @@ -108,7 +109,7 @@ export let a11yRulesets: Guideline[] = [
description: "Rules for WCAG 2.1 AA plus additional IBM checklist supplemental requirements.",
// This ruleset has all 2.0 and 2.1 checkpoints that are A or AA
checkpoints: SCs
.filter(sc => (sc.level === "A" || sc.level === "AA") && (sc.wcagType === "2.0" || sc.wcagType === "2.1"))
.filter(sc => (sc.level === "A" || sc.level === "AA" || sc.level === "NA") && (sc.wcagType === "2.0" || sc.wcagType === "2.1" || sc.wcagType === "2.2" || sc.wcagType === "NA"))
.map(sc => ({
num: sc.num,
scId: sc.scId,
Expand Down
24 changes: 24 additions & 0 deletions accessibility-checker-engine/src/v4/sc-urls.json
Original file line number Diff line number Diff line change
Expand Up @@ -934,5 +934,29 @@
"handle": "Status Messages",
"level": "AA",
"wcagType": "2.1"
},
"HTML": {
"num": "HTML",
"url": "https://html.spec.whatwg.org/multipage/",
"scId": [],
"scAltId": [],
"test": "",
"howToMeetUrl": "https://html.spec.whatwg.org/multipage/",
"understandingUrl": "https://html.spec.whatwg.org/multipage/",
"handle": "HTML Messages",
"level": "NA",
"wcagType": "NA"
},
"ARIA": {
"num": "ARIA",
"url": "https://w3c.github.io/aria/",
"scId": [],
"scAltId": [],
"test": "",
"howToMeetUrl": "https://w3c.github.io/aria/",
"understandingUrl": "https://w3c.github.io/aria/",
"handle": "ARIA Messages",
"level": "NA",
"wcagType": "NA"
}
}