Skip to content

Commit 9eb3471

Browse files
committed
Use of htmlAttributes
1 parent e345976 commit 9eb3471

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

themes/bootstrap5/templates/search/facet-list.phtml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@
4444

4545
<?php
4646
$supportsFacetFiltering = $this->results->getParams()->supportsFacetFiltering($this->facet) === true;
47+
$divAttrs = $this->htmlAttributes([
48+
'class' => 'facet-lightbox-filter form-group hidden',
49+
'role' => 'group',
50+
]);
51+
if ($supportsFacetFiltering) {
52+
$divAttrs->add('aria-labelledby', 'facet-lightbox-filter-label');
53+
}
4754
?>
48-
<div
49-
class="facet-lightbox-filter form-group hidden"
50-
role="group"
51-
<?= $supportsFacetFiltering ? 'aria-labelledby="facet-lightbox-filter-label"' : '' ?>
52-
>
55+
<div<?= $divAttrs ?>>
5356
<?php if ($supportsFacetFiltering): ?>
5457
<label id="facet-lightbox-filter-label" class="form-label" for="input-contains"><?=$this->transEsc('Filter') ?></label>
5558
<input id="input-contains" class="ajax_param form-control" data-name="contains" type="text" value="<?=htmlspecialchars($this->contains)?>" aria-label="<?=$this->transEscAttr('search_terms')?>">

0 commit comments

Comments
 (0)