From: harry Date: Wed, 5 Apr 2017 08:32:27 +0000 (+0530) Subject: Fixes #9913: Removed aria-hidden and using is-active for targeting active tabs X-Git-Tag: v6.4.0-rc1~72^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9916%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Fixes #9913: Removed aria-hidden and using is-active for targeting active tabs Changes: - Removed aria hidden from scss - Added `display: block` to `is-active` state - Safely Removed `aria-hidden` attribute as doing nothing now! --- diff --git a/js/foundation.tabs.js b/js/foundation.tabs.js index 898cdf506..1bdab9d0a 100644 --- a/js/foundation.tabs.js +++ b/js/foundation.tabs.js @@ -65,7 +65,6 @@ class Tabs { $tabContent.attr({ 'role': 'tabpanel', - 'aria-hidden': !isActive, 'aria-labelledby': linkId }); @@ -280,7 +279,6 @@ class Tabs { $targetContent .addClass(`${this.options.panelActiveClass}`) - .attr({'aria-hidden': ''}); } /** @@ -296,7 +294,6 @@ class Tabs { $(`#${$target_anchor.attr('aria-controls')}`) .removeClass(`${this.options.panelActiveClass}`) - .attr({ 'aria-hidden': 'true' }); } /** diff --git a/scss/components/_tabs.scss b/scss/components/_tabs.scss index f1c393fcd..56d962dd7 100644 --- a/scss/components/_tabs.scss +++ b/scss/components/_tabs.scss @@ -138,7 +138,7 @@ $tab-content-padding: 1rem !default; display: none; padding: $padding; - &[aria-hidden=""] { + &.is-active { display: block; } }