Skip to content

Commit 777c20b

Browse files
authored
Merge pull request #118 from browserstack/AXE-789-distinguishable-link-enhc
Fix: AXE-789 - distinguishable-link standalone case
2 parents 7e2a623 + 8243a88 commit 777c20b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/checks/color/link-in-text-block-evaluate.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ function getColorContrast(node, parentBlock) {
136136
nodeColor = getForegroundColor(node);
137137
parentColor = getForegroundColor(parentBlock);
138138

139+
if (!nodeColor) {
140+
nodeColor = new axe.commons.color.Color(0, 0, 0, 0);
141+
}
142+
143+
if (!parentColor) {
144+
parentColor = new axe.commons.color.Color(0, 0, 0, 0);
145+
}
146+
139147
if (!nodeColor || !parentColor) {
140148
return undefined;
141149
}

0 commit comments

Comments
 (0)