Bug 35407: Correct terminology: Show fewer collections

In the OPAC, the "Show more" and "Show less" links have aria-labels to
make their function clearer to screen readers. The collection and item
type controls need corrected terminology, and the links also need to
have their template filter corrected (html, not uri).

To test, apply the patch and perform a catalog search in the OPAC.

- Test that the "Show more" and "Show less" links in the facets sidebar
  work correctly to expand and collapse the lists of facets.
- It's not necessary to test with a screen reader. You can view the
  source to confirm the markup on the "Show more collections" and "Show
  more item types" links.

  Before:
  <a href="#" aria-label="%0A%20%20%20%20Show%20more%20collection%20codes%0A"><strong>Show more</strong></a>

  After:
  <a href="#" aria-label="Show more collections"><strong>Show more</strong></a>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Owen Leonard 2023-12-04 15:47:23 +00:00 committed by Katrin Fischer
parent ec95c63d41
commit 24845a8861
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -45,8 +45,8 @@
[% more_less_labels.Topics = { more = t("Show more topics"), less = t("Show fewer topics") } %]
[% more_less_labels.Places = { more = t("Show more places"), less = t("Show fewer places") } %]
[% more_less_labels.Series = { more = t("Show more series"), less = t("Show fewer series") } %]
[% more_less_labels.ItemTypes = { more = t("Show more types"), less = t("Show fewer types") } %]
[% more_less_labels.CollectionCodes = { more = t("Show more collection codes"), less = t("Show fewer collection codes") } %]
[% more_less_labels.ItemTypes = { more = t("Show more item types"), less = t("Show fewer item types") } %]
[% more_less_labels.CollectionCodes = { more = t("Show more collections"), less = t("Show fewer collections") } %]
[% more_less_labels.Language = { more = t("Show more languages"), less = t("Show fewer languages") } %]
[% more_less_labels.HomeLibrary = { more = t("Show more home libraries"), less = t("Show fewer home libraries") } %]
[% more_less_labels.HoldingLibrary = { more = t("Show more holding libraries"), less = t("Show fewer holding libraries") } %]
@ -103,14 +103,14 @@
<li class="moretoggle">
[% FOR label IN more_less_labels.keys %]
[% IF facets_loo.item('type_label_' _ label) %]
<a href="#" aria-label="[% more_less_labels.item(label).more | uri %]"><strong>Show more</strong></a>
<a href="#" aria-label="[% more_less_labels.item(label).more | html | trim %]"><strong>Show more</strong></a>
[% END %]
[% END %]
</li>
<li class="moretoggle" style="display:none">
[% FOR label IN more_less_labels.keys %]
[% IF facets_loo.item('type_label_' _ label) %]
<a href="#" aria-label="[% more_less_labels.item(label).less | uri %]"><strong>Show less</strong></a>
<a href="#" aria-label="[% more_less_labels.item(label).less | html | trim %]"><strong>Show less</strong></a>
[% END %]
[% END %]
</li>