Focusables (with tabindex)
+
7
+
8
+
9
+
10
+
11
+
12
not focusable
3
4
@@ -130,13 +136,10 @@
focusables in ShadowDOM
test('respects the tabindex order', function() {
var node = fixture('tabindex');
var focusableNodes = Polymer.IronFocusablesHelper.getTabbableNodes(node);
- assert.equal(focusableNodes.length, 6, '6 nodes are focusable');
- assert.equal(focusableNodes[0], Polymer.dom(node).querySelector('.focusable1'));
- assert.equal(focusableNodes[1], Polymer.dom(node).querySelector('.focusable2'));
- assert.equal(focusableNodes[2], Polymer.dom(node).querySelector('.focusable3'));
- assert.equal(focusableNodes[3], Polymer.dom(node).querySelector('.focusable4'));
- assert.equal(focusableNodes[4], Polymer.dom(node).querySelector('.focusable5'));
- assert.equal(focusableNodes[5], Polymer.dom(node).querySelector('.focusable6'));
+ assert.equal(focusableNodes.length, 12, '12 nodes are focusable');
+ for (var i = 0; i < 12; i++) {
+ assert.equal(focusableNodes[i], Polymer.dom(node).querySelector('.focusable' + (i + 1)));
+ }
});
test('includes tabbable elements in the shadow dom', function() {