Update AdvancedCriteria.tpl
authorNicol <vingle@users.noreply.github.com>
Sat, 2 Dec 2023 15:47:47 +0000 (15:47 +0000)
committerGitHub <noreply@github.com>
Sat, 2 Dec 2023 15:47:47 +0000 (15:47 +0000)
Makes the advanced search page more accessible.

templates/CRM/Contact/Form/Search/AdvancedCriteria.tpl

index b213089691fcfd6b395c65a05c07993e7e2544d2..20c7b8c0b2e2612cfb06b4af6b8be0255977da96 100644 (file)
@@ -86,37 +86,37 @@ CRM.$(function($) {
 {/if}
 
 {strip}
-  <div class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
-    <div class="crm-accordion-header">
+  <details class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
+    <summary class="crm-accordion-header">
       {ts}Display Settings For Results{/ts}
-    </div>
+    </summary>
     <div class="crm-accordion-body">
       {include file="CRM/Contact/Form/Search/Criteria/DisplaySettings.tpl"}
     </div>
-  </div>
-  <div class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
-    <div class="crm-accordion-header">
+  </details>
+  <details class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
+    <summary class="crm-accordion-header">
       {ts}Search Settings{/ts}
-    </div>
+    </summary>
     <div class="crm-accordion-body">
       {include file="CRM/Contact/Form/Search/Criteria/SearchSettings.tpl"}
     </div>
-  </div>
-  <div class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
-    <div class="crm-accordion-header">
+  </details>
+  <details class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
+    <summary class="crm-accordion-header">
       {ts}Basic Criteria{/ts}
-    </div>
+    </summary>
     <div class="crm-accordion-body">
       {include file="CRM/Contact/Form/Search/Criteria/Basic.tpl"}
     </div>
-  </div>
+  </details>
   {foreach from=$allPanes key=paneName item=paneValue}
-    <div class="crm-accordion-wrapper crm-ajax-accordion crm-{$paneValue.id}-accordion {if $paneValue.open eq 'true' || array_key_exists($paneName, $openedPanes)} {else}collapsed{/if}">
-      <div class="crm-accordion-header" id="{$paneValue.id}">
+    <details class="crm-accordion-wrapper crm-ajax-accordion crm-{$paneValue.id}-accordion {if $paneValue.open eq 'true' || array_key_exists($paneName, $openedPanes)} {else}open=""{/if}">
+      <summary class="crm-accordion-header" id="{$paneValue.id}">
         {$paneName}
-      </div>
+      </summary>
     <div class="crm-accordion-body {$paneValue.id}"></div>
-    </div><!-- Surplus /div is required (not sure why but breakage is obvious when you remove it) -->
+    </details><!-- Surplus /div is required (not sure why but breakage is obvious when you remove it) -->
   {/foreach}
   <div class="spacer"></div>