diff --git a/accessibility-checker-engine/src/v2/checker/accessibility/util/legacy.ts b/accessibility-checker-engine/src/v2/checker/accessibility/util/legacy.ts index e06e8130c..57a1a16fb 100644 --- a/accessibility-checker-engine/src/v2/checker/accessibility/util/legacy.ts +++ b/accessibility-checker-engine/src/v2/checker/accessibility/util/legacy.ts @@ -557,73 +557,81 @@ export class RPTUtil { // an inline element is inside a block. note is a block element too if (display === 'block' || display === 'inline-block') { let containText = false; - // one or more inline elements with text in the same line: text, text, +text, +text, text+ + // one or more inline elements with text in the same line: , text, text, +text, +text, text+ let walkNode = element.nextSibling; let last = true; - while (!containText && walkNode) { + while (walkNode) { // note browsers insert Text nodes to represent whitespaces. - if (walkNode.nodeType === Node.TEXT_NODE && walkNode.nodeValue && walkNode.nodeValue.trim().length > 0) { + if (!containText && walkNode.nodeType === Node.TEXT_NODE && walkNode.nodeValue && walkNode.nodeValue.trim().length > 0) { containText = true; } else if (walkNode.nodeType === Node.ELEMENT_NODE) { - // special case:
is styled 'inline' by default, but change the line - if (walkNode.nodeName.toLowerCase() === 'br') break; - const cStyle = getComputedStyle(walkNode); - const cDisplay = cStyle.getPropertyValue("display"); console.log("target id=" + element.getAttribute("id") +", node id=" + walkNode.getAttribute("id")+", bounds=" + JSON.stringify(bounds)); - if (cDisplay === 'inline') { - last = false; - if (RPTUtil.isTarget(walkNode) && bounds.width < 24) { - // check if the horizontal spacing is sufficient - const bnds = mapper.getBounds(walkNode); console.log("target id=" + element.getAttribute("id") +", node id=" + walkNode.getAttribute("id")+", bounds=" + JSON.stringify(bounds)+", bnds=" + JSON.stringify(bnds)); - if (Math.round(bounds.width/2) + bnds.left - (bounds.left + bounds.width) < 24) - status.violation = walkNode.nodeName.toLowerCase(); - } - } else - break; + if (status.violation === null) { + // special case:
is styled 'inline' by default, but change the line + if (walkNode.nodeName.toLowerCase() === 'br') break; + const cStyle = getComputedStyle(walkNode); + const cDisplay = cStyle.getPropertyValue("display"); console.log("target id=" + element.getAttribute("id") +", node id=" + walkNode.getAttribute("id")+", bounds=" + JSON.stringify(bounds)); + if (cDisplay === 'inline') { + last = false; + if (RPTUtil.isTarget(walkNode) && bounds.width < 24) { + // check if the horizontal spacing is sufficient + const bnds = mapper.getBounds(walkNode); console.log("target id=" + element.getAttribute("id") +", node id=" + walkNode.getAttribute("id")+", bounds=" + JSON.stringify(bounds)+", bnds=" + JSON.stringify(bnds)); + if (Math.round(bounds.width/2) + bnds.left - (bounds.left + bounds.width) < 24) + status.violation = walkNode.nodeName.toLowerCase(); + } + } else + break; + } } walkNode = walkNode.nextSibling; } - // the element is the last inline element in the line, check against parent bounds - if (last && status.violation === null) { - const bnds = mapper.getBounds(parent); - if (Math.round(bounds.width/2) + bnds.left - (bounds.left + bounds.width) < 24) - status.violation = parent.nodeName.toLowerCase(); - } - if (!containText && status.violation === null) { - walkNode = element.previousSibling; - last = true; - while (!containText && walkNode) { - // note browsers insert Text nodes to represent whitespaces. - if (walkNode.nodeType === Node.TEXT_NODE && walkNode.nodeValue && walkNode.nodeValue.trim().length > 0) { - containText = true; - } else if (walkNode.nodeType === Node.ELEMENT_NODE) { + + walkNode = element.previousSibling; + let first = true; + let checked = false; + while (walkNode) { + // note browsers insert Text nodes to represent whitespaces. + if (!containText && walkNode.nodeType === Node.TEXT_NODE && walkNode.nodeValue && walkNode.nodeValue.trim().length > 0) { + containText = true; + } else if (walkNode.nodeType === Node.ELEMENT_NODE) { + if (!checked) { // special case:
is styled 'inline' by default, but change the line if (walkNode.nodeName.toLowerCase() === 'br') break; const cStyle = getComputedStyle(walkNode); const cDisplay = cStyle.getPropertyValue("display"); if (cDisplay === 'inline') { - last = false; + first = false; + checked = true; if (RPTUtil.isTarget(walkNode) && bounds.width < 24) { // check if the horizontal spacing is sufficient const bnds = mapper.getBounds(walkNode); if (Math.round(bounds.width/2) + bounds.left - (bnds.left + bnds.width) < 24) { - status.violation = (status.violation === null ? walkNode.nodeName.toLowerCase() : status.violation + ", " + walkNode.nodeName.toLowerCase()); + status.violation = status.violation === null ? walkNode.nodeName.toLowerCase() : status.violation + ", " + walkNode.nodeName.toLowerCase(); } } - } else - break; - } - walkNode = walkNode.previousSibling; + } else + break; + } } - } - // the element is the last inline element in the line, check against parent bounds - if (last) { - const bnds = mapper.getBounds(parent); - if (Math.round(bounds.width/2) + bounds.left - (bnds.left + bnds.width) < 24) - status.violation = parent.nodeName.toLowerCase(); + walkNode = walkNode.previousSibling; } - + // one or more inline elements are in the same line with text - if (containText) status.inline = true; + if (containText) { + status.inline = true; + + const bnds = mapper.getBounds(parent); + // the element is the last inline element in the line, check against parent bounds + if (last) { + if (Math.round(bounds.width/2) + bnds.left+bnds.width - (bounds.left + bounds.width) < 24) + status.violation = status.violation === null ? parent.nodeName.toLowerCase() : status.violation + ", " + parent.nodeName.toLowerCase(); + + } + // the element is the last inline element in the line, check against parent bounds + if (first && checked) { + if (Math.round(bounds.width/2) + bounds.left - bnds.left < 24) + status.violation = status.violation === null ? parent.nodeName.toLowerCase() : status.violation + ", " + parent.nodeName.toLowerCase(); + } + } return status; } } diff --git a/accessibility-checker-engine/src/v4/rules/target_spacing_sufficient.ts b/accessibility-checker-engine/src/v4/rules/target_spacing_sufficient.ts index 7e3480c20..3dc0e3147 100644 --- a/accessibility-checker-engine/src/v4/rules/target_spacing_sufficient.ts +++ b/accessibility-checker-engine/src/v4/rules/target_spacing_sufficient.ts @@ -42,7 +42,7 @@ "pass_inline": "The target is in a sentence or its size is otherwise constrained by the line-height of non-target text", "pass_default": "The size of the target is determined by the user agent and is not modified by the author", "violation_spacing": "The center of the target '{0}' is less than 12 CSS pixels from the bounding box (edge) of an adjacent target '{1}'", - "recommendation_inline": "Confirm the inline target '{0}' is sufficiently spaced from other inline target '{1}'", + "recommendation_inline": "Confirm the inline target '{0}' is sufficiently spaced from aother inline target '{1}'", "potential_overlap": "Ensure the overlapped element '{0}' meets a minimum target size or has sufficient spacing from the overlapping element '{1}'" } }, @@ -105,7 +105,7 @@ return null; - const mapper : DOMMapper = new DOMMapper(); + const mapper : DOMMapper = new DOMMapper(); console.log("target node id=" + ruleContext.getAttribute("id") +", calculated bounds=" + JSON.stringify(mapper.getBounds(ruleContext))); let before = true; let minX = 24; let minY = 24; @@ -137,40 +137,48 @@ if (!z_index || isNaN(Number(z_index))) z_index = "0"; } - - // case 2: the element covers the target entirely + + console.log("target id=" + ruleContext.getAttribute('id') + ", elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); + // case 2: the element overlaps the target entirely if (bnds.top <= bounds.top && bnds.left <= bounds.left && bnds.top + bnds.height >= bounds.top + bounds.height - && bnds.left + bnds.height >= bounds.left + bounds.width) { - // if the element on top - if (before ? parseInt(zindex) < parseInt(z_index): parseInt(zindex) <= parseInt(z_index)) { + && bnds.left + bnds.width >= bounds.left + bounds.width) { console.log("element covers target id=" + ruleContext.getAttribute('id') + ", elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); + // if the target on top + if (before ? parseInt(zindex) < parseInt(z_index): parseInt(zindex) <= parseInt(z_index)) { console.log("ignore due to element covers target id=" + ruleContext.getAttribute('id') + ", elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); // the target is entirely covered: tabbable target handled by element_tabbable_unobscured and tabindex=-1 ignored return null; - } else { + } else { console.log("further check size: element covers target id=" + ruleContext.getAttribute('id') + ", elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); if (bounds.height >= 24 && bounds.width >= 24) return RulePass("pass_sized"); - return RuleFail("violation_spacing", [nodeName, elem.nodeName.toLowerCase()]); + return RulePotential("potential_overlap", [nodeName, elem.nodeName.toLowerCase()]); } } - // case 3: if the target covers the element entirely + // case 3: if the target overlaps the element entirely if (bounds.top <= bnds.top && bounds.left <= bnds.left && bounds.top + bounds.height >= bnds.top + bnds.height - && bounds.left + bounds.height >= bnds.left + bnds.width) { - // if the target on top - if (before ? parseInt(zindex) > parseInt(z_index): parseInt(zindex) >= parseInt(z_index)) { + && bounds.left + bounds.width >= bnds.left + bnds.width) { console.log("element covered by target id=" + ruleContext.getAttribute('id') + ", elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); + // if the element on top + if (before ? parseInt(zindex) > parseInt(z_index): parseInt(zindex) >= parseInt(z_index)) {console.log("element on top id=" + ruleContext.getAttribute('id') + ", elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); + return RulePotential("potential_overlap", [nodeName, elem.nodeName.toLowerCase()]); + } else { if (bnds.height >= 24 && bnds.width >= 24) return RulePass("pass_sized"); return RuleFail("violation_spacing", [nodeName, elem.nodeName.toLowerCase()]); - } else - continue; + } } - console.log("target id=" + ruleContext.getAttribute('id') + ", elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); + // case 4: the element overlaps partially with the target - if (((bounds.top >= bnds.top && bounds.top <= bnds.top + bnds.height) || (bounds.top <= bnds.top && bounds.top + bounds.height > bnds.top)) - && ((bounds.left >= bnds.left && bounds.left <= bnds.left + bnds.width) || (bounds.left <= bnds.left && bounds.left + bounds.width > bnds.left))) { console.log("target id=" + ruleContext.getAttribute('id') + ", overlap elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); + //if (((bounds.top >= bnds.top && bounds.top <= bnds.top + bnds.height) || (bounds.top <= bnds.top && bounds.top + bounds.height > bnds.top)) + // && ((bounds.left >= bnds.left && bounds.left <= bnds.left + bnds.width) || (bounds.left <= bnds.left && bounds.left + bounds.width > bnds.left))) { console.log("target id=" + ruleContext.getAttribute('id') + ", overlap elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); + if ((((bounds.top >= bnds.top && bounds.top <= bnds.top + bnds.height) || (bounds.top + bounds.height <= bnds.top && bounds.top + bounds.height >= bnds.top +bnds.height)) + && ((bounds.left > bnds.left && bounds.left < bnds.left + bnds.width) || (bnds.left > bounds.left && bnds.left < bounds.left + bounds.width))) + || (((bounds.top > bnds.top && bounds.top < bnds.top + bnds.height) || (bnds.top > bounds.top && bnds.top < bounds.top + bounds.height)) + && ((bounds.left >= bnds.left && bounds.left <= bnds.left + bnds.width) || (bounds.left + bounds.width >= bnds.left && bounds.left + bounds.width <= bnds.left + bnds.width)))) { + console.log("target id=" + ruleContext.getAttribute('id') + ", overlap elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); // TODO: more check to turn to violation return RulePotential("potential_overlap", [nodeName, elem.nodeName.toLowerCase()]); - } else { // no overlap with the elem, though may overlap wither other elements + } else { // no overlap with the elem, though may overlap withe other elements + console.log("target id=" + ruleContext.getAttribute('id') + ", not overlap elem id=" + elem.getAttribute('id') +",bounds=" +JSON.stringify(bounds) +", bnds=" + JSON.stringify(bnds)); let disX = 24; let disY = 24; // the element is in the horizontally same row with the target @@ -194,15 +202,16 @@ } // case 5: no verlap + sufficient target size - if (bounds.height >= 24 && bounds.width >= 24) + if (bounds.height >= 24 && bounds.width >= 24) {console.log("passed_size target id=" + ruleContext.getAttribute('id')); return RulePass("pass_sized"); - + } // case 6: no overlap + insufficient target size. check spacing if (Math.round(bounds.width/2) + minX < 12 || Math.round(bounds.height/2) + minY < 12) { if (Math.round(bounds.width/2) + minX < Math.round(bounds.height/2) + minY) return RuleFail("violation_spacing", [nodeName, adjacentX.nodeName.toLowerCase()]); return RuleFail("violation_spacing", [nodeName, adjacentY.nodeName.toLowerCase()]); - } + } else + return RulePass("pass_spacing"); // ignore all other cases return null; diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/block_element_inline.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/block_element_inline.html index d61c4d500..ed4f20979 100755 --- a/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/block_element_inline.html +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/block_element_inline.html @@ -74,11 +74,6 @@

display: inline

gravida nisl sit amet facilisis. Nullam cursus fermentum velit sed laoreet. -

display: inline-block

-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum consequat scelerisque elit sit amet consequat. Aliquam erat volutpat. Aliquam venenatis gravida nisl sit amet facilisis. Nullam cursus fermentum velit sed laoreet.
- -

display: block

-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum consequat scelerisque elit sit amet consequat. Aliquam erat volutpat. Aliquam venenatis gravida nisl sit amet facilisis. Nullam cursus fermentum velit sed laoreet.
@@ -87,36 +82,68 @@

display: block

ruleIds: ["target_spacing_sufficient"], results: [ { - "ruleId": "element_tabbable_unobscured", + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/div[1]/a[1]", + "aria": "/document[1]/link[1]" + }, + "reasonId": "pass_inline", + "message": "The target is in a sentence or its size is otherwise constrained by the line-height of non-target text", + "messageArgs": [], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", "value": [ "INFORMATION", - "POTENTIAL" + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/div[1]/button[1]", + "aria": "/document[1]/button[1]" + }, + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", + "messageArgs": [], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" ], "path": { - "dom": "/html[1]/body[1]/div[1]", - "aria": "/document[1]" + "dom": "/html[1]/body[1]/button[1]", + "aria": "/document[1]/button[2]" }, - "reasonId": "potential_obscured", - "message": "Confirm that when the element receives focus, it is not covered or, if covered by user action, can be uncovered without moving focus", + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", "messageArgs": [], "apiArgs": [], - "category": "Accessibility" + "category": "Other" }, { - "ruleId": "element_tabbable_unobscured", + "ruleId": "target_spacing_sufficient", "value": [ "INFORMATION", "PASS" ], "path": { - "dom": "/html[1]/body[1]/div[2]", - "aria": "/document[1]" + "dom": "/html[1]/body[1]/button[2]", + "aria": "/document[1]/button[3]" }, - "reasonId": "pass", - "message": "The element is not entirely covered by other content", + "reasonId": "pass_spacing", + "message": "The target's spacing from other targets is more than minimum", "messageArgs": [], "apiArgs": [], - "category": "Accessibility" + "category": "Other" } ] } diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/element_list.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/element_list.html index 22de224f4..2382a9ba0 100644 --- a/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/element_list.html +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/element_list.html @@ -40,38 +40,213 @@ UnitTest = { ruleIds: ["target_spacing_sufficient"], results: [ - { - "ruleId": "input_label_exists", - "value": [ - "INFORMATION", - "PASS" - ], - "path": { - "dom": "/html[1]/body[1]/main[1]/div[1]/label[1]/input[1]", - "aria": "/document[1]/main[1]/combobox[1]" + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[1]/select[1]", + "aria": "/document[1]/main[1]/listbox[1]" + }, + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", + "messageArgs": [], + "apiArgs": [], + "category": "Other" }, - "reasonId": "Pass_0", - "message": "Rule Passed", - "messageArgs": [], - "apiArgs": [], - "category": "Accessibility" - }, - { - "ruleId": "widget_tabbable_exists", - "value": [ - "INFORMATION", - "PASS" - ], - "path": { - "dom": "/html[1]/body[1]/main[1]/div[1]/label[1]/input[1]", - "aria": "/document[1]/main[1]/combobox[1]" + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "POTENTIAL" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[1]/select[1]/option[1]", + "aria": "/document[1]/main[1]/listbox[1]/option[1]" + }, + "reasonId": "potential_overlap", + "message": "Ensure the overlapped element 'option' meets a minimum target size or has sufficient spacing from the overlapping element 'option'", + "messageArgs": [ + "option", + "option" + ], + "apiArgs": [], + "category": "Other" }, - "reasonId": "pass", - "message": "Rule Passed", - "messageArgs": [], - "apiArgs": [], - "category": "Accessibility" - } + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "POTENTIAL" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[1]/select[1]/option[2]", + "aria": "/document[1]/main[1]/listbox[1]/option[2]" + }, + "reasonId": "potential_overlap", + "message": "Ensure the overlapped element 'option' meets a minimum target size or has sufficient spacing from the overlapping element 'option'", + "messageArgs": [ + "option", + "option" + ], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "POTENTIAL" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[1]/select[1]/option[3]", + "aria": "/document[1]/main[1]/listbox[1]/option[3]" + }, + "reasonId": "potential_overlap", + "message": "Ensure the overlapped element 'option' meets a minimum target size or has sufficient spacing from the overlapping element 'option'", + "messageArgs": [ + "option", + "option" + ], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "POTENTIAL" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[1]/select[1]/option[4]", + "aria": "/document[1]/main[1]/listbox[1]/option[4]" + }, + "reasonId": "potential_overlap", + "message": "Ensure the overlapped element 'option' meets a minimum target size or has sufficient spacing from the overlapping element 'option'", + "messageArgs": [ + "option", + "option" + ], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "POTENTIAL" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[1]/select[1]/option[5]", + "aria": "/document[1]/main[1]/listbox[1]/option[5]" + }, + "reasonId": "potential_overlap", + "message": "Ensure the overlapped element 'option' meets a minimum target size or has sufficient spacing from the overlapping element 'option'", + "messageArgs": [ + "option", + "option" + ], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[2]/select[1]", + "aria": "/document[1]/main[1]/listbox[2]" + }, + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", + "messageArgs": [], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[2]/select[1]/option[1]", + "aria": "/document[1]/main[1]/listbox[2]/option[1]" + }, + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", + "messageArgs": [], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[2]/select[1]/option[2]", + "aria": "/document[1]/main[1]/listbox[2]/option[2]" + }, + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", + "messageArgs": [], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[2]/select[1]/option[3]", + "aria": "/document[1]/main[1]/listbox[2]/option[3]" + }, + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", + "messageArgs": [], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[2]/select[1]/option[4]", + "aria": "/document[1]/main[1]/listbox[2]/option[4]" + }, + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", + "messageArgs": [], + "apiArgs": [], + "category": "Other" + }, + { + "ruleId": "target_spacing_sufficient", + "value": [ + "INFORMATION", + "PASS" + ], + "path": { + "dom": "/html[1]/body[1]/main[1]/div[2]/select[1]/option[5]", + "aria": "/document[1]/main[1]/listbox[2]/option[5]" + }, + "reasonId": "pass_sized", + "message": "The target’s size is more than 24 CSS pixels", + "messageArgs": [], + "apiArgs": [], + "category": "Other" + } ] }; diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/element_target.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/element_target.html index afd8b5286..fddf97bd6 100755 --- a/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/element_target.html +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/target_spacing_sufficient_ruleunit/element_target.html @@ -113,12 +113,12 @@
- - + +
- - + +