Skip to content

Commit 53a925a

Browse files
authored
feat: add RGAA tags to rules (#4862)
- [x] Update tags - [x] Update docs - [x] Add tag validation Closes: #4850 - Make new tags available for DQU documentation (after merging)
1 parent 3992e2a commit 53a925a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+367
-133
lines changed

build/tasks/validate.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,12 @@ const standardsTags = [
349349
standardRegex: /^EN-301-549$/,
350350
criterionRegex: /^EN-9\.[1-4]\.[1-9]\.\d{1,2}$/,
351351
wcagLevelRegex: /^wcag21?aa?$/
352+
},
353+
{
354+
name: 'RGAA',
355+
standardRegex: /^RGAAv4$/,
356+
criterionRegex: /^RGAA-\d{1,2}\.\d{1,2}\.\d{1,2}$/,
357+
wcagLevelRegex: /^wcag21?aa?$/
352358
}
353359
];
354360

doc/API.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ The `experimental`, `ACT`, `TT`, and `section508` tags are only added to some ru
9494
| `TT*.*` | Test ID in Trusted Tester |
9595
| `EN-301-549` | Rule required under [EN 301 549](https://www.etsi.org/deliver/etsi_en/301500_301599/301549/03.02.01_60/en_301549v030201p.pdf) |
9696
| `EN-9.*` | Section in EN 301 549 listing the requirement |
97+
| `RGAAv4` | Rule required under [RGAA](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) |
98+
| `RGAA-*.*.*` | Section in RGAA listing the requirement |
9799
| `experimental` | Cutting-edge rules, disabled by default |
98100
| `cat.*` | Category mappings used by Deque (see below) |
99101

doc/rule-descriptions.md

Lines changed: 74 additions & 74 deletions
Large diffs are not rendered by default.

lib/rules/area-alt.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
"EN-301-549",
1616
"EN-9.2.4.4",
1717
"EN-9.4.1.2",
18-
"ACT"
18+
"ACT",
19+
"RGAAv4",
20+
"RGAA-1.1.2"
1921
],
2022
"actIds": ["c487ae"],
2123
"metadata": {

lib/rules/aria-allowed-attr.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
"id": "aria-allowed-attr",
33
"impact": "critical",
44
"matches": "aria-allowed-attr-matches",
5-
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
5+
"tags": [
6+
"cat.aria",
7+
"wcag2a",
8+
"wcag412",
9+
"EN-301-549",
10+
"EN-9.4.1.2",
11+
"RGAAv4",
12+
"RGAA-7.1.1"
13+
],
614
"actIds": ["5c01ea"],
715
"metadata": {
816
"description": "Ensure an element's role supports its ARIA attributes",

lib/rules/aria-command-name.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"TT6.a",
1212
"EN-301-549",
1313
"EN-9.4.1.2",
14-
"ACT"
14+
"ACT",
15+
"RGAAv4",
16+
"RGAA-11.9.1"
1517
],
1618
"actIds": ["97a4e1"],
1719
"metadata": {

lib/rules/aria-conditional-attr.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
"id": "aria-conditional-attr",
33
"impact": "serious",
44
"matches": "aria-allowed-attr-matches",
5-
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
5+
"tags": [
6+
"cat.aria",
7+
"wcag2a",
8+
"wcag412",
9+
"EN-301-549",
10+
"EN-9.4.1.2",
11+
"RGAAv4",
12+
"RGAA-7.1.1"
13+
],
614
"actIds": ["5c01ea"],
715
"metadata": {
816
"description": "Ensure ARIA attributes are used as described in the specification of the element's role",

lib/rules/aria-deprecated-role.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
"impact": "minor",
44
"selector": "[role]",
55
"matches": "no-empty-role-matches",
6-
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
6+
"tags": [
7+
"cat.aria",
8+
"wcag2a",
9+
"wcag412",
10+
"EN-301-549",
11+
"EN-9.4.1.2",
12+
"RGAAv4",
13+
"RGAA-7.1.1"
14+
],
715
"actIds": ["674b10"],
816
"metadata": {
917
"description": "Ensure elements do not use deprecated roles",

lib/rules/aria-hidden-body.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"wcag412",
1212
"EN-301-549",
1313
"EN-9.1.3.1",
14-
"EN-9.4.1.2"
14+
"EN-9.4.1.2",
15+
"RGAAv4",
16+
"RGAA-7.1.1"
1517
],
1618
"metadata": {
1719
"description": "Ensure aria-hidden=\"true\" is not present on the document body.",

lib/rules/aria-hidden-focus.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"TTv5",
1212
"TT6.a",
1313
"EN-301-549",
14-
"EN-9.4.1.2"
14+
"EN-9.4.1.2",
15+
"RGAAv4",
16+
"RGAA-7.1.1"
1517
],
1618
"actIds": ["6cfa84"],
1719
"metadata": {

0 commit comments

Comments
 (0)