From 78048792ff7cf99c13d22d644350efb383908db0 Mon Sep 17 00:00:00 2001 From: harry Date: Wed, 5 Apr 2017 14:02:27 +0530 Subject: [PATCH] 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! --- js/foundation.tabs.js | 3 --- scss/components/_tabs.scss | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) 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; } } -- 2.47.2