diff --git a/formatters/tabs/horizontal-tabs.js b/formatters/tabs/horizontal-tabs.js
index 0c37bc7..8b87a22 100644
--- a/formatters/tabs/horizontal-tabs.js
+++ b/formatters/tabs/horizontal-tabs.js
@@ -51,28 +51,32 @@
               );
               tabList.removeClass('visually-hidden');
 
-              let summary;
+              let tabTitle;
               /* eslint max-nested-callbacks: ['error', 4] */
               // Transform each details into a tab.
               $details.each((i, element) => {
                 const $thisDetail = $(element);
-                const summaryElement = $thisDetail.find('> summary');
-                const detailsTitle = summaryElement
+                const $summaryElement = $thisDetail.find('> summary');
+                const $detailsTitle = $summaryElement
                   .first()
                   .find('.details-title');
-                if (detailsTitle.length) {
-                  summary = detailsTitle
-                    .find('> span:last-child')
-                    .html()
-                    .trim();
+                if ($detailsTitle.length) {
+                  tabTitle = $detailsTitle.find('> span:last-child').html();
                 } else {
-                  summary =
-                    summaryElement.clone().html().trim() ||
-                    summaryElement.find('> span:first-child').html().trim();
+                  // Remove the required mark element from the tab title, if it
+                  // exists (e.g. gin theme will have it twice).
+                  tabTitle =
+                    $summaryElement
+                      .clone()
+                      .find('.required-mark')
+                      .remove()
+                      .end()
+                      .html() ||
+                    $summaryElement.find('> span:first-child').html();
                 }
 
                 const horizontalTab = new Drupal.HorizontalTab({
-                  title: summary,
+                  title: tabTitle,
                   details: $thisDetail,
                 });
                 horizontalTab.item.addClass(`horizontal-tab-button-${i}`);
