Skip to content

Commit d21eac6

Browse files
committed
added color contrast rule id
1 parent cc04827 commit d21eac6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
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
}
@@ -52,7 +54,9 @@ const getVisibleChildTextRects = (node, options = {}) => {
5254
// a11y-engine-domforge change
5355
if (
5456
clientRects.length <= 0 &&
55-
((cache.get('ruleId') && cache.get('ruleId') === 'resize-2x-zoom') ||
57+
((cache.get('ruleId') &&
58+
(cache.get('ruleId') === 'resize-2x-zoom' ||
59+
cache.get('ruleId') === 'color-contrast')) ||
5660
checkNoVisibleRectsIdentified)
5761
) {
5862
return [];

0 commit comments

Comments
 (0)