aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-01-15 08:28:13 -0500
committerScott González <scott.gonzalez@gmail.com>2011-01-15 08:28:13 -0500
commit1dc4d64dd4f343031a6851494ae7839873462252 (patch)
tree397e19a68612d6c7e53ab99b0f913c5c65c237c8 /tests
parente0b52831fc41bc35d4bcbfa2e9a1dec76d0f0d6a (diff)
downloadjquery-ui-1dc4d64dd4f343031a6851494ae7839873462252.tar.gz
jquery-ui-1dc4d64dd4f343031a6851494ae7839873462252.zip
Spinner: Moved ARIA to input and fixed tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/spinner/spinner.html2
-rw-r--r--tests/unit/spinner/spinner_core.js17
-rw-r--r--tests/unit/spinner/spinner_defaults.js1
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/unit/spinner/spinner.html b/tests/unit/spinner/spinner.html
index cac598248..ac90dcf6a 100644
--- a/tests/unit/spinner/spinner.html
+++ b/tests/unit/spinner/spinner.html
@@ -27,7 +27,7 @@
<body>
-<h1 id="qunit-header">jQuery UI Slider Test Suite</h1>
+<h1 id="qunit-header">jQuery UI Spinner Test Suite</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests">
diff --git a/tests/unit/spinner/spinner_core.js b/tests/unit/spinner/spinner_core.js
index 88603708f..df2243adc 100644
--- a/tests/unit/spinner/spinner_core.js
+++ b/tests/unit/spinner/spinner_core.js
@@ -150,22 +150,21 @@ test("reading HTML5 attributes", function() {
});
test("ARIA attributes", function() {
- var el = $('#spin').spinner({ min: -5, max: 5, value: 2 }),
- wrapper = el.spinner("widget");
+ var el = $('#spin').spinner({ min: -5, max: 5, value: 2 });;
- equals(wrapper.attr('role'), 'spinbutton', 'role');
- equals(wrapper.attr('aria-valuemin'), -5, 'aria-valuemin');
- equals(wrapper.attr('aria-valuemax'), 5, 'aria-valuemax');
- equals(wrapper.attr('aria-valuenow'), 2, 'aria-valuenow');
+ equals(el.attr('role'), 'spinbutton', 'role');
+ equals(el.attr('aria-valuemin'), -5, 'aria-valuemin');
+ equals(el.attr('aria-valuemax'), 5, 'aria-valuemax');
+ equals(el.attr('aria-valuenow'), 2, 'aria-valuenow');
el.spinner('stepUp');
- equals(wrapper.attr('aria-valuenow'), 3, 'stepUp 1 step changes aria-valuenow');
+ equals(el.attr('aria-valuenow'), 3, 'stepUp 1 step changes aria-valuenow');
el.spinner('option', { min: -10, max: 10 });
- equals(wrapper.attr('aria-valuemin'), -10, 'min option changed aria-valuemin changes');
- equals(wrapper.attr('aria-valuemax'), 10, 'max option changed aria-valuemax changes');
+ equals(el.attr('aria-valuemin'), -10, 'min option changed aria-valuemin changes');
+ equals(el.attr('aria-valuemax'), 10, 'max option changed aria-valuemax changes');
});
})(jQuery);
diff --git a/tests/unit/spinner/spinner_defaults.js b/tests/unit/spinner/spinner_defaults.js
index 2f5d77585..0389ab169 100644
--- a/tests/unit/spinner/spinner_defaults.js
+++ b/tests/unit/spinner/spinner_defaults.js
@@ -8,6 +8,7 @@ var spinner_defaults = {
max: null,
min: null,
numberformat: null,
+ page: 10,
step: null,
value: null
};