]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
verify aria-hidden is correct
authorKristofer Krause <kris.krause@gmail.com>
Mon, 20 Mar 2017 20:32:58 +0000 (16:32 -0400)
committerKristofer Krause <kris.krause@gmail.com>
Mon, 20 Mar 2017 20:32:58 +0000 (16:32 -0400)
test/javascript/components/tooltip.js

index b755ad75891d39768bdcb26d822ad2cfd7e27dde..f529337d9934517c5afa9c735bb8f690202b8dfa 100644 (file)
@@ -59,6 +59,7 @@ describe('Tooltip', function() {
       plugin = new Foundation.Tooltip($html, {});
 
       plugin.$element.should.have.attr('aria-describedby', plugin.template.attr('id'));
+      plugin.template.should.have.attr('aria-hidden', 'true');
       plugin.template.should.have.attr('role', 'tooltip');
     });
 
@@ -81,6 +82,7 @@ describe('Tooltip', function() {
       plugin.show();
 
       plugin.template.should.be.visible;
+      plugin.template.should.have.attr('aria-hidden', 'false');
     });
 
     it('fires show.zf.tooltip event', function(done) {
@@ -107,6 +109,7 @@ describe('Tooltip', function() {
       plugin.hide();
 
       plugin.template.should.be.hidden;
+      plugin.template.should.have.attr('aria-hidden', 'true');
     });
 
     it('fires hide.zf.tooltip event', function(done) {
@@ -132,6 +135,7 @@ describe('Tooltip', function() {
 
       plugin.toggle();
       plugin.template.should.be.visible;
+      plugin.template.should.have.attr('aria-hidden', 'false');
     });
     it('hides a visible tooltip', function() {
       $html = $(template).appendTo('body');
@@ -142,6 +146,7 @@ describe('Tooltip', function() {
 
       plugin.toggle();
       plugin.template.should.be.hidden;
+      plugin.template.should.have.attr('aria-hidden', 'true');
     });
   });