Make WordPress Core

Opened 18 months ago

Closed 13 months ago

Last modified 13 months ago

#57675 closed enhancement (fixed)

Placeholder for tagline is confusing

Reported by: cybr's profile Cybr Owned by: audrasjb's profile audrasjb
Milestone: 6.3 Priority: normal
Severity: normal Version: 6.1
Component: Administration Keywords: has-patch has-screenshots
Focuses: accessibility Cc:

Description

Previous: #6479 (Encourage people to change default tagline).

The default tagline got emptied. To maintain the iconic phrase "Just another WordPress site," it was put as a placeholder for the field.

Placeholders are generally bad for accessibility because many users cannot discern whether it's actual input or the real value. See https://www.nngroup.com/articles/form-design-placeholders/.

The highlights:

  1. Placeholder text that disappears when the cursor is placed in a form field is irritating for users navigating with the keyboard.
  2. Fields with stuff in them are less noticeable.
  3. Users may mistake a placeholder for data that was automatically filled in.
  4. Occasionally users have to delete placeholder text manually.

By putting e.g., in front of the placeholder, this may be somewhat alleviated. Perhaps it might be best to let go of the iconic phrase altogether until a proper admin interface is found where we may reintroduce it.

Attachments (9)

57675.patch (1.1 KB) - added by sabernhardt 18 months ago.
tagline-example-in-description.png (6.6 KB) - added by sabernhardt 18 months ago.
57675.1.patch (1.7 KB) - added by sabernhardt 18 months ago.
57675.2.patch (1.3 KB) - added by sabernhardt 15 months ago.
adding example to field description, without inline-block styling
Capture d’écran 2023-05-03 à 07.14.00.png (54.4 KB) - added by audrasjb 15 months ago.
57675.2.patch looks good, except we'd probably need a final dot in this paragraph?
Capture d’écran 2023-05-03 à 07.20.12.png (109.2 KB) - added by audrasjb 15 months ago.
Patch tested on multisite as well
screenshot-added-period.png (21.6 KB) - added by tb1909 13 months ago.
57675.3.patch (1014 bytes) - added by sabernhardt 13 months ago.
reducing translation calls
57675-translators-comment.diff (604 bytes) - added by costdev 13 months ago.
WPCS: Move translators comment to just above the __() call.

Download all attachments as: .zip

Change History (43)

This ticket was mentioned in Slack in #core by cybr. View the logs.


18 months ago

#2 @audrasjb
18 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.3

Hello and thanks for the ticket!

In my opinion, putting e.g., in front of the placeholder looks like the best option for now.

#3 @audrasjb
18 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

#4 @sabernhardt
18 months ago

  • Focuses accessibility added

Thanks for the ticket!

The tagline's placeholder does not replace a label, and its information is nonessential to complete the form. I do not think disappearing text is a problem for this field, but confusion about whether the example is the input's predefined value still could be a concern. The example tagline may fit better within the description paragraph.

@sabernhardt
18 months ago

#5 @sabernhardt
18 months ago

  • Keywords has-patch added; needs-patch removed

#6 @Cybr
18 months ago

I think @sabernhardt's patch deals perfectly with all the concerns described.

Though the added text relies on vertical and code-indented spacing to add a space between the two lines, doing that bit me at least once during refactorization.

Opening and closing PHP tags isn't great for performance, either. But this is nitpicking.

#7 @sabernhardt
18 months ago

Nitpicking is good. I missed the __() translation function, too.

Also, I would like to consider keeping the example on one line with a reusable class for display: inline-block (I have wanted the class for something else before).

@sabernhardt
15 months ago

adding example to field description, without inline-block styling

#8 @sabernhardt
15 months ago

I removed the new inline-block class from the patch. Searching for an 'inline-block' class included a plugin that adds vertical-align: middle, and others may have inappropriate properties for this description. Besides, it was not clearly better with that span.

@audrasjb
15 months ago

57675.2.patch looks good, except we'd probably need a final dot in this paragraph?

#9 @audrasjb
15 months ago

  • Keywords has-screenshots added

57675.2.patch looks good to me. Should we have a final dot in English, though?

@audrasjb
15 months ago

Patch tested on multisite as well

#10 @sabernhardt
15 months ago

The period should be unnecessary with the "Example: [tagline]" structure, though it could easily be appropriate in translations. In U.S. English, the period would go inside the quotes, which I do not like here.

#11 @audrasjb
15 months ago

Ok then we have to add a period inside the quote of the existing string, right?

#12 @Cybr
15 months ago

The clearest notion about whether the period should be in or outside is this (source):

The final period or comma goes inside the quotation marks, even if it is not a part of the quoted material, unless the quotation is followed by a citation.

Since we aren't dealing with a citation, and since the default WordPress language is en_US, the period should be inside the quote marks.

I'm not a fan of this either when dealing with example strings that don't have punctuation intended — for the user could infer they should also use punctuation —, but I think we should follow the books. I couldn't find a single source claiming exceptions for American English.

We could somewhat workaround the inference by writing "Just another WordPress site," for example., but even then we have punctuation.

#13 @pavanpatil1
14 months ago

Test report - https://core.trac.wordpress.org/attachment/ticket/57675/57675.2.patch

Environment:
WordPress: v6.2.2
Browser: Chrome
Os - Win10

Screenshot- https://prnt.sc/3zfv7AacldMD

The patch is looking good!

#15 @audrasjb
14 months ago

Fine, thanks @Cybr. PR4559 adds a period in the translatable string.

Note: I did not add it to the "Just another WordPress site" string because translators wouldn't be easily able to move the period out of the quotation marks.

#16 @oglekler
13 months ago

  • Keywords needs-testing added

#17 @tb1909
13 months ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/4559/commits/d22f3098bd1ecc2e281af734169aeba955b71d50

Environment

  • OS: macOS 13.4
  • Web Server: Nginx
  • PHP: 8.1.13
  • WordPress: 6.3-alpha-55505-src
  • Browser: Safari 15.4
  • Theme: Twenty Twenty-Two
  • Active Plugins:

none

Actual Results

  • ✅ Issue resolved with patch. Period displayed as described in ticket (see screenshot).

Additional Notes

  • Just in other languages as e.g. German the "example" text is not translated. Result string in German: "Erkläre in ein paar Worten, worum es auf deiner Website geht. Example: “Eine weitere WordPress-Website.”".

But I am unsure whether that will be added later by the polygots team or whether it is an issue worth mentioning here

Supplemental Artifacts

https://core.trac.wordpress.org/raw-attachment/ticket/57675/screenshot-added-period.png

#18 @audrasjb
13 months ago

  • Keywords commit added; needs-testing removed

Thanks for testing @tb1909. Yes, this string will be translated once 6.3 is released :)

Marking as good to commit.

#19 @audrasjb
13 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 55969:

Administration: Replace Tagline option placeholder with a description.

As placeholders may introduce confusion about whether the example is the input's predefined value or not, this changeset moves the "Just another WordPress
site" historic tagline as an example quoted in the field's description.

Props Cybr, audrasjb, sabernhardt, pavanpatil1, tb1909.
Fixes #57675.

#21 @swissspidy
13 months ago

Why does this concatenate strings using sprintf? Seems like this could just be a single translation call.

@sabernhardt
13 months ago

reducing translation calls

#22 @sabernhardt
13 months ago

  • Keywords commit removed

I remember wanting to keep the existing translations, but 57675.3.patch adds the example to the description string in case it is better in one translation.

I also put the single-site example in a condition so multisite installations do not translate both versions.

#23 @audrasjb
13 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to address comment:21 considerations.

This ticket was mentioned in Slack in #accessibility by sabernhardt. View the logs.


13 months ago

#25 @audrasjb
13 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 56013:

Administration: Reduce translation calls after [55969].

Follow-up to [55969].

Props swissspidy, sabernhardt.
Fixes #57675.

@costdev
13 months ago

WPCS: Move translators comment to just above the __() call.

#26 @costdev
13 months ago

@audrasjb Just noticed this warning from WPCS:

Line 90 | A gettext call containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders. (WordPress.WP.I18n.MissingTranslatorsComment)

57675-translators-comment.diff moves the translators comment to just above the __() call to resolve this warning.

#27 @sabernhardt
13 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#28 @Presskopp
13 months ago

I have concerns about the solution:

1) The example is misleading, the tagline should be meaningful, and just not like in the example

Using a unique and descriptive tagline is important for search engine optimization (SEO) purposes, as it helps convey the website's purpose and relevance to both search engines and visitors.

2) The “ and ” could be misunderstood so people would enter quotation marks into the tagline.

This can impact the visual presentation and readability of the tagline to visitors.

To keep the iconic phrase "Just another WordPress site" while being informative at the same time we could formulate:

Please provide a brief description of what this site is about. Avoid using "Just another WordPress site."

#29 @audrasjb
13 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 56203:

I18n: Move translator comments inside sprintf for tagline field description.

Props costdev.
Fixes #57675.

#30 @audrasjb
13 months ago

Good catch @costdev, fixed!

Thanks for pointing this @Presskopp but this would probably require a follow-up ticket because, it's a bit to late in the release cycle to start a discussion about the iconic phrase.

In my opinion, Avoid using "Just another WordPress site." is worse than removing the iconic phrase entirely, because it's a very negative way to use it :D

#31 @Presskopp
13 months ago

Well, that was an example. Ok. I will raise a new ticket then shortly. The new line could be more like:

We hope your website is not "Just another WordPress site."

#32 @costdev
13 months ago

Quick check: The . is currently inside the quotes. Should this be moved outside of them?

In a few words, explain what this site is about. Example: “Just another WordPress site.”

vs

In a few words, explain what this site is about. Example: “Just another WordPress site”.


Nevermind, I missed this comment.

Last edited 13 months ago by costdev (previous) (diff)

#33 @Presskopp
13 months ago

Let's continue here: #58781

#34 @sabernhardt
13 months ago

I really do not want to reopen this ticket again, but I also don't like the idea of replacing the description string (and its translations) both now and again in the near future. Reverting changes before hard string freeze might still be an option to keep the previously translated string.

Note: See TracTickets for help on using tickets.