Skip to content
Snippets Groups Projects
Commit ced76acf authored by Claas Kazzer's avatar Claas Kazzer Committed by Robert Lange
Browse files

refs #21185 [fid_adlr] corrects aria-expanded on side facets

parent 47bb41d2
Branches
Tags
No related merge requests found
......@@ -37,7 +37,7 @@ if ($hierarchicalFacets) {
</div>
<?php endif; ?>
<?php endif; ?>
<?php $extraFilters = isset($this->extraSideFacetFilters) ? $this->extraSideFacetFilters : []; ?>
<?php $extraFilters = $this->extraSideFacetFilters ?? []; ?>
<?php $collapsedFacets = $this->recommend->getCollapsedFacets() ?>
<?php $filterList = array_merge($results->getParams()->getFilterList(true), $extraFilters); ?>
<?php if (!empty($filterList)): ?>
......@@ -47,7 +47,7 @@ if ($hierarchicalFacets) {
'filterList' => $filterList,
]);?>
<?php endif; ?>
<?=isset($this->sideFacetExtraControls) ? $this->sideFacetExtraControls : ''?>
<?=$this->sideFacetExtraControls ?? ''?>
<?php
/* finc-specific line to show allowed facet values only: sidefacet()->displayAllowedFacetValues ..., #7624 - CK */ /* Original line is:
<?php $sideFacetSet = $this->recommend->getFacetSet(); ?>
......@@ -59,8 +59,11 @@ if ($hierarchicalFacets) {
<?php if (!empty($sideFacetSet) && $results->getResultTotal() > 0): ?>
<?php foreach ($sideFacetSet as $title => $cluster): ?>
<div class="facet-group" id="side-panel-<?=$this->escapeHtmlAttr($title)?>">
<button class="title<?php if(in_array($title, $collapsedFacets)): ?> collapsed<?php endif ?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" >
<button
<?php if (in_array($title, $collapsedFacets)): ?>class="title collapsed" aria-expanded="false" <?php else: ?>class="title" aria-expanded="true"<?php endif ?> data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>"
>
<?=$this->transEsc($cluster['label'])?>
<span class="sr-only"><?=$this->transEsc('facet_select_hint') ?>
</button>
<ul id="side-collapse-<?=$this->escapeHtmlAttr($title)?>" class="collapse<?php if (!in_array($title, $collapsedFacets)): ?> in<?php endif ?>">
<?=$this->context($this)->renderInContext(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment