From 733c45e6a40a9f8ff6e75f7db864edff0b404ca2 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Thu, 29 Jun 2023 12:20:59 +0200 Subject: [PATCH] feat: deprecate & disable duplicate-id / duplicate-id-active (#4071) * feat: deprecate & disable duplicate-id / duplicate-id-active * Use wcag2a-obsolete tag --- doc/API.md | 35 +++++++++++++++--------------- doc/rule-descriptions.md | 4 ++-- lib/rules/duplicate-id-active.json | 3 ++- lib/rules/duplicate-id.json | 3 ++- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/doc/API.md b/doc/API.md index 9355005820..02194573d2 100644 --- a/doc/API.md +++ b/doc/API.md @@ -76,23 +76,24 @@ Each rule in axe-core has a number of tags. These provide metadata about the rul The `experimental`, `ACT`, `TT`, and `section508` tags are only added to some rules. Each rule with a `section508` tag also has a tag to indicate what requirement in old Section 508 the rule is required by. For example `section508.22.a`. -| Tag Name | Accessibility Standard / Purpose | -| ---------------- | ---------------------------------------------------- | -| `wcag2a` | WCAG 2.0 Level A | -| `wcag2aa` | WCAG 2.0 Level AA | -| `wcag2aaa` | WCAG 2.0 Level AAA | -| `wcag21a` | WCAG 2.1 Level A | -| `wcag21aa` | WCAG 2.1 Level AA | -| `wcag22aa` | WCAG 2.2 Level AA | -| `best-practice` | Common accessibility best practices | -| `wcag***` | WCAG success criterion e.g. wcag111 maps to SC 1.1.1 | -| `ACT` | W3C approved Accessibility Conformance Testing rules | -| `section508` | Old Section 508 rules | -| `section508.*.*` | Requirement in old Section 508 | -| `TTv5` | Trusted Tester v5 rules | -| `TT*.*` | Test ID in Trusted Tester | -| `experimental` | Cutting-edge rules, disabled by default | -| `cat.*` | Category mappings used by Deque (see below) | +| Tag Name | Accessibility Standard / Purpose | +| ----------------- | ---------------------------------------------------- | +| `wcag2a` | WCAG 2.0 Level A | +| `wcag2aa` | WCAG 2.0 Level AA | +| `wcag2aaa` | WCAG 2.0 Level AAA | +| `wcag21a` | WCAG 2.1 Level A | +| `wcag21aa` | WCAG 2.1 Level AA | +| `wcag22aa` | WCAG 2.2 Level AA | +| `best-practice` | Common accessibility best practices | +| `wcag2a-obsolete` | WCAG 2.0 Level A, no longer required for conformance | +| `wcag***` | WCAG success criterion e.g. wcag111 maps to SC 1.1.1 | +| `ACT` | W3C approved Accessibility Conformance Testing rules | +| `section508` | Old Section 508 rules | +| `section508.*.*` | Requirement in old Section 508 | +| `TTv5` | Trusted Tester v5 rules | +| `TT*.*` | Test ID in Trusted Tester | +| `experimental` | Cutting-edge rules, disabled by default | +| `cat.*` | Category mappings used by Deque (see below) | All rules have a `cat.*` tag, which indicates what type of content it is part of. The following `cat.*` tags exist in axe-core: diff --git a/doc/rule-descriptions.md b/doc/rule-descriptions.md index 684fa0bfe6..100c036441 100644 --- a/doc/rule-descriptions.md +++ b/doc/rule-descriptions.md @@ -37,9 +37,7 @@ | [definition-list](https://dequeuniversity.com/rules/axe/4.7/definition-list?application=RuleDescription) | Ensures <dl> elements are structured correctly | Serious | cat.structure, wcag2a, wcag131 | failure | | | [dlitem](https://dequeuniversity.com/rules/axe/4.7/dlitem?application=RuleDescription) | Ensures <dt> and <dd> elements are contained by a <dl> | Serious | cat.structure, wcag2a, wcag131 | failure | | | [document-title](https://dequeuniversity.com/rules/axe/4.7/document-title?application=RuleDescription) | Ensures each HTML document contains a non-empty <title> element | Serious | cat.text-alternatives, wcag2a, wcag242, ACT, TTv5, TT12.a | failure | [2779a5](https://act-rules.github.io/rules/2779a5) | -| [duplicate-id-active](https://dequeuniversity.com/rules/axe/4.7/duplicate-id-active?application=RuleDescription) | Ensures every id attribute value of active elements is unique | Serious | cat.parsing, wcag2a, wcag411 | failure | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) | | [duplicate-id-aria](https://dequeuniversity.com/rules/axe/4.7/duplicate-id-aria?application=RuleDescription) | Ensures every id attribute value used in ARIA and in labels is unique | Critical | cat.parsing, wcag2a, wcag411 | failure | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) | -| [duplicate-id](https://dequeuniversity.com/rules/axe/4.7/duplicate-id?application=RuleDescription) | Ensures every id attribute value is unique | Minor | cat.parsing, wcag2a, wcag411 | failure | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) | | [form-field-multiple-labels](https://dequeuniversity.com/rules/axe/4.7/form-field-multiple-labels?application=RuleDescription) | Ensures form field does not have multiple label elements | Moderate | cat.forms, wcag2a, wcag332, TTv5, TT5.c | needs review | | | [frame-focusable-content](https://dequeuniversity.com/rules/axe/4.7/frame-focusable-content?application=RuleDescription) | Ensures <frame> and <iframe> elements with focusable content do not have tabindex=-1 | Serious | cat.keyboard, wcag2a, wcag211, TTv5, TT4.a | failure, needs review | [akn7bn](https://act-rules.github.io/rules/akn7bn) | | [frame-title-unique](https://dequeuniversity.com/rules/axe/4.7/frame-title-unique?application=RuleDescription) | Ensures <iframe> and <frame> elements contain a unique title attribute | Serious | cat.text-alternatives, wcag412, wcag2a, TTv5, TT12.d | needs review | [4b1c6c](https://act-rules.github.io/rules/4b1c6c) | @@ -153,3 +151,5 @@ Deprecated rules are disabled by default and will be removed in the next major r | :----------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :------- | :--------------------------------------------------------------------------- | :------------------------- | :----------------------------------------------------------------------------------------------------- | | [aria-roledescription](https://dequeuniversity.com/rules/axe/4.7/aria-roledescription?application=RuleDescription) | Ensure aria-roledescription is only used on elements with an implicit or explicit role | Serious | cat.aria, wcag2a, wcag412, deprecated | failure, needs review | | | [audio-caption](https://dequeuniversity.com/rules/axe/4.7/audio-caption?application=RuleDescription) | Ensures <audio> elements have captions | Critical | cat.time-and-media, wcag2a, wcag121, section508, section508.22.a, deprecated | needs review | [2eb176](https://act-rules.github.io/rules/2eb176), [afb423](https://act-rules.github.io/rules/afb423) | +| [duplicate-id-active](https://dequeuniversity.com/rules/axe/4.7/duplicate-id-active?application=RuleDescription) | Ensures every id attribute value of active elements is unique | Serious | cat.parsing, wcag2a-obsolete, wcag411, deprecated | failure | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) | +| [duplicate-id](https://dequeuniversity.com/rules/axe/4.7/duplicate-id?application=RuleDescription) | Ensures every id attribute value is unique | Minor | cat.parsing, wcag2a-obsolete, wcag411, deprecated | failure | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) | diff --git a/lib/rules/duplicate-id-active.json b/lib/rules/duplicate-id-active.json index 6edfbc5277..94f62e122b 100644 --- a/lib/rules/duplicate-id-active.json +++ b/lib/rules/duplicate-id-active.json @@ -3,7 +3,8 @@ "selector": "[id]", "matches": "duplicate-id-active-matches", "excludeHidden": false, - "tags": ["cat.parsing", "wcag2a", "wcag411"], + "tags": ["cat.parsing", "wcag2a-obsolete", "wcag411", "deprecated"], + "enabled": false, "actIds": ["3ea0c8"], "metadata": { "description": "Ensures every id attribute value of active elements is unique", diff --git a/lib/rules/duplicate-id.json b/lib/rules/duplicate-id.json index 5068a41a0f..f24644cdf5 100644 --- a/lib/rules/duplicate-id.json +++ b/lib/rules/duplicate-id.json @@ -3,7 +3,8 @@ "selector": "[id]", "matches": "duplicate-id-misc-matches", "excludeHidden": false, - "tags": ["cat.parsing", "wcag2a", "wcag411"], + "tags": ["cat.parsing", "wcag2a-obsolete", "wcag411", "deprecated"], + "enabled": false, "actIds": ["3ea0c8"], "metadata": { "description": "Ensures every id attribute value is unique",