Skip to content

Commit 5830a47

Browse files
authored
Merge pull request #131 from browserstack/AXE-1391-color-contrast-enhancement
fix: Axe 1391 color contrast enhancement
2 parents 993f0ba + 2b869ad commit 5830a47

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/commons/dom/get-overflow-hidden-ancestors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ const getOverflowHiddenAncestors = memoize(
2929
}
3030
} else if (
3131
cache.get('ruleId') &&
32-
cache.get('ruleId') === 'reflow-4x-zoom-scroll' &&
32+
(cache.get('ruleId') === 'reflow-4x-zoom-scroll' ||
33+
cache.get('ruleId') === 'color-contrast') &&
3334
overflow.includes('hidden')
3435
) {
3536
ancestors.push(vNode);

lib/commons/dom/get-visible-child-text-rects.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ const getVisibleChildTextRects = (node, options = {}) => {
3636
nodeRect,
3737
checkTextRectOutsideNodeBoundingRect
3838
) &&
39-
(!cache.get('ruleId') || cache.get('ruleId') === 'reflow-4x-zoom-scroll')
39+
(!cache.get('ruleId') ||
40+
cache.get('ruleId') === 'reflow-4x-zoom-scroll' ||
41+
cache.get('ruleId') === 'color-contrast')
4042
) {
4143
return;
4244
}

0 commit comments

Comments
 (0)