diff --git a/lib/checks/keyboard/focusable-no-name-evaluate.js b/lib/checks/keyboard/focusable-no-name-evaluate.js
index 5da1dc08a8..eb8b2c014f 100644
--- a/lib/checks/keyboard/focusable-no-name-evaluate.js
+++ b/lib/checks/keyboard/focusable-no-name-evaluate.js
@@ -2,12 +2,13 @@ import { isFocusable } from '../../commons/dom';
import { accessibleTextVirtual } from '../../commons/text';
function focusableNoNameEvaluate(node, options, virtualNode) {
+ const tabIndex = virtualNode.attr('tabindex');
+ const inFocusOrder = isFocusable(virtualNode) && tabIndex > -1;
+ if (!inFocusOrder) {
+ return false;
+ }
+
try {
- const tabIndex = virtualNode.attr('tabindex');
- const inFocusOrder = isFocusable(virtualNode) && tabIndex > -1;
- if (!inFocusOrder) {
- return false;
- }
return !accessibleTextVirtual(virtualNode);
} catch (e) {
return undefined;
diff --git a/lib/commons/aria/get-role.js b/lib/commons/aria/get-role.js
index bc92469e8e..972d6805b6 100644
--- a/lib/commons/aria/get-role.js
+++ b/lib/commons/aria/get-role.js
@@ -106,7 +106,7 @@ function resolveImplicitRole(vNode, explicitRoleOptions) {
// See also: https://github.com/w3c/aria/issues/1270
function hasConflictResolution(vNode) {
const hasGlobalAria = getGlobalAriaAttrs().some(attr => vNode.hasAttr(attr));
- return hasGlobalAria || isFocusable(vNode.actualNode);
+ return hasGlobalAria || isFocusable(vNode);
}
/**
diff --git a/lib/commons/standards/implicit-html-roles.js b/lib/commons/standards/implicit-html-roles.js
index d759484e96..890e31afca 100644
--- a/lib/commons/standards/implicit-html-roles.js
+++ b/lib/commons/standards/implicit-html-roles.js
@@ -93,7 +93,7 @@ const implicitHtmlRoles = {
vNode.hasAttr(attr)
);
- return emptyAlt && !hasGlobalAria && !isFocusable(vNode.actualNode)
+ return emptyAlt && !hasGlobalAria && !isFocusable(vNode)
? 'presentation'
: 'img';
},
diff --git a/test/integration/virtual-rules/index.html b/test/integration/virtual-rules/index.html
index 39a3fd7043..c3b9722259 100644
--- a/test/integration/virtual-rules/index.html
+++ b/test/integration/virtual-rules/index.html
@@ -34,6 +34,7 @@
+