Skip to content

Commit

Permalink
Merge pull request #44 from browserstack/distinguishable-links-fix
Browse files Browse the repository at this point in the history
Updated distinguishable link evaluate method to pass button links
  • Loading branch information
ansh21 authored May 16, 2024
2 parents 264c768 + 1810d17 commit 200f4e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/checks/color/link-in-text-block-evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ function isBlock(elm) {
}

function linkInTextBlockEvaluate(node) {
if(node.getAttribute('type') ==='button' || node.tagName.toLowerCase() === 'button' || node.getAttribute('role') === 'button') {
return true;
}

var options = arguments.length > 1 && arguments[1] ? arguments[1] : {};
if (isBlock(node)) {
return false;
Expand Down

0 comments on commit 200f4e7

Please sign in to comment.