Update CustomDataView.tpl
authorNicol <vingle@users.noreply.github.com>
Sat, 2 Dec 2023 19:22:21 +0000 (19:22 +0000)
committerGitHub <noreply@github.com>
Sat, 2 Dec 2023 19:22:21 +0000 (19:22 +0000)
Makes the contact dashboard accordions for custom fields accessible using the <details><summary> pattern.

templates/CRM/Contact/Page/View/CustomDataView.tpl

index b895d1cdd5317d5d45e22ba08a82fce7e3f0cffc..e3b17525165d2c4e9142d8538be5282ce1f5f664 100644 (file)
   {assign var="count" value=$customGroupCount%2}
   {if ($count eq $side) or $skipTitle}
     {foreach from=$customValues item=cd_edit key=cvID}
-      <div class="customFieldGroup crm-collapsible{if !empty($cd_edit.collapse_display)} collapsed{/if} ui-corner-all {$cd_edit.name} crm-custom-set-block-{$customGroupId}">
-        <div class="collapsible-title">
+      <details class="customFieldGroup crm-accordion-wrapper ui-corner-all {$cd_edit.name} crm-custom-set-block-{$customGroupId}" {if !empty($cd_edit.collapse_display)} open{/if}>
+        <summary class="crm-accordion-header crm-master-accordion-header">
           {$cd_edit.title}
-        </div>
+        </summary>
         {if $cvID eq 0}
           {assign var='cvID' value='-1'}
         {/if}
         <div class="crm-summary-block" id="custom-set-block-{$customGroupId}-{$cvID}">
           {include file="CRM/Contact/Page/View/CustomDataFieldView.tpl" customGroupId=$customGroupId customRecId=$cvID cgcount=$cgcount}
         </div>
-      </div>
+      </details>
       {assign var="cgcount" value=$cgcount+1}
     {/foreach}
   {/if}