WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.2k forks source link

Copy: Inconsistent capitalization of labels in tooltips and dropdown menus #16764

Closed gziolo closed 4 years ago

gziolo commented 5 years ago

Related: #12366.

Some examples of tooltips existing as of today in different places of the block editor:

Screen Shot 2019-07-26 at 10 05 36 Screen Shot 2019-07-26 at 10 05 40 Screen Shot 2019-07-26 at 10 05 47 Screen Shot 2019-07-26 at 10 05 52 Screen Shot 2019-07-26 at 10 06 04 Screen Shot 2019-07-26 at 10 06 08 Screen Shot 2019-07-26 at 10 06 12 Screen Shot 2019-07-26 at 10 06 17 Screen Shot 2019-07-26 at 10 06 25

Some examples of dropdown menus:

Screen Shot 2019-07-26 at 10 11 04 Screen Shot 2019-07-26 at 10 11 09 Screen Shot 2019-07-26 at 10 11 13 Screen Shot 2019-07-26 at 10 11 46

When working on #16557 I also noticed this interesting case where the same controls can be displayed in the dropdown or inline:

Screen Shot 2019-07-26 at 10 13 25 Screen Shot 2019-07-26 at 10 13 32

In both cases, they use the same labels. My proposal is to use the same capitalization in tooltips as we do for labels in dropdown menus to make everything easier.

gziolo commented 5 years ago

@mapk and @karmatosed - do we have guidelines around it?

karmatosed commented 5 years ago

Core usese:

image

That feels like the best pattern to stick to and be consistent.

sarahmonster commented 5 years ago

From our copy guidelines:

Feature names and dashboard sections typically use title case (think “Site Stats” or “Recently Published”), whereas feature labels typically use sentence case (like “Show buttons on” or “Comment Likes are,” where “Likes” is capitalized because it’s the feature name, but the overall label is using sentence case).

It sounds like we may need to give more examples here to make it super clear for future usage as well.

The above rather reads as though tooltips and the like would be classified as "feature labels" (and thus should use sentence case), but the majority of these seem to be using title case.

The guidelines for core say that the following should use title case:

Labels Button labels Actions

Again, this may be a bit vague and warrants further clarification (is a tooltip a label?) once we've decided on a pattern here. More explicit guidelines may be required to ensure a more consistent experience.

Seems like most tooltips in wp-admin use sentence case:

2019-07-29 22 45 26

afercia commented 5 years ago

Previously: https://github.com/WordPress/gutenberg/pull/4832 / https://github.com/WordPress/gutenberg/issues/4325

gziolo commented 5 years ago

In the example, @sarahmonster shared, there is this exact issue which triggered my willingness to unify everything. You see Add Contact Form (title-case) as the label of the button in the top section but in the toolbar, there is Add contact form (sentence-case) in the tooltip. In addition, we are planning to introduce a setting which allows displaying tooltips as labels for icon-only buttons. It would be much easier to have one way to handle all those 3 use cases with one version of text rather than provide 2 or 3 versions depending on the context. This would also further simplify the process of translation. Otherwise, we will have to add logic which displays a proper version of the text.

afercia commented 5 years ago

Some past (Dec. 2014) conversation on Slack about title-casing: https://wordpress.slack.com/archives/core/p1418759343002024

Personally, I'm not sure I understand all this extensive usage of title-casing. I do realize it's more a traditional thing in English typography. However, title-casing it's not used in many other countries.

In Europe, it's very rarely used. Just have a quick look at the most important online newspapers from France, Germany, Spain, Italy, etc. and even UK: no title-casing there. Can anyone provide an example of a big news site that uses title-casing? I doubt it's used on US big news sites as well.

A few quick questions 🙂

I can only tell that one of the items in the Italian polyglots guidelines is to avoid title-casing at all costs.

That said, inconsistencies in the admin are everywhere so this is not just a Gutenberg issue. Example:

"Remove From Bulk Edit" "Restore from Trash"

Any reason why from is title-cased in the first sentence and it's not in the second sentence?

Also, there are cases of slightly excessive usage of title-casing. For example, things like

"Log Out Everywhere Else" (formerly "Log Out of All Other Sessions")

look a bit excessive to me.

Overall, I'd tend to think the intent to reduce inconsistency is very valuable but maybe the best option would be to drastically simplify and just use normal sentence-casing.

gziolo commented 5 years ago

Overall, I'd tend to think the intent to reduce inconsistency is very valuable but maybe the best option would be to drastically simplify and just use normal sentence-casing.

I'm fine with that as well. Whatever makes more sense and makes life simpler for developers, translators, and more importantly users.

In Europe, it's very rarely used. Just have a quick look at the most important online newspapers from France, Germany, Spain, Italy, etc. and even UK: no title-casing there. Can anyone provide an example of a big news site that uses title-casing? I doubt it's used on US big news sites as well.

The same applies to Polish. Some examples from Facebook:

Screen Shot 2019-07-30 at 21 24 03 Screen Shot 2019-07-30 at 21 23 41 Screen Shot 2019-07-30 at 21 24 19 Screen Shot 2019-07-30 at 21 24 27

By the way, GitHub uses sentence case for buttons when using English :)

mapk commented 5 years ago

Based on @sarahmonster's digging, other comments in this thread, and my own personal feelings 😉, I'm much more inclined to use Sentence-case for the tooltips. I'm sure we can add documentation to support this decision, but this can be justified by saying tooltips are not "Labels, Button Labels, or Actions" so we should be good to go.

karmatosed commented 5 years ago

Can we loop back to core a patch to also change that? I know it's a big ask but unifying here would be a nice addition.

enriquesanchez commented 5 years ago

Regarding the accessibility of sentence case vs. title case, there does not seem to be any consensus or formal studies that prioritize one over the other.

I was able to dig this Microsoft study that briefly touches on the topic of alternating case, which is not exactly what's being discussed here, as it refers to a single word.

It does however offer some insights that I think can be expanded to our situation:

The fourth piece of evidence supporting the word shape model is that it is difficult to read text in alternating case. AlTeRnAtInG case is where the letters of a word change from uppercase to lowercase multiple times within a word. The word shape model predicts that this is difficult because it gives a pattern of ascending, descending, and neutral characters that is different than exists in a word in its natural all lowercase form. Alternating case has been shown to be more difficult than either lowercase or uppercase text in a variety of studies. Smith (1969) showed that it slowed the reading speed of a passage of text, Mason (1978) showed that the time to name a word was slowed, Pollatsek, Well, & Schindler (1975) showed that same-difference matching was hindered, and Meyer & Gutschera (1975) showed that category decision times were decreased.

I vote for consistency but also maintainability. I think title case will lead to more errors and inconsistency in the future, since it's not an international practice.

Also, have y'all seen that we use title case for our GitHub labels? 😝

afercia commented 5 years ago

I vote for consistency but also maintainability. I think title case will lead to more errors and inconsistency in the future, since it's not an international practice.

+1 to this 🙂

Also, have y'all seen that we use title case for our GitHub labels?

🙈

sarahmonster commented 5 years ago

WordPress uses a lot of title case. I'd love to see us start to shift toward more sentence case where possible:

Some more reading on the topic:

karmatosed commented 5 years ago

@enriquesanchez we use title case for labels because it was used in other interactions. It's a loop where it was first in core then propagated throughout :)

mapk commented 5 years ago

Can we unpropagate it? Like what if we start using Sentence case in Gutenberg and at least submit a Trac issue for Core? A little reverse-propagation never hurt anyone, right? 😉

gziolo commented 5 years ago

Can we unpropagate it? Like what if we start using Sentence case in Gutenberg and at least submit a Trac issue for Core? A little reverse-propagation never hurt anyone, right? 😉

I’d love to see it happen. It was my intention that we bet on one approach and apply it everywhere. I must admit that seeing GitHub using sentence case for buttons every time I comment here convinced me to follow this approach. 😃

gziolo commented 5 years ago

17336 fixes it only partially.

mapk commented 5 years ago

While #17336 fixes the tooltips, we now need another PR to cover the popover component and change those options to Sentence Case too.

Examples:

61936851-d6c51300-af8d-11e9-9e80-4955cb5a4c1d

61936966-17bd2780-af8e-11e9-9905-bf58e1e845a7

karmatosed commented 4 years ago

@mapk as we now have a PR in #18758, could this be closed?

mapk commented 4 years ago

Yep! PR is merged, let's close this!

gziolo commented 4 years ago

Awesome work @karmatosed and @mapk. Thank you for wrangling it. It should make everything more consistent :)