Skip to content

Commit 7fab9d4

Browse files
committed
Added condition only in a11y-engine rule
1 parent 7999ff2 commit 7fab9d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ function isBlock(elm) {
2828
}
2929

3030
function linkInTextBlockEvaluate(node) {
31-
if(node.getAttribute('type') ==='button' || node.tagName.toLowerCase() === 'button' || node.getAttribute('role') === 'button') {
32-
return true;
33-
}
3431

3532
var options = arguments.length > 1 && arguments[1] ? arguments[1] : {};
3633
if (isBlock(node)) {
@@ -45,6 +42,9 @@ function linkInTextBlockEvaluate(node) {
4542
this.relatedNodes([parentBlock]);
4643

4744
if(options.a11yRule) {
45+
if(node.getAttribute('type') === 'button' || node.tagName.toLowerCase() === 'button' || node.getAttribute('role') === 'button') {
46+
return true;
47+
}
4848
return a11y_engine_commons.distinguishableLinkEvaluate(node, parentBlock);
4949
}
5050

0 commit comments

Comments
 (0)