aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-08-12 09:37:48 -0400
committerScott González <scott.gonzalez@gmail.com>2011-08-12 09:37:48 -0400
commit1729e3a32e4c2e4b922ce799f98ef0a4b1cd360e (patch)
treeea9ff687ef371061122c1366800b2eb5f9f3c530 /tests
parent18a3b539882835ecc78ed976a7d9e830c128fd96 (diff)
downloadjquery-ui-1729e3a32e4c2e4b922ce799f98ef0a4b1cd360e.tar.gz
jquery-ui-1729e3a32e4c2e4b922ce799f98ef0a4b1cd360e.zip
Core: Added tests for :focusable and :tabbable form elements.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/core/core.html3
-rw-r--r--tests/unit/core/selector.js8
2 files changed, 9 insertions, 2 deletions
diff --git a/tests/unit/core/core.html b/tests/unit/core/core.html
index fdde81766..e2d988806 100644
--- a/tests/unit/core/core.html
+++ b/tests/unit/core/core.html
@@ -46,6 +46,9 @@
<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">
diff --git a/tests/unit/core/selector.js b/tests/unit/core/selector.js
index de5be3da1..2fb78025c 100644
--- a/tests/unit/core/selector.js
+++ b/tests/unit/core/selector.js
@@ -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');