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

GH-39602 | Change label for adding inner-block button. #45238

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

koneweczka
Copy link

What?

Inner blocks have their own label for button. The name is generic.

Why?

To differ adding blocks (like navigation, columns, etc.) and inner blocks (items inside this blocks) according to this issue.

How?

Now inner blocks have generic label"Add new item" instead of "Add block".

Testing Instructions

  1. Add some blocks with inner block (columns, navigation, etc.)
  2. Label for it should be "Add new item".
  3. Label for regular block should still be "Add block".

Screenshots or screencast

obraz

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Oct 24, 2022
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @koneweczka! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

Copy link
Contributor

@alexstine alexstine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koneweczka Thanks for the PR. One thought below.

@@ -42,7 +42,7 @@ function ButtonBlockAppender(
);
} else {
label = _x(
'Add block',
'Add new item',
Copy link
Contributor

@alexstine alexstine Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This label is still generic. From an accessibility standpoint, it would be nice to hear what I am adding to what. It seems like it would make more sense to have something like this.

label = sprintf( _x( 'Add block to %s' ), parent_block_title );

Not sure how hard this would be to implement, but seems worth the time if we're already here.

@alexstine alexstine added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor [a11y] Labelling labels Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants