diff --git a/accessibility-checker-engine/src/v4/checker/Checker.ts b/accessibility-checker-engine/src/v4/checker/Checker.ts index aaab4076e..78df46c9a 100644 --- a/accessibility-checker-engine/src/v4/checker/Checker.ts +++ b/accessibility-checker-engine/src/v4/checker/Checker.ts @@ -311,21 +311,27 @@ export class Checker implements IChecker { } for (const rsId of rsIds) { if (rsId in rsInfo) { - Object.keys(rsInfo[rsId]).forEach(code => { + const reCode = new RegExp(`(^|--)${reasonCode}($|--)`); + Object.keys(rsInfo[rsId]).forEach(code => { let level = null; - const reCode = new RegExp(`(^|--)${reasonCode}($|--)`); if (code === 'None') level = rsInfo[rsId]["None"]; else if (reCode.test(code)) - level = rsInfo[rsId][code]; - if (level === eRulePolicy.VIOLATION) { - retVal = eRulePolicy.VIOLATION; - } else if (level === eRulePolicy.RECOMMENDATION && retVal === null) { - retVal = eRulePolicy.RECOMMENDATION; - } else if (retVal === null) { - retVal = eRulePolicy.INFORMATION; - } - }); + level = rsInfo[rsId][code]; + + if (level !== null) { + if (level === eRulePolicy.VIOLATION) { + retVal = eRulePolicy.VIOLATION; + } else if (level === eRulePolicy.RECOMMENDATION && retVal === null) { + retVal = eRulePolicy.RECOMMENDATION; + } else if (retVal === null) { + retVal = eRulePolicy.INFORMATION; + } + } + }); + if (retVal === null) { + retVal = eRulePolicy.INFORMATION; + } } } } diff --git a/accessibility-checker-engine/src/v4/rules/aria_accessiblename_exists.ts b/accessibility-checker-engine/src/v4/rules/aria_accessiblename_exists.ts index 3bf34c013..4d6f6a7c9 100644 --- a/accessibility-checker-engine/src/v4/rules/aria_accessiblename_exists.ts +++ b/accessibility-checker-engine/src/v4/rules/aria_accessiblename_exists.ts @@ -14,9 +14,7 @@ import { Rule, RuleResult, RuleFail, RuleContext, RulePass, RuleContextHierarchy } from "../api/IRule"; import { eRulePolicy, eToolkitLevel } from "../api/IRule"; import { AriaUtil } from "../util/AriaUtil"; -import { CommonUtil } from "../util/CommonUtil"; import { VisUtil } from "../util/VisUtil"; -import { ARIADefinitions } from "../../v2/aria/ARIADefinitions"; import { AccNameUtil } from "../util/AccNameUtil"; export const aria_accessiblename_exists: Rule = { @@ -26,6 +24,7 @@ export const aria_accessiblename_exists: Rule = { "en-US": { "pass": "aria_accessiblename_exists.html", "fail_no_accessible_name": "aria_accessiblename_exists.html", + "fail_no_accessible_name_image": "aria_accessiblename_exists.html", "group": "aria_accessiblename_exists.html" } }, @@ -33,6 +32,7 @@ export const aria_accessiblename_exists: Rule = { "en-US": { "pass": "An accessible name is provided for the element", "fail_no_accessible_name": "Element <{0}> with \"{1}\" role has no accessible name", + "fail_no_accessible_name_image": "Element <{0}> with \"{1}\" role has no accessible name", "group": "Elements with certain roles should have accessible names" } }, @@ -40,9 +40,17 @@ export const aria_accessiblename_exists: Rule = { "id": ["IBM_Accessibility", "IBM_Accessibility_next", "WCAG_2_1", "WCAG_2_0", "WCAG_2_2"], "num": ["4.1.2"], "level": eRulePolicy.RECOMMENDATION, - "toolkitLevel": eToolkitLevel.LEVEL_ONE + "toolkitLevel": eToolkitLevel.LEVEL_ONE, + reasonCodes: ["fail_no_accessible_name"] + }, + { + "id": ["IBM_Accessibility", "IBM_Accessibility_next", "WCAG_2_1", "WCAG_2_0", "WCAG_2_2"], + "num": ["ARIA"], + "level": eRulePolicy.RECOMMENDATION, + "toolkitLevel": eToolkitLevel.LEVEL_ONE, + reasonCodes: ["fail_no_accessible_name_image"] }], - act: [], + act: [{"23a2a8": {"fail_no_accessible_name_image": "fail"}}], run: (context: RuleContext, options?: {}, contextHierarchies?: RuleContextHierarchy): RuleResult | RuleResult[] => { const ruleContext = context["dom"].node as Element; @@ -50,8 +58,8 @@ export const aria_accessiblename_exists: Rule = { if (VisUtil.isNodeHiddenFromAT(ruleContext)) return null; let nodeName = ruleContext.nodeName.toLocaleLowerCase(); - // svg element is handled in svg_graphics)labbelled rule - if (nodeName === 'svg') return; + // svg element is handled in svg_graphics_labbelled rule and image rules + if (nodeName === 'svg' || nodeName === 'img') return; // when table element with a caption as first child if (nodeName === 'table' @@ -69,9 +77,11 @@ export const aria_accessiblename_exists: Rule = { let role = AriaUtil.getResolvedRole(ruleContext); const name_pair = AccNameUtil.computeAccessibleName(ruleContext); - if (!name_pair || !name_pair.name || name_pair.name.trim().length === 0) + if (!name_pair || !name_pair.name || name_pair.name.trim().length === 0) { + if (role === 'img' || role === 'image') + return RuleFail("fail_no_accessible_name_image", [ruleContext.nodeName.toLowerCase(), role]); return RuleFail("fail_no_accessible_name", [ruleContext.nodeName.toLowerCase(), role]); - + } return RulePass("pass"); } } diff --git a/accessibility-checker-engine/src/v4/rules/img_alt_null.ts b/accessibility-checker-engine/src/v4/rules/img_alt_null.ts index 4b108d034..8c607ad84 100644 --- a/accessibility-checker-engine/src/v4/rules/img_alt_null.ts +++ b/accessibility-checker-engine/src/v4/rules/img_alt_null.ts @@ -45,8 +45,17 @@ export const img_alt_null: Rule = { "id": ["IBM_Accessibility", "IBM_Accessibility_next", "WCAG_2_1", "WCAG_2_0", "WCAG_2_2"], "num": ["1.1.1"], "level": eRulePolicy.VIOLATION, - "toolkitLevel": eToolkitLevel.LEVEL_ONE - }], + "toolkitLevel": eToolkitLevel.LEVEL_ONE, + reasonCodes: ["fail_decorative"] + }, + { + "id": ["IBM_Accessibility", "IBM_Accessibility_next", "WCAG_2_1", "WCAG_2_0", "WCAG_2_2"], + "num": ["ARIA"], + "level": eRulePolicy.VIOLATION, + "toolkitLevel": eToolkitLevel.LEVEL_ONE, + reasonCodes: ["potential_aria_override"] + } + ], act: [{"46ca7f": {"potential_aria_override": "fail"}}], run: (context: RuleContext, options?: {}, contextHierarchies?: RuleContextHierarchy): RuleResult | RuleResult[] => { const ruleContext = context["dom"].node as Element; diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_accessiblename_exists_ruleunit/aria_imge.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_accessiblename_exists_ruleunit/aria_imge.html index 7a06f4120..b5a5f36c3 100755 --- a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_accessiblename_exists_ruleunit/aria_imge.html +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_accessiblename_exists_ruleunit/aria_imge.html @@ -33,22 +33,7 @@ UnitTest = { ruleIds: ["aria_accessiblename_exists"], results: [ - { - "ruleId": "aria_accessiblename_exists", - "value": [ - "INFORMATION", - "PASS" - ], - "path": { - "dom": "/html[1]/body[1]/img[1]", - "aria": "/document[1]/img[1]" - }, - "reasonId": "pass", - "message": "An accessible name is provided for the element", - "messageArgs": [], - "apiArgs": [], - "category": "Accessibility" - } + ] } diff --git a/accessibility-checker/test/baselines/Baseline_aChecker.Baseline.html.json b/accessibility-checker/test/baselines/Baseline_aChecker.Baseline.html.json index 67d335c32..25a6c138c 100644 --- a/accessibility-checker/test/baselines/Baseline_aChecker.Baseline.html.json +++ b/accessibility-checker/test/baselines/Baseline_aChecker.Baseline.html.json @@ -23,8 +23,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": true, "level": "violation", + "ignored": true, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/html_lang_exists.html#%7B%22message%22%3A%22Page%20detected%20as%20HTML%2C%20but%20does%20not%20have%20a%20'lang'%20attribute%22%2C%22snippet%22%3A%22%3Chtml%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22FAIL%22%5D%2C%22reasonId%22%3A%22Fail_3%22%2C%22ruleId%22%3A%22html_lang_exists%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -50,8 +50,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": true, "level": "potentialviolation", + "ignored": true, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/html_skipnav_exists.html#%7B%22message%22%3A%22Verify%20there%20is%20a%20way%20to%20bypass%20blocks%20of%20content%20that%20are%20repeated%20on%20multiple%20Web%20pages%22%2C%22snippet%22%3A%22%3Chtml%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22POTENTIAL%22%5D%2C%22reasonId%22%3A%22Potential_1%22%2C%22ruleId%22%3A%22html_skipnav_exists%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -77,8 +77,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": true, "level": "violation", + "ignored": true, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/page_title_exists.html#%7B%22message%22%3A%22Missing%20%3Ctitle%3E%20element%20in%20%3Chead%3E%20element%22%2C%22snippet%22%3A%22%3Chtml%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22FAIL%22%5D%2C%22reasonId%22%3A%22Fail_2%22%2C%22ruleId%22%3A%22page_title_exists%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -91,7 +91,7 @@ "dom": "/html[1]", "aria": "/document[1]" }, - "ruleTime": 0, + "ruleTime": 1, "reasonId": "Pass_0", "message": "Rule Passed", "messageArgs": [], @@ -104,8 +104,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/aria_content_in_landmark.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Chtml%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22aria_content_in_landmark%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -131,8 +131,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/img_alt_background.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Chtml%3E%22%2C%22value%22%3A%5B%22RECOMMENDATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22img_alt_background%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -158,8 +158,8 @@ }, "snippet": "
", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/aria_content_in_landmark.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Chead%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22aria_content_in_landmark%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -172,7 +172,7 @@ "dom": "/html[1]/body[1]", "aria": "/document[1]" }, - "ruleTime": 0, + "ruleTime": 1, "reasonId": "Fail_1", "message": "The page does not provide a way to quickly navigate to the main content (ARIA \"main\" landmark or a skip link)", "messageArgs": [], @@ -185,8 +185,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": true, "level": "violation", + "ignored": true, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/skip_main_exists.html#%7B%22message%22%3A%22The%20page%20does%20not%20provide%20a%20way%20to%20quickly%20navigate%20to%20the%20main%20content%20(ARIA%20%5C%22main%5C%22%20landmark%20or%20a%20skip%20link)%22%2C%22snippet%22%3A%22%3Cbody%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22FAIL%22%5D%2C%22reasonId%22%3A%22Fail_1%22%2C%22ruleId%22%3A%22skip_main_exists%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -212,8 +212,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/aria_content_in_landmark.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cbody%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22aria_content_in_landmark%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -239,8 +239,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/img_alt_background.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cbody%3E%22%2C%22value%22%3A%5B%22RECOMMENDATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22img_alt_background%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -253,7 +253,7 @@ "dom": "/html[1]/body[1]", "aria": "/document[1]" }, - "ruleTime": 1, + "ruleTime": 0, "reasonId": "Pass_0", "message": "Rule Passed", "messageArgs": [], @@ -266,8 +266,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/text_quoted_correctly.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cbody%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22text_quoted_correctly%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -280,7 +280,7 @@ "dom": "/html[1]/body[1]", "aria": "/document[1]" }, - "ruleTime": 1, + "ruleTime": 0, "reasonId": "pass", "message": "Rule Passed", "messageArgs": [], @@ -293,8 +293,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/text_whitespace_valid.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cbody%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22pass%22%2C%22ruleId%22%3A%22text_whitespace_valid%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -320,8 +320,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/img_alt_misuse.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22img_alt_misuse%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -347,8 +347,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": true, "level": "violation", + "ignored": true, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/img_alt_valid.html#%7B%22message%22%3A%22The%20image%20has%20neither%20an%20accessible%20name%20nor%20is%20marked%20as%20decorative%20or%20redundant%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22FAIL%22%5D%2C%22reasonId%22%3A%22fail_no_alt%22%2C%22ruleId%22%3A%22img_alt_valid%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -374,8 +374,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/aria_content_in_landmark.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22aria_content_in_landmark%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -388,7 +388,7 @@ "dom": "/html[1]/body[1]/img[1]", "aria": "/document[1]/img[1]" }, - "ruleTime": 0, + "ruleTime": 1, "reasonId": "Pass_0", "message": "Rule Passed", "messageArgs": [], @@ -401,8 +401,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/element_id_unique.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22element_id_unique%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -428,8 +428,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/img_alt_background.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22RECOMMENDATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22img_alt_background%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -455,8 +455,8 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/text_quoted_correctly.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22text_quoted_correctly%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { @@ -482,39 +482,9 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", - "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/text_whitespace_valid.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22pass%22%2C%22ruleId%22%3A%22text_whitespace_valid%22%2C%22msgArgs%22%3A%5B%5D%7D" - }, - { - "ruleId": "aria_accessiblename_exists", - "value": [ - "RECOMMENDATION", - "FAIL" - ], - "path": { - "dom": "/html[1]/body[1]/img[1]", - "aria": "/document[1]/img[1]" - }, - "ruleTime": 0, - "reasonId": "fail_no_accessible_name", - "message": "Element with \"img\" role has no accessible name", - "messageArgs": [ - "img", - "img" - ], - "apiArgs": [], - "bounds": { - "left": 8, - "top": 8, - "height": 0, - "width": 0 - }, - "snippet": "", - "category": "Accessibility", "ignored": false, - "level": "recommendation", - "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/aria_accessiblename_exists.html#%7B%22message%22%3A%22Element%20%3Cimg%3E%20with%20%5C%22img%5C%22%20role%20has%20no%20accessible%20name%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22RECOMMENDATION%22%2C%22FAIL%22%5D%2C%22reasonId%22%3A%22fail_no_accessible_name%22%2C%22ruleId%22%3A%22aria_accessiblename_exists%22%2C%22msgArgs%22%3A%5B%22img%22%2C%22img%22%5D%7D" + "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/text_whitespace_valid.html#%7B%22message%22%3A%22Rule%20Passed%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22pass%22%2C%22ruleId%22%3A%22text_whitespace_valid%22%2C%22msgArgs%22%3A%5B%5D%7D" }, { "ruleId": "aria_descendant_valid", @@ -526,7 +496,7 @@ "dom": "/html[1]/body[1]/img[1]", "aria": "/document[1]/img[1]" }, - "ruleTime": 0, + "ruleTime": 1, "reasonId": "pass", "message": "The element contains valid descendants", "messageArgs": [], @@ -539,13 +509,13 @@ }, "snippet": "", "category": "Accessibility", - "ignored": false, "level": "pass", + "ignored": false, "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/aria_descendant_valid.html#%7B%22message%22%3A%22The%20element%20contains%20valid%20descendants%22%2C%22snippet%22%3A%22%3Cimg%20id%3D%5C%22ace%5C%22%20src%3D%5C%22fail.png%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22pass%22%2C%22ruleId%22%3A%22aria_descendant_valid%22%2C%22msgArgs%22%3A%5B%5D%7D" } ], - "numExecuted": 20, - "ruleTime": 2, + "numExecuted": 19, + "ruleTime": 4, "nls": { "html_lang_exists": { "0": "Page must identify the default language of the document with a 'lang' attribute", @@ -591,10 +561,6 @@ "0": "Element 'id' attribute values must be unique within a document", "Pass_0": "Rule Passed" }, - "aria_accessiblename_exists": { - "0": "Elements with certain roles should have accessible names", - "fail_no_accessible_name": "Element <{0}> with \"{1}\" role has no accessible name" - }, "aria_descendant_valid": { "0": "Browsers ignore the explicit and implicit ARIA roles of the descendants of certain elements", "pass": "The element contains valid descendants" @@ -602,18 +568,18 @@ }, "summary": { "counts": { + "ignored": 5, + "elements": 4, + "elementsViolation": 0, + "elementsViolationReview": 0, "violation": 0, "potentialviolation": 0, - "recommendation": 1, + "recommendation": 0, "potentialrecommendation": 0, "manual": 0, - "pass": 14, - "ignored": 5, - "elements": 4, - "elementsViolation": 0, - "elementsViolationReview": 0 + "pass": 14 }, - "scanTime": 28, + "scanTime": 41, "ruleArchive": "Preview Rules (preview)", "policies": [ "IBM_Accessibility", @@ -627,10 +593,10 @@ "manual", "pass" ], - "startScan": 1729695667976, + "startScan": 1733103906113, "URL": "data:text/html;charset=utf-8,%3C!--%0A%20%20%20%20%20%2F******************************************************************************%0A%20%20%20%20%20Copyright%3A%3A%202020-%20IBM%2C%20Inc%0A%0A%20%20%20%20Licensed%20under%20the%20Apache%20License%2C%20Version%202.0%20(the%20%22License%22)%3B%0A%20%20%20%20you%20may%20not%20use%20this%20file%20except%20in%20compliance%20with%20the%20License.%0A%20%20%20%20You%20may%20obtain%20a%20copy%20of%20the%20License%20at%0A%0A%20%20%20%20http%3A%2F%2Fwww.apache.org%2Flicenses%2FLICENSE-2.0%0A%0A%20%20%20%20Unless%20required%20by%20applicable%20law%20or%20agreed%20to%20in%20writing%2C%20software%0A%20%20%20%20distributed%20under%20the%20License%20is%20distributed%20on%20an%20%22AS%20IS%22%20BASIS%2C%0A%20%20%20%20WITHOUT%20WARRANTIES%20OR%20CONDITIONS%20OF%20ANY%20KIND%2C%20either%20express%20or%20implied.%0A%20%20%20%20See%20the%20License%20for%20the%20specific%20language%20governing%20permissions%20and%0A%20%20%20%20limitations%20under%20the%20License.%0A%20%20*****************************************************************************%2F%0A%0A--%3E%20%20%20%20%0A%20%20%20%20%3Chtml%3E%0A%20%20%20%20%3Cbody%3E%0A%20%20%20%20%20%20%20%20%3Cimg%20src%3D%22fail.png%22%20id%3D%22ace%22%3E%0A%20%20%20%20%3C%2Fbody%3E%0A%3C%2Fhtml%3E" }, - "scanID": "773dc15c-5eb9-43e3-886c-4a0c472ab819", + "scanID": "e069e82d-c157-4c5d-9ba5-bf8f5346c8ec", "toolID": "accessibility-checker-v3.0.0", "label": "Baseline_aChecker.Baseline.html" } \ No newline at end of file diff --git a/accessibility-checker/test/baselines/JSONObjectStructureVerification.html.json b/accessibility-checker/test/baselines/JSONObjectStructureVerification.html.json index 7ff700c3e..67bee4836 100644 --- a/accessibility-checker/test/baselines/JSONObjectStructureVerification.html.json +++ b/accessibility-checker/test/baselines/JSONObjectStructureVerification.html.json @@ -1,72 +1,43 @@ { "results": [ { - "ruleId": "html_lang_valid", - "value": [ - "VIOLATION", - "PASS" - ], - "path": { - "dom": "/html[1]", - "aria": "/document[1]" - }, - "ruleTime": 0, - "reasonId": "Pass_0", - "message": "Lang has a valid primary lang and conforms to BCP 47", - "messageArgs": [], - "apiArgs": [], - "bounds": { - "left": 0, - "top": 0, - "height": 144, - "width": 800 - }, - "snippet": "", - "category": "Accessibility", - "level": "pass", - "ignored": false, - "help": "https://able.ibm.com/rules/archives/preview/doc/en-US/html_lang_valid.html#%7B%22message%22%3A%22Lang%20has%20a%20valid%20primary%20lang%20and%20conforms%20to%20BCP%2047%22%2C%22snippet%22%3A%22%3Chtml%20lang%3D%5C%22en%5C%22%3E%22%2C%22value%22%3A%5B%22VIOLATION%22%2C%22PASS%22%5D%2C%22reasonId%22%3A%22Pass_0%22%2C%22ruleId%22%3A%22html_lang_valid%22%2C%22msgArgs%22%3A%5B%5D%7D" - }, - { - "ruleId": "html_lang_exists", + "ruleId": "page_title_valid", "value": [ "VIOLATION", "PASS" ], "path": { - "dom": "/html[1]", + "dom": "/html[1]/head[1]/title[1]", "aria": "/document[1]" }, - "ruleTime": 0, "reasonId": "Pass_0", - "message": "Page language detected as \"en\"", + "message": "Rule Passed", "messageArgs": [ - "en" + "Helo World" ], "apiArgs": [], "bounds": { "left": 0, "top": 0, - "height": 144, - "width": 800 + "height": 0, + "width": 0 }, - "snippet": "", + "snippet": "