← All changes
|
modules/nested-tabs/widgets/nested-tabs.php
+4
-8
4.2.0-dev2
→
3.32.0-dev3
View file →
| @@ -1075,9 +1075,8 @@ | ||
| 1075 | 1075 | } |
| 1076 | 1076 | |
| 1077 | 1077 | $this->add_render_attribute( $setting_key, [ |
| 1078 | 1078 | 'id' => $item_settings['tab_id'], |
| 1079 | - 'data-tab-title-id' => $item_settings['tab_title_id'], | |
| 1080 | 1079 | 'class' => $css_classes, |
| 1081 | 1080 | 'aria-selected' => 1 === $item_settings['tab_count'] ? 'true' : 'false', |
| 1082 | 1081 | 'data-tab-index' => $item_settings['tab_count'], |
| 1083 | 1082 | 'role' => 'tab', |
| @@ -1123,9 +1122,9 @@ | ||
| 1123 | 1122 | |
| 1124 | 1123 | /** |
| 1125 | 1124 | * Print the content area. |
| 1126 | 1125 | * |
| 1127 | - * @param int $index | |
| 1126 | + * @param int $index | |
| 1128 | 1127 | * @param array $item_settings |
| 1129 | 1128 | */ |
| 1130 | 1129 | public function print_child( $index, $item_settings = [] ) { |
| 1131 | 1130 | $children = $this->get_children(); |
| @@ -1184,11 +1183,11 @@ | ||
| 1184 | 1183 | <div class="e-n-tabs-heading" role="tablist"> |
| 1185 | 1184 | <?php |
| 1186 | 1185 | foreach ( $settings['tabs'] as $index => $item ) { |
| 1187 | 1186 | $tab_count = $index + 1; |
| 1188 | - $tab_title_id = 'e-n-tab-title-' . $widget_number . $tab_count; | |
| 1187 | + | |
| 1189 | 1188 | $tab_id = empty( $item['element_id'] ) |
| 1190 | - ? $tab_title_id | |
| 1189 | + ? 'e-n-tab-title-' . $widget_number . $tab_count | |
| 1191 | 1190 | : $item['element_id']; |
| 1192 | 1191 | |
| 1193 | 1192 | $item_settings = [ |
| 1194 | 1193 | 'index' => $index, |
| @@ -1193,9 +1192,8 @@ | ||
| 1193 | 1192 | $item_settings = [ |
| 1194 | 1193 | 'index' => $index, |
| 1195 | 1194 | 'tab_count' => $tab_count, |
| 1196 | 1195 | 'tab_id' => $tab_id, |
| 1197 | - 'tab_title_id' => $tab_title_id, | |
| 1198 | 1196 | 'container_id' => 'e-n-tab-content-' . $widget_number . $tab_count, |
| 1199 | 1197 | 'widget_number' => $widget_number, |
| 1200 | 1198 | 'item' => $item, |
| 1201 | 1199 | 'settings' => $settings, |
| @@ -1261,12 +1259,11 @@ | ||
| 1261 | 1259 | private function content_template_single_item( $tab_index, $item, $element_uid, $hover_animation_class ) { |
| 1262 | 1260 | ?> |
| 1263 | 1261 | <# |
| 1264 | 1262 | const tabCount = tabIndex + 1, |
| 1265 | - tabTitleId = 'e-n-tab-title-' + elementUid + tabCount, | |
| 1266 | 1263 | tabId = item.element_id |
| 1267 | 1264 | ? item.element_id |
| 1268 | - : tabTitleId, | |
| 1265 | + : 'e-n-tab-title-' + elementUid + ( tabIndex + 1 ), | |
| 1269 | 1266 | tabUid = elementUid + tabCount, |
| 1270 | 1267 | tabIcon = elementor.helpers.renderIcon( view, item.tab_icon, { 'aria-hidden': true }, 'i' , 'object' ), |
| 1271 | 1268 | activeTabIcon = item.tab_icon_active.value |
| 1272 | 1269 | ? elementor.helpers.renderIcon( view, item.tab_icon_active, { 'aria-hidden': true }, 'i' , 'object' ) |
| @@ -1274,9 +1271,8 @@ | ||
| 1274 | 1271 | escapedHoverAnimationClass = _.escape( hoverAnimationClass ); |
| 1275 | 1272 | |
| 1276 | 1273 | view.addRenderAttribute( 'tab-title', { |
| 1277 | 1274 | 'id': tabId, |
| 1278 | - 'data-tab-title-id': tabTitleId, | |
| 1279 | 1275 | 'class': [ 'e-n-tab-title',escapedHoverAnimationClass ], |
| 1280 | 1276 | 'data-tab-index': tabCount, |
| 1281 | 1277 | 'role': 'tab', |
| 1282 | 1278 | 'aria-selected': 1 === tabCount ? 'true' : 'false', |