Remove the 'autocomplete' suffix from the restituted label of a facet

Created on 2 January 2024, 12 months ago

Problem/Motivation

Hi,
First of all, thank you for making this module available, it's really useful!

Version 2.1.3 (on Drupal 10) of the module automatically adds a suffix to the facet label:

$this->t('@name autocomplete', [
        @name' => $facet->label(),
]).

File : Drupal\facets_autocomplete\Plugin\facets\widget\AutoCompleteWidget

This is a little confusing because if you want to display this label to the user or render it via a screen reader (a11y), this information will be used by default. However, you don't necessarily want to include this information in the label.

Proposed resolution

I recommend removing the suffix and entering it directly in the facet label. This gives the webmaster complete control over the name to be displayed. He can also translate it from the facet translation administration interface.

🐛 Bug report
Status

Needs review

Version

2.1

Component

User interface

Created by

🇷🇪Réunion Martygraphie Saint-Denis (Réunion)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024