Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions build/tasks/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ const standardsTags = [
standardRegex: /^EN-301-549$/,
criterionRegex: /^EN-9\.[1-4]\.[1-9]\.\d{1,2}$/,
wcagLevelRegex: /^wcag21?aa?$/
},
{
name: 'RGAA',
standardRegex: /^RGAAv4$/,
criterionRegex: /^RGAA-\d{1,2}\.\d{1,2}\.\d{1,2}$/,
wcagLevelRegex: /^wcag21?aa?$/
}
];

Expand Down
2 changes: 2 additions & 0 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ The `experimental`, `ACT`, `TT`, and `section508` tags are only added to some ru
| `TT*.*` | Test ID in Trusted Tester |
| `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) |
| `EN-9.*` | Section in EN 301 549 listing the requirement |
| `RGAAv4` | Rule required under [RGAA](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) |
| `RGAA-*.*.*` | Section in RGAA listing the requirement |
| `experimental` | Cutting-edge rules, disabled by default |
| `cat.*` | Category mappings used by Deque (see below) |

Expand Down
148 changes: 74 additions & 74 deletions doc/rule-descriptions.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion lib/rules/area-alt.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"EN-301-549",
"EN-9.2.4.4",
"EN-9.4.1.2",
"ACT"
"ACT",
"RGAAv4",
"RGAA-1.1.2"
],
"actIds": ["c487ae"],
"metadata": {
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-allowed-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"id": "aria-allowed-attr",
"impact": "critical",
"matches": "aria-allowed-attr-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"tags": [
"cat.aria",
"wcag2a",
"wcag412",
"EN-301-549",
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["5c01ea"],
"metadata": {
"description": "Ensure an element's role supports its ARIA attributes",
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/aria-command-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"TT6.a",
"EN-301-549",
"EN-9.4.1.2",
"ACT"
"ACT",
"RGAAv4",
"RGAA-11.9.1"
],
"actIds": ["97a4e1"],
"metadata": {
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-conditional-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"id": "aria-conditional-attr",
"impact": "serious",
"matches": "aria-allowed-attr-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"tags": [
"cat.aria",
"wcag2a",
"wcag412",
"EN-301-549",
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["5c01ea"],
"metadata": {
"description": "Ensure ARIA attributes are used as described in the specification of the element's role",
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-deprecated-role.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"impact": "minor",
"selector": "[role]",
"matches": "no-empty-role-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"tags": [
"cat.aria",
"wcag2a",
"wcag412",
"EN-301-549",
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["674b10"],
"metadata": {
"description": "Ensure elements do not use deprecated roles",
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/aria-hidden-body.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"wcag412",
"EN-301-549",
"EN-9.1.3.1",
"EN-9.4.1.2"
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"metadata": {
"description": "Ensure aria-hidden=\"true\" is not present on the document body.",
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/aria-hidden-focus.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"TTv5",
"TT6.a",
"EN-301-549",
"EN-9.4.1.2"
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["6cfa84"],
"metadata": {
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/aria-input-field-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"TT5.c",
"EN-301-549",
"EN-9.4.1.2",
"ACT"
"ACT",
"RGAAv4",
"RGAA-11.1.1"
],
"actIds": ["e086e5"],
"metadata": {
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-meter-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"impact": "serious",
"selector": "[role=\"meter\"]",
"matches": "no-naming-method-matches",
"tags": ["cat.aria", "wcag2a", "wcag111", "EN-301-549", "EN-9.1.1.1"],
"tags": [
"cat.aria",
"wcag2a",
"wcag111",
"EN-301-549",
"EN-9.1.1.1",
"RGAAv4",
"RGAA-11.1.1"
],
"metadata": {
"description": "Ensure every ARIA meter node has an accessible name",
"help": "ARIA meter nodes must have an accessible name"
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-progressbar-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"impact": "serious",
"selector": "[role=\"progressbar\"]",
"matches": "no-naming-method-matches",
"tags": ["cat.aria", "wcag2a", "wcag111", "EN-301-549", "EN-9.1.1.1"],
"tags": [
"cat.aria",
"wcag2a",
"wcag111",
"EN-301-549",
"EN-9.1.1.1",
"RGAAv4",
"RGAA-11.1.1"
],
"metadata": {
"description": "Ensure every ARIA progressbar node has an accessible name",
"help": "ARIA progressbar nodes must have an accessible name"
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-prohibited-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"id": "aria-prohibited-attr",
"impact": "serious",
"matches": "aria-allowed-attr-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"tags": [
"cat.aria",
"wcag2a",
"wcag412",
"EN-301-549",
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["5c01ea"],
"metadata": {
"description": "Ensure ARIA attributes are not prohibited for an element's role",
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-required-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"id": "aria-required-attr",
"impact": "critical",
"selector": "[role]",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"tags": [
"cat.aria",
"wcag2a",
"wcag412",
"EN-301-549",
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["4e8ab6"],
"metadata": {
"description": "Ensure elements with ARIA roles have all required ARIA attributes",
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-required-children.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"impact": "critical",
"selector": "[role]",
"matches": "aria-required-children-matches",
"tags": ["cat.aria", "wcag2a", "wcag131", "EN-301-549", "EN-9.1.3.1"],
"tags": [
"cat.aria",
"wcag2a",
"wcag131",
"EN-301-549",
"EN-9.1.3.1",
"RGAAv4",
"RGAA-9.3.1"
],
"actIds": ["bc4a75", "ff89c9"],
"metadata": {
"description": "Ensure elements with an ARIA role that require child roles contain them",
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-required-parent.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"impact": "critical",
"selector": "[role]",
"matches": "aria-required-parent-matches",
"tags": ["cat.aria", "wcag2a", "wcag131", "EN-301-549", "EN-9.1.3.1"],
"tags": [
"cat.aria",
"wcag2a",
"wcag131",
"EN-301-549",
"EN-9.1.3.1",
"RGAAv4",
"RGAA-9.3.1"
],
"actIds": ["ff89c9"],
"metadata": {
"description": "Ensure elements with an ARIA role that require parent roles are contained by them",
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-roles.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"impact": "critical",
"selector": "[role]",
"matches": "no-empty-role-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"tags": [
"cat.aria",
"wcag2a",
"wcag412",
"EN-301-549",
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["674b10"],
"metadata": {
"description": "Ensure all elements with a role attribute use a valid value",
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/aria-toggle-field-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"TT5.c",
"EN-301-549",
"EN-9.4.1.2",
"ACT"
"ACT",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["e086e5"],
"metadata": {
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-valid-attr-value.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"id": "aria-valid-attr-value",
"impact": "critical",
"matches": "aria-has-attr-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"tags": [
"cat.aria",
"wcag2a",
"wcag412",
"EN-301-549",
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["6a7281"],
"metadata": {
"description": "Ensure all ARIA attributes have valid values",
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/aria-valid-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"id": "aria-valid-attr",
"impact": "critical",
"matches": "aria-has-attr-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"tags": [
"cat.aria",
"wcag2a",
"wcag412",
"EN-301-549",
"EN-9.4.1.2",
"RGAAv4",
"RGAA-7.1.1"
],
"actIds": ["5f99a7"],
"metadata": {
"description": "Ensure attributes that begin with aria- are valid ARIA attributes",
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/autocomplete-valid.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"wcag135",
"EN-301-549",
"EN-9.1.3.5",
"ACT"
"ACT",
"RGAAv4",
"RGAA-11.13.1"
],
"actIds": ["73f2c2"],
"metadata": {
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/blink.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"TTv5",
"TT2.b",
"EN-301-549",
"EN-9.2.2.2"
"EN-9.2.2.2",
"RGAAv4",
"RGAA-13.8.1"
],
"metadata": {
"description": "Ensure <blink> elements are not used",
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/button-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"TT6.a",
"EN-301-549",
"EN-9.4.1.2",
"ACT"
"ACT",
"RGAAv4",
"RGAA-11.9.1"
],
"actIds": ["97a4e1", "m6b1q3"],
"metadata": {
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/bypass.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"TTv5",
"TT9.a",
"EN-301-549",
"EN-9.2.4.1"
"EN-9.2.4.1",
"RGAAv4",
"RGAA-12.7.1"
],
"actIds": ["cf77f2", "047fe0", "b40fd1", "3e12e1", "ye5d6e"],
"metadata": {
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/color-contrast.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"TT13.c",
"EN-301-549",
"EN-9.1.4.3",
"ACT"
"ACT",
"RGAAv4",
"RGAA-3.2.1"
],
"actIds": ["afw4f7", "09o5cg"],
"metadata": {
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/css-orientation-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"wcag21aa",
"EN-301-549",
"EN-9.1.3.4",
"RGAAv4",
"RGAA-13.9.1",
"experimental"
],
"actIds": ["b33eff"],
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/definition-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"impact": "serious",
"selector": "dl",
"matches": "no-role-matches",
"tags": ["cat.structure", "wcag2a", "wcag131", "EN-301-549", "EN-9.1.3.1"],
"tags": [
"cat.structure",
"wcag2a",
"wcag131",
"EN-301-549",
"EN-9.1.3.1",
"RGAAv4",
"RGAA-9.3.3"
],
"metadata": {
"description": "Ensure <dl> elements are structured correctly",
"help": "<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements"
Expand Down
10 changes: 9 additions & 1 deletion lib/rules/dlitem.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"impact": "serious",
"selector": "dd, dt",
"matches": "no-role-matches",
"tags": ["cat.structure", "wcag2a", "wcag131", "EN-301-549", "EN-9.1.3.1"],
"tags": [
"cat.structure",
"wcag2a",
"wcag131",
"EN-301-549",
"EN-9.1.3.1",
"RGAAv4",
"RGAA-9.3.3"
],
"metadata": {
"description": "Ensure <dt> and <dd> elements are contained by a <dl>",
"help": "<dt> and <dd> elements must be contained by a <dl>"
Expand Down
Loading