-
-
-
+
+
+
-
-
-
-
+
+
+
+
@@ -84,10 +90,10 @@
-
+
-
+
Cyan
@@ -104,16 +110,16 @@
diff --git a/test/relevantWhen.js b/test/relevantWhen.js
index fed0335..9b59a2a 100644
--- a/test/relevantWhen.js
+++ b/test/relevantWhen.js
@@ -1,6 +1,6 @@
(function( $ ) {
'use strict';
-
+
module( 'environment' );
diff --git a/test/ui.html b/test/ui.html
index 94ea913..bfcdbc8 100644
--- a/test/ui.html
+++ b/test/ui.html
@@ -9,6 +9,7 @@
+
@@ -58,7 +59,7 @@
-
+
diff --git a/test/ui.js b/test/ui.js
index 52df4d4..bec59cc 100644
--- a/test/ui.js
+++ b/test/ui.js
@@ -1,6 +1,6 @@
(function( $ ) {
'use strict';
-
+
module( 'environment' );
@@ -9,7 +9,7 @@
strictEqual( $( '#foo' ).length, 1, '#foo exists' );
strictEqual( $( '#bar' ).length, 1, '#bar exists' );
strictEqual( $( '#foo' ).is( ':visible' ), true, '#foo is visible' );
- strictEqual( $( '#bar' ).is( ':hidden' ), true, '#bar is hidden' );
+ strictEqual( $( '#bar' ).is( '[hidden]' ), true, '#bar has hidden' );
});
@@ -19,12 +19,12 @@
test( 'elements are visible after show', 4, function() {
$( '#foo, #bar' ).relevance( 'show' );
- strictEqual( $( '#foo' ).is( ':visible' ), true, '#foo is visible' );
- strictEqual( $( '#bar' ).is( ':visible' ), true, '#bar is visible' );
+ strictEqual( $( '#foo' ).is( ':hidden' ), false, '#foo is visible' );
+ strictEqual( $( '#bar' ).is( ':hidden' ), false, '#bar is visible' );
$( '#foo, #bar' ).relevance( 'show' );
- strictEqual( $( '#foo' ).is( ':visible' ), true, '#foo is still visible' );
- strictEqual( $( '#bar' ).is( ':visible' ), true, '#bar is still visible' );
+ strictEqual( $( '#foo' ).is( ':hidden' ), false, '#foo is still visible' );
+ strictEqual( $( '#bar' ).is( ':hidden' ), false, '#bar is still visible' );
});
@@ -45,16 +45,16 @@
test( 'aria hidden state is flagged', 6, function() {
$( '#foo, #bar' ).relevance( 'show' );
- strictEqual( $( '#foo' )[ 0 ].getAttribute( 'aria-hidden' ), null, '#foo is not aria-hidden' );
- strictEqual( $( '#bar' )[ 0 ].getAttribute( 'aria-hidden' ), null, '#bar is not aria-hidden' );
+ ok( ! $( '#foo' )[ 0 ].getAttribute( 'aria-hidden' ), '#foo is not aria-hidden' );
+ ok( ! $( '#bar' )[ 0 ].getAttribute( 'aria-hidden' ), '#bar is not aria-hidden' );
$( '#foo, #bar' ).relevance( 'hide' );
strictEqual( $( '#foo' ).attr( 'aria-hidden' ), 'true', '#foo is aria-hidden after hide()' );
strictEqual( $( '#bar' ).attr( 'aria-hidden' ), 'true', '#bar is aria-hidden after hide()' );
$( '#foo, #bar' ).relevance( 'show' );
- strictEqual( $( '#foo' )[ 0 ].getAttribute( 'aria-hidden' ), null, '#foo is not aria-hidden after show()' );
- strictEqual( $( '#bar' )[ 0 ].getAttribute( 'aria-hidden' ), null, '#bar is not aria-hidden after show()' );
+ ok( ! $( '#foo' )[ 0 ].getAttribute( 'aria-hidden' ), '#foo is not aria-hidden after show()' );
+ ok( ! $( '#bar' )[ 0 ].getAttribute( 'aria-hidden' ), '#bar is not aria-hidden after show()' );
});