]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fixes pr issue where tab panels were not getting appropriate ARIA attributes on init
authorChris Oyler <chris@zurb.com>
Fri, 8 Jan 2016 18:51:49 +0000 (10:51 -0800)
committerChris Oyler <chris@zurb.com>
Fri, 8 Jan 2016 18:51:49 +0000 (10:51 -0800)
js/foundation.tabs.js

index 7c49fef0c4f75ce2bd4b0f2feff45ac9d21de777..ce030d6f9589e084d97aa6de1473d7be5715262d 100644 (file)
@@ -90,7 +90,7 @@
           isActive = $elem.hasClass('is-active'),
           hash = $link[0].hash.slice(1),
           linkId = hash + '-label',
-          $tabContent = $(hash);
+          $tabContent = $('#' + hash);
 
       $elem.attr({'role': 'presentation'});
 
     var $tabLink = $target.find('[role="tab"]'),
         hash = $tabLink[0].hash,
         $targetContent = $(hash),
-
         $oldTab = this.$element.find('.' + this.options.linkClass + '.is-active')
                   .removeClass('is-active').find('[role="tab"]')
                   .attr({'aria-selected': 'false'}).attr('aria-controls');