Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components: Update control labels to the new uppercase styles #42782

Closed
Tracked by #34345
mirka opened this issue Jul 28, 2022 · 7 comments · Fixed by #42789
Closed
Tracked by #34345

Components: Update control labels to the new uppercase styles #42782

mirka opened this issue Jul 28, 2022 · 7 comments · Fixed by #42789
Assignees
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@mirka
Copy link
Member

mirka commented Jul 28, 2022

The control labels need to be updated to the new uppercase styles:

Mockup for the redesigned typography panel

@mirka mirka added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Jul 28, 2022
@mirka mirka self-assigned this Jul 28, 2022
@mirka mirka added this to Inbox (needs triage) 📬 in WordPress Components via automation Jul 28, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 28, 2022
@carolinan carolinan added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Jul 28, 2022
@carolinan
Copy link
Contributor

carolinan commented Jul 28, 2022

I know there are different research results and opinions, but has there at least been a discussion about the use of all caps and readability impact before this proposed change is merged?

@mirka
Copy link
Member Author

mirka commented Jul 29, 2022

I know there are different research results and opinions, but has there at least been a discussion about the use of all caps and readability impact before this proposed change is merged?

Good question! First off, I assume the intent is to aid the user in perceiving the information hierarchy more easily by adding more visual differentiation. And labels are pretty short by nature, so I don't think it'll get to the point where readability is clearly harmed. Just my opinion though.

Given that we're decreasing the font-size to 11px, I would actually be more concerned about non-Latin characters, especially those that don't have uppercase. For example, readability issues can start to creep up with CJK characters earlier than uppercased Latin characters. But the codebase already contains a good number of label-like text at 11px (but no smaller), so I guess that's kind of like our de facto lower bound.

@pablohoneyhoney has been leading the redesign, I'll defer to him for more in-depth reasoning. (cc @WordPress/gutenberg-design)

@mirka
Copy link
Member Author

mirka commented Aug 5, 2022

It's been a week so we're going to be merging this for now. But if folks wants to continue this discussion, I just wanted to note that the label styles will be very easy to change moving forward, thanks to the refactor.

WordPress Components automation moved this from Inbox (needs triage) 📬 to Done 🎉 Aug 5, 2022
@bobbingwide
Copy link
Contributor

I believe this change has caused a problem for the Jetpack Consent block.
bobbingwide/bobbingwide#77

@mirka
Copy link
Member Author

mirka commented Sep 19, 2022

@bobbingwide Hi there! I'm not sure what the Jetpack Consent block is, but based on the screenshot you posted in #34345 (comment), it looks like multiple things are wrong with the block's implementation. For example, the "By submitting your information..." text is too long and inappropriate for something to put in a label element. The checkbox label also seems to be nested within the original label, which is incorrect as well. Could you perhaps open an issue in the repo where the Jetpack Consent block lives? These are not merely visual issues but semantic issues as well, so they should definitely be addressed.

@bobbingwide
Copy link
Contributor

@mirka The problem is that the text in the <label> is being uppercased by the block editor, which makes it fairly unusable as a text entry field.
Assuming no one else is going to attempt to answer @carolinan's concern, I still believe the CSS should be more appropriately targetted to the block editor's labels in the settings area.

BTW: I've since found more blocks that have been adversely affected by this change.

@mirka
Copy link
Member Author

mirka commented Oct 5, 2022

@mirka The problem is that the text in the <label> is being uppercased by the block editor, which makes it fairly unusable as a text entry field. Assuming no one else is going to attempt to answer @carolinan's concern, I still believe the CSS should be more appropriately targetted to the block editor's labels in the settings area.

Yes, the thing is that the component labels we uppercased are not intended to be used as text entry fields, and even when they are for some reason, those label elements probably shouldn't contain strings too long to be readable in all caps. And note that we did not uppercase the label for the CheckboxControl component, because that would indeed be unreadable. So if a block is using these components in such a manner, that needs to be addressed on the block's side.

BTW: I've since found more blocks that have been adversely affected by this change.

Good to know! If you could post some links to their code we could perhaps give better guidance on usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
Development

Successfully merging a pull request may close this issue.

4 participants