diff --git a/doc/rule-descriptions.md b/doc/rule-descriptions.md index b04f237bac..cfa3975ca9 100644 --- a/doc/rule-descriptions.md +++ b/doc/rule-descriptions.md @@ -43,6 +43,7 @@ | [duplicate-id](https://dequeuniversity.com/rules/axe/4.4/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.4/form-field-multiple-labels?application=RuleDescription) | Ensures form field does not have multiple label elements | Moderate | cat.forms, wcag2a, wcag332 | needs review | | | [frame-focusable-content](https://dequeuniversity.com/rules/axe/4.4/frame-focusable-content?application=RuleDescription) | Ensures <frame> and <iframe> elements with focusable content do not have tabindex=-1 | Serious | cat.keyboard, wcag2a, wcag211 | failure, needs review | [akn7bn](https://act-rules.github.io/rules/akn7bn) | +| [frame-title-unique](https://dequeuniversity.com/rules/axe/4.4/frame-title-unique?application=RuleDescription) | Ensures <iframe> and <frame> elements contain a unique title attribute | Serious | cat.text-alternatives, wcag412, wcag2a | needs review | [4b1c6c](https://act-rules.github.io/rules/4b1c6c) | | [frame-title](https://dequeuniversity.com/rules/axe/4.4/frame-title?application=RuleDescription) | Ensures <iframe> and <frame> elements have an accessible name | Serious | cat.text-alternatives, wcag2a, wcag412, section508, section508.22.i | failure, needs review | [cae760](https://act-rules.github.io/rules/cae760) | | [html-has-lang](https://dequeuniversity.com/rules/axe/4.4/html-has-lang?application=RuleDescription) | Ensures every HTML document has a lang attribute | Serious | cat.language, wcag2a, wcag311, ACT | failure | [b5c3f8](https://act-rules.github.io/rules/b5c3f8) | | [html-lang-valid](https://dequeuniversity.com/rules/axe/4.4/html-lang-valid?application=RuleDescription) | Ensures the lang attribute of the <html> element has a valid value | Serious | cat.language, wcag2a, wcag311, ACT | failure | [bf051a](https://act-rules.github.io/rules/bf051a) | @@ -90,7 +91,6 @@ Rules that do not necessarily conform to WCAG success criterion but are industry | [empty-heading](https://dequeuniversity.com/rules/axe/4.4/empty-heading?application=RuleDescription) | Ensures headings have discernible text | Minor | cat.name-role-value, best-practice | failure, needs review | [ffd0e9](https://act-rules.github.io/rules/ffd0e9) | | [empty-table-header](https://dequeuniversity.com/rules/axe/4.4/empty-table-header?application=RuleDescription) | Ensures table headers have discernible text | Minor | cat.name-role-value, best-practice | failure, needs review | | | [frame-tested](https://dequeuniversity.com/rules/axe/4.4/frame-tested?application=RuleDescription) | Ensures <iframe> and <frame> elements contain the axe-core script | Critical | cat.structure, review-item, best-practice | failure, needs review | | -| [frame-title-unique](https://dequeuniversity.com/rules/axe/4.4/frame-title-unique?application=RuleDescription) | Ensures <iframe> and <frame> elements contain a unique title attribute | Serious | cat.text-alternatives, best-practice | failure | [4b1c6c](https://act-rules.github.io/rules/4b1c6c) | | [heading-order](https://dequeuniversity.com/rules/axe/4.4/heading-order?application=RuleDescription) | Ensures the order of headings is semantically correct | Moderate | cat.semantics, best-practice | failure, needs review | | | [image-redundant-alt](https://dequeuniversity.com/rules/axe/4.4/image-redundant-alt?application=RuleDescription) | Ensure image alternative is not repeated as text | Minor | cat.text-alternatives, best-practice | failure | | | [label-title-only](https://dequeuniversity.com/rules/axe/4.4/label-title-only?application=RuleDescription) | Ensures that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes | Serious | cat.forms, best-practice | failure | | diff --git a/lib/core/base/rule.js b/lib/core/base/rule.js index 0564dcca83..abda44ade1 100644 --- a/lib/core/base/rule.js +++ b/lib/core/base/rule.js @@ -540,6 +540,22 @@ Rule.prototype.after = function after(result, options) { var option = getCheckOption(check, ruleID, options); var afterResults = check.after(beforeResults, option); + + if (this.reviewOnFail) { + afterResults.forEach(checkResult => { + const changeAnyAllResults = + (this.any.includes(checkResult.id) || + this.all.includes(checkResult.id)) && + checkResult.result === false; + const changeNoneResult = + this.none.includes(checkResult.id) && checkResult.result === true; + + if (changeAnyAllResults || changeNoneResult) { + checkResult.result = undefined; + } + }); + } + beforeResults.forEach(item => { // only add the node property for the check.after so we can // look at which iframe a check result came from, but we don't diff --git a/lib/rules/frame-title-unique.json b/lib/rules/frame-title-unique.json index b8adbce010..342b4ba43f 100644 --- a/lib/rules/frame-title-unique.json +++ b/lib/rules/frame-title-unique.json @@ -2,13 +2,14 @@ "id": "frame-title-unique", "selector": "frame[title], iframe[title]", "matches": "frame-title-has-text-matches", - "tags": ["cat.text-alternatives", "best-practice"], + "tags": ["cat.text-alternatives", "wcag412", "wcag2a"], "actIds": ["4b1c6c"], "metadata": { "description": "Ensures