Skip to content

Commit

Permalink
Merge pull request #118 from browserstack/AXE-789-distinguishable-lin…
Browse files Browse the repository at this point in the history
…k-enhc

Fix: AXE-789 - distinguishable-link standalone case
  • Loading branch information
Pooja0504 authored Dec 18, 2024
2 parents 7e2a623 + 8243a88 commit 777c20b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/checks/color/link-in-text-block-evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ function getColorContrast(node, parentBlock) {
nodeColor = getForegroundColor(node);
parentColor = getForegroundColor(parentBlock);

if (!nodeColor) {
nodeColor = new axe.commons.color.Color(0, 0, 0, 0);
}

if (!parentColor) {
parentColor = new axe.commons.color.Color(0, 0, 0, 0);
}

if (!nodeColor || !parentColor) {
return undefined;
}
Expand Down

0 comments on commit 777c20b

Please sign in to comment.