Bug 40720 - Misleading title attribute "Remove all items" in Select2 fields
Summary: Misleading title attribute "Remove all items" in Select2 fields
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Laura Escamilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-28 12:48 UTC by elina.uotila
Modified: 2025-11-03 08:43 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Improvement: Updated Select2 title text for clarity This patch updates the Select2 initialization script to improve accessibility and clarity. The title attribute on the “X” control (used to clear selections in Select2 dropdowns) now reads “Clear selections” instead of “Clear items,” eliminating ambiguity.
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 40720: Misleading title attribute "Remove all items" in Select2 fields (1.63 KB, patch)
2025-10-28 14:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40720: Misleading title attribute "Remove all items" in Select2 fields (1.63 KB, patch)
2025-10-28 14:54 UTC, Slava Shishkin
Details | Diff | Splinter Review
Bug 40720: Misleading title attribute "Remove all items" in Select2 fields (1.69 KB, patch)
2025-10-28 15:03 UTC, Slava Shishkin
Details | Diff | Splinter Review
Bug 40720: Misleading title attribute "Remove all items" in Select2 fields (1.75 KB, patch)
2025-10-30 13:35 UTC, Laura Escamilla
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description elina.uotila 2025-08-28 12:48:09 UTC
When editing an item record (for example, changing its current not for loan value) and hovering the cursor over the x symbol at the end of the field, Koha displays the tooltip text "remove all items".

This wording is misleading, as the function does not remove any items from the database. Instead, it clears the selected value(s) in the drop-down menu. The affected text string comes from the messages-js.po file and is used by Select2 (koha-tmpl/intranet-tmpl/prog/js/select2.js:26).

The fields where this text is used are all drop-down menus that are not directly related to items, so the wording "items" is confusing in this context. Would it be possible to change the phrase "remove all items" in Select2 to something more accurate, such as "remove selection"?
Comment 1 Owen Leonard 2025-10-28 14:34:25 UTC
Created attachment 188513 [details] [review]
Bug 40720: Misleading title attribute "Remove all items" in Select2 fields

This patch updates our Select2 initialization script to update the
strings used as title attributes on the "X" control which appears in a
Select2 dropdown when you've made a selection.

The updated text reads "Clear selections" in order to eliminate the
ambiguity of the word "items."

To test, apply the patch and clear your browser cache.

- Go to Catalog -> Item search.
- Make one or more selections in any of the Select2 dropdowns (e.g. Home
  library, current library, item type, etc.).
- An "X" should appear at the end of the field after you've made one or
  more selections.
- Hover your mouse over the "X." The title which appears should read
  "Clear selections."

Sponsored-by: Athens County Public Libraries
Comment 2 Slava Shishkin 2025-10-28 14:54:02 UTC Comment hidden (obsolete)
Comment 3 Slava Shishkin 2025-10-28 15:03:07 UTC
Created attachment 188519 [details] [review]
Bug 40720: Misleading title attribute "Remove all items" in Select2 fields

This patch updates our Select2 initialization script to update the
strings used as title attributes on the "X" control which appears in a
Select2 dropdown when you've made a selection.

The updated text reads "Clear selections" in order to eliminate the
ambiguity of the word "items."

To test, apply the patch and clear your browser cache.

- Go to Catalog -> Item search.
- Make one or more selections in any of the Select2 dropdowns (e.g. Home
  library, current library, item type, etc.).
- An "X" should appear at the end of the field after you've made one or
  more selections.
- Hover your mouse over the "X." The title which appears should read
  "Clear selections."

Sponsored-by: Athens County Public Libraries

Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Comment 4 Laura Escamilla 2025-10-30 13:35:55 UTC
Created attachment 188653 [details] [review]
Bug 40720: Misleading title attribute "Remove all items" in Select2 fields

This patch updates our Select2 initialization script to update the
strings used as title attributes on the "X" control which appears in a
Select2 dropdown when you've made a selection.

The updated text reads "Clear selections" in order to eliminate the
ambiguity of the word "items."

To test, apply the patch and clear your browser cache.

- Go to Catalog -> Item search.
- Make one or more selections in any of the Select2 dropdowns (e.g. Home
  library, current library, item type, etc.).
- An "X" should appear at the end of the field after you've made one or
  more selections.
- Hover your mouse over the "X." The title which appears should read
  "Clear selections."

Sponsored-by: Athens County Public Libraries

Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 5 Lucas Gass (lukeg) 2025-10-31 21:29:30 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 6 Jonathan Druart 2025-11-03 08:43:06 UTC
Owen's authorship has been dropped here (?)