Bug 37412 - Style placeholder text in the OPAC
Summary: Style placeholder text in the OPAC
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Paul Derscheid
URL:
Keywords:
Depends on: 36651
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-19 13:26 UTC by Owen Leonard
Modified: 2024-10-21 13:12 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Screenshot showing re-styling of placeholder text (70.03 KB, image/png)
2024-07-19 13:26 UTC, Owen Leonard
Details
Bug 37412: Style placeholder text in the OPAC (1.15 KB, patch)
2024-07-19 13:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37412: Style placeholder text in the OPAC (1.21 KB, patch)
2024-07-19 14:28 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 37412: Style placeholder text in the OPAC (1.25 KB, patch)
2024-09-03 17:18 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37412: Style placeholder text in the OPAC (1.30 KB, patch)
2024-10-07 14:56 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2024-07-19 13:26:07 UTC
Created attachment 169222 [details]
Screenshot showing re-styling of placeholder text

In order to make the OPAC search bar's placeholder text easily distinguishable from regular text we should style it differently. To avoid using a lighter and thus less readable text color I propose to make the placeholder italic and right-aligned.
Comment 1 Owen Leonard 2024-07-19 13:39:37 UTC
Created attachment 169224 [details] [review]
Bug 37412: Style placeholder text in the OPAC

This patch adds a custom style to input placeholder text so that it is
visibly different from the style of text entered in the input.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)

Go to the OPAC and check the appearance of the placeholder text in the
main search bar. Sign off if the vibes are right.

Sponsored-by: Athens County Public Libraries
Comment 2 Roman Dolny 2024-07-19 14:28:11 UTC
Created attachment 169231 [details] [review]
Bug 37412: Style placeholder text in the OPAC

This patch adds a custom style to input placeholder text so that it is
visibly different from the style of text entered in the input.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)

Go to the OPAC and check the appearance of the placeholder text in the
main search bar. Sign off if the vibes are right.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Katrin Fischer 2024-09-02 09:38:42 UTC
Not trusting myself with these files - could you please rebase?
Comment 4 Owen Leonard 2024-09-03 17:18:29 UTC
Created attachment 170995 [details] [review]
Bug 37412: Style placeholder text in the OPAC

This patch adds a custom style to input placeholder text so that it is
visibly different from the style of text entered in the input.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)

Go to the OPAC and check the appearance of the placeholder text in the
main search bar. Sign off if the vibes are right.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 5 Paul Derscheid 2024-10-07 14:56:05 UTC
Created attachment 172481 [details] [review]
Bug 37412: Style placeholder text in the OPAC

This patch adds a custom style to input placeholder text so that it is
visibly different from the style of text entered in the input.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)

Go to the OPAC and check the appearance of the placeholder text in the
main search bar. Sign off if the vibes are right.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 6 Paul Derscheid 2024-10-07 15:23:02 UTC
Just a question, the intention here was to apply this styling to every ::placeholder, right?
Comment 7 Paul Derscheid 2024-10-07 15:23:26 UTC
So also for the search input in tables for example.
Comment 8 Fridolin Somers 2024-10-07 15:27:51 UTC
Great.

Maybe add left align in rigth-to-left CSS
(I cant find were it is in OPAC)
Comment 9 Pedro Amorim 2024-10-07 15:39:43 UTC
Providing my opinion here. I think the italic makes sense, but is text-align: right here necessary? It looks quite different.
I don't have scientific evidence to support my claims but I don't think it's often the case that search input placeholders are aligned to the right in web interfaces.
Comment 10 Lucas Gass (lukeg) 2024-10-07 16:59:09 UTC
(In reply to Pedro Amorim from comment #9)
> Providing my opinion here. I think the italic makes sense, but is
> text-align: right here necessary? It looks quite different.
> I don't have scientific evidence to support my claims but I don't think it's
> often the case that search input placeholders are aligned to the right in
> web interfaces.

I think this is only a matter of preference and can easily be adjusted with CSS if your prefer left vs right.
Comment 11 Owen Leonard 2024-10-07 17:47:51 UTC
(In reply to Pedro Amorim from comment #9)
> Providing my opinion here. I think the italic makes sense, but is
> text-align: right here necessary? It looks quite different.
> I don't have scientific evidence to support my claims but I don't think it's
> often the case that search input placeholders are aligned to the right in
> web interfaces.

I agree that it isn't typical. My goal was to achieve two things:

1. Style the placeholder with enough color contrast to comply with accessibility guidelines.
2. Style the placeholder in such a way that it doesn't look like actual text in the text field.
Comment 12 Katrin Fischer 2024-10-21 12:48:30 UTC
I agree the right-align is a bit uncommon, but let's go with that and gather some feedback maybe.
Comment 13 Katrin Fischer 2024-10-21 13:12:41 UTC
Pushed for 24.11!

Well done everyone, thank you!