-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Description
Splitting this out from #56259 and #59303 (comment)
Potentially solves also #60120
Cc @getdave @WordPress/gutenberg-design
Currently, the Social Icons block shows two placeholders:
When the block is selected
The block shows a 'Click plus to add' text and a 'plus' icon button at the right edge of the block, labeled 'Add block'. This button is the standard 'block list appender toggle' used for other blocks as well. Screenshot:
This doesn't seem to be ideal for a few reasons:
- The text 'Click plus to add' is pretty unique in the editor. As such it is inconsistent and pretty confusing.
- It doesn't tell anything useful to blind screen reader users: with no vision, I have no idea what the 'plus' thinkg I am supposed to clik is and where it is. I can only perceive a button that is labeled 'Add block'. The word 'plus' only refers to the visual aspect of a control, as such it is inappropriate.
- Quoting from Polish Social Icons setup state to make adding blocks more intuitive #56259:
- The instructional text contains the word "Click" which makes you assume you can click to add. This is not the case.
- The plus icon is aligned to far right and is disconnected from where the user is naturally drawn
When the block is not selected
The placeholder changes to 3 colored squares. Screenshot:
This doesn't seem to be ideal for a few reasons:
- While I do understand the intent to _show something that resembles a sort of social icons preview, I'm not sure a placeholder should ever change dynamically in the first place. This is inconsistent with how many other placeholders work and I'd say it's unexpected and confusing
- To me, they just look like 3 colored squares. They don't suggest any particular meaning and I'm not sure they add great value.
- They are just empty
<div>elements with a background color set. Note: they do contain a CSS generated::beforepseudo element. It is not visible and it's not clear to me what its purpose is. Maybe a leftover. In the screenshot below I set a black background color on it to better illustrate:
Proposal
Quoting from #56259
- consider a placeholder state whereby a placeholder icon acts as the inserter
I'd totally agree the placeholder should be a button to 'add' social links. Other blocks already use similar placeholders, for example Row, Stack, Grid. They use a rectangular button with a plus icon. I'd like to propose to use the same kind of button and sytling, just making the button rounded in this case.
Very rough screenshots:
The new 'Add' button should show when first inserting the empty block and always shown at the end when the blosk is selected and being edited:
The button should not be shown when the block is not selected or not being edited:
Consider to make the button label visible (spacing to be improved):
Making the button available when editing would also solve the keyboard operability reported at #60120
Step-by-step reproduction instructions
N/A
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes





