aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2017-03-31 22:11:17 +0200
committerFelix Nagel <info@felixnagel.com>2017-03-31 22:11:17 +0200
commit7ef7f3ab9ea8c0e5a778f5b5ae31b6d591275eef (patch)
tree5c4ff0c58e34f838f1413982e61c528d9f696b62
parentb09c7e8cee760a622031232442b6c751e3698d19 (diff)
downloadjquery-ui-7ef7f3ab9ea8c0e5a778f5b5ae31b6d591275eef.tar.gz
jquery-ui-7ef7f3ab9ea8c0e5a778f5b5ae31b6d591275eef.zip
Datepicker tests: Add ARIA tests
-rw-r--r--tests/unit/datepicker/core.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/unit/datepicker/core.js b/tests/unit/datepicker/core.js
index 2aa89aa36..e26c6c94d 100644
--- a/tests/unit/datepicker/core.js
+++ b/tests/unit/datepicker/core.js
@@ -123,9 +123,20 @@ QUnit.test( "Keyboard handling: input", function( assert ) {
"Picker updated as user types into input" );
} );
-// TODO: implement
QUnit.test( "ARIA", function( assert ) {
- assert.expect( 0 );
+ assert.expect( 4 );
+
+ var widget = this.element.datepicker( "widget" ),
+ id = widget.attr( "id" );
+
+ assert.equal( this.element.attr( "aria-haspopup" ), "true",
+ "Input aria-haspopup attribute" );
+ assert.equal( this.element.attr( "aria-owns" ), id, "ARIA owns attribute" );
+
+ assert.equal( widget.attr( "aria-hidden" ), "true",
+ "Widget ARIA hidden attribute" );
+ assert.equal( widget.attr( "aria-expanded" ), "false",
+ "Widget ARIA expanded attribute" );
} );
QUnit.test( "mouse", function( assert ) {