diff --git a/lib/checks/keyboard/no-focusable-content-evaluate.js b/lib/checks/keyboard/no-focusable-content-evaluate.js index 0f6842405f..e45bdfde9f 100644 --- a/lib/checks/keyboard/no-focusable-content-evaluate.js +++ b/lib/checks/keyboard/no-focusable-content-evaluate.js @@ -1,11 +1,7 @@ import isFocusable from '../../commons/dom/is-focusable'; function focusableDescendants(vNode) { - const isNodeFocusable = isFocusable(vNode); - let tabIndex = parseInt(vNode.attr('tabindex'), 10); - tabIndex = !isNaN(tabIndex) ? tabIndex : null; - - if(tabIndex ? isNodeFocusable && tabIndex >= 0 : isNodeFocusable) { + if (isFocusable(vNode)) { return true; } diff --git a/test/checks/keyboard/no-focusable-content.js b/test/checks/keyboard/no-focusable-content.js index 9959fda468..1e1a3a8474 100644 --- a/test/checks/keyboard/no-focusable-content.js +++ b/test/checks/keyboard/no-focusable-content.js @@ -37,26 +37,4 @@ describe('no-focusable-content tests', function() { ); assert.isFalse(noFocusableContent(null, null, vNode)); }); - - it('should return true on span with tabindex=-1', function() { - var vNode = queryFixture(' some text ' - +'JavaScript is able to focus this ' - +''); - assert.isTrue(noFocusableContent(null, null, vNode)); - }); - - it('should return true on aria-hidden span with tabindex=-1', function() { - var vNode = queryFixture(' some text ' - +''); - assert.isTrue(noFocusableContent(null, null, vNode)); - }); - - it('should return false on span with tabindex=0', function() { - var vNode = queryFixture(' ' - +' some text ' - +'anyone is able to focus this ' - +''); - assert.isFalse(noFocusableContent(null, null, vNode)); - }); - }); diff --git a/test/integration/rules/aria-text/aria-text.html b/test/integration/rules/aria-text/aria-text.html index 4059f1e53b..28252c0bce 100644 --- a/test/integration/rules/aria-text/aria-text.html +++ b/test/integration/rules/aria-text/aria-text.html @@ -15,8 +15,8 @@