]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Added tests for :focusable and :tabbable form elements.
authorScott González <scott.gonzalez@gmail.com>
Fri, 12 Aug 2011 13:37:48 +0000 (09:37 -0400)
committerScott González <scott.gonzalez@gmail.com>
Fri, 12 Aug 2011 13:37:48 +0000 (09:37 -0400)
tests/unit/core/core.html
tests/unit/core/selector.js

index fdde8176664da9e3777ac299a7aa05fe02131cb5..e2d98880683f0954bb07db4d838e74e0b0ff8edb 100644 (file)
@@ -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">
index de5be3da178d08c9a14a18cb2b586f782d1f338b..2fb78025c76258e2309738baf12816f1f49a969e 100644 (file)
@@ -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');