Skip to content
Permalink
Browse files

Core: Added tests for :focusable and :tabbable form elements.

  • Loading branch information
scottgonzalez committed Aug 12, 2011
1 parent 18a3b53 commit 1729e3a32e4c2e4b922ce799f98ef0a4b1cd360e
Showing with 9 additions and 2 deletions.
  1. +3 −0 tests/unit/core/core.html
  2. +6 −2 tests/unit/core/selector.js
@@ -46,6 +46,9 @@ <h2 id="qunit-userAgent"></h2>
<area shape="rect" coords="1,1,2,2" href="foo.html" id="areaNoImg">
</map>

<form id="formNoTabindex"></form>
<form id="formTabindex" tabindex="1"></form>

<div>
<input id="visibleAncestor-inputTypeNone">
<input type="text" id="visibleAncestor-inputTypeText">
@@ -79,8 +79,10 @@ test("data", function() {
});

test("focusable - visible, enabled elements", function() {
expect(16);
expect(18);

isNotFocusable('#formNoTabindex', 'form');
isFocusable('#formTabindex', 'form with tabindex');
isFocusable('#visibleAncestor-inputTypeNone', 'input, no type');
isFocusable('#visibleAncestor-inputTypeText', 'input, type text');
isFocusable('#visibleAncestor-inputTypeCheckbox', 'input, type checkbox');
@@ -156,8 +158,10 @@ test("focusable - area elements", function() {
});

test("tabbable - visible, enabled elements", function() {
expect(16);
expect(18);

isNotTabbable('#formNoTabindex', 'form');
isTabbable('#formTabindex', 'form with tabindex');
isTabbable('#visibleAncestor-inputTypeNone', 'input, no type');
isTabbable('#visibleAncestor-inputTypeText', 'input, type text');
isTabbable('#visibleAncestor-inputTypeCheckbox', 'input, type checkbox');

0 comments on commit 1729e3a

Please sign in to comment.
You can’t perform that action at this time.