From ff968c2c5027d41f2e6fce1147e8b6c8d7be9d05 Mon Sep 17 00:00:00 2001 From: Arjun Chikara Date: Thu, 16 May 2024 18:25:08 +0530 Subject: [PATCH] Updated distinguishable link evaluate method to pass button links --- lib/checks/color/link-in-text-block-evaluate.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/checks/color/link-in-text-block-evaluate.js b/lib/checks/color/link-in-text-block-evaluate.js index 8494e9a2..7a79eb70 100644 --- a/lib/checks/color/link-in-text-block-evaluate.js +++ b/lib/checks/color/link-in-text-block-evaluate.js @@ -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;