Skip to content

Commit

Permalink
refactor(checks/keyboard): change var names to distinguish being in f…
Browse files Browse the repository at this point in the history
…ocus order from being focusable (#665)
  • Loading branch information
0ddfell0w authored and WilcoFiers committed Dec 21, 2017
1 parent d35e21a commit 9e8a310
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/rule-proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ In short sentences, using plain language, describe what conditions will lead to

`###` keyboard/focusable-no-name (none)

1. If the element is not focusable, return false
1. If the element is not in the focus order, return false
2. If the element has an accessible name, return false
3. Otherwise return true

Expand Down
4 changes: 2 additions & 2 deletions lib/checks/keyboard/focusable-no-name.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var tabIndex = node.getAttribute('tabindex'),
isFocusable = axe.commons.dom.isFocusable(node) && tabIndex > -1;
if (!isFocusable) {
inFocusOrder = axe.commons.dom.isFocusable(node) && tabIndex > -1;
if (!inFocusOrder) {
return false;
}
return !axe.commons.text.accessibleText(node);

0 comments on commit 9e8a310

Please sign in to comment.