aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/core/core.html9
-rw-r--r--tests/unit/core/selector.js8
2 files changed, 15 insertions, 2 deletions
diff --git a/tests/unit/core/core.html b/tests/unit/core/core.html
index 93f0156fd..31a5bb579 100644
--- a/tests/unit/core/core.html
+++ b/tests/unit/core/core.html
@@ -38,6 +38,15 @@
<input>
</form>
+<form>
+ <fieldset id="enabledFieldset">
+ <input>
+ </fieldset>
+ <fieldset id="disabledFieldset" disabled="disabled">
+ <input>
+ </fieldset>
+</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 d452e43c9..29b8b1296 100644
--- a/tests/unit/core/selector.js
+++ b/tests/unit/core/selector.js
@@ -89,10 +89,12 @@ QUnit.test( "data", function( assert ) {
} );
QUnit.test( "focusable - visible, enabled elements", function( assert ) {
- assert.expect( 20 );
+ assert.expect( 22 );
assert.isNotFocusable( "#formNoTabindex", "form" );
assert.isFocusable( "#formTabindex", "form with tabindex" );
+ assert.isFocusable( "#enabledFieldset input", "input in enabled fieldset" );
+ assert.isNotFocusable( "#disabledFieldset input", "input in disabled fieldset" );
assert.isFocusable( "#visibleAncestor-inputTypeNone", "input, no type" );
assert.isFocusable( "#visibleAncestor-inputTypeText", "input, type text" );
assert.isFocusable( "#visibleAncestor-inputTypeCheckbox", "input, type checkbox" );
@@ -184,10 +186,12 @@ QUnit.test( "focusable - dimensionless parent with overflow", function( assert )
} );
QUnit.test( "tabbable - visible, enabled elements", function( assert ) {
- assert.expect( 18 );
+ assert.expect( 20 );
assert.isNotTabbable( "#formNoTabindex", "form" );
assert.isTabbable( "#formTabindex", "form with tabindex" );
+ assert.isTabbable( "#enabledFieldset input", "input in enabled fieldset" );
+ assert.isNotTabbable( "#disabledFieldset input", "input in disabled fieldset" );
assert.isTabbable( "#visibleAncestor-inputTypeNone", "input, no type" );
assert.isTabbable( "#visibleAncestor-inputTypeText", "input, type text" );
assert.isTabbable( "#visibleAncestor-inputTypeCheckbox", "input, type checkbox" );