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

Template editing: When a post or page has no title, the edit (title) button has no visible text #32962

Open
carolinan opened this issue Jun 24, 2021 · 0 comments

Comments

@carolinan
Copy link
Contributor

@carolinan carolinan commented Jun 24, 2021

Description

When you create a new template for a post that has no title, the "edit (title)" button in the toolbar
is printed, but it has no visible text:
<button type="button" data-toolbar-item="true" class="components-button edit-post-template-post-title is-link" aria-label="Edit "></button>

Step-by-step reproduction instructions

  1. With template editing enabled, create a new post. Do not add a title to the post.
  2. In the Template panel, select "new". Create a template.
  3. When in the template editor, see that the template name and the arrow is visible,
    but there is no visible button above the template option modal that takes you back to the block editor.

Optionally, you can check that the markup for the button is printed, with the help of developer tools or view source.

Expected behaviour

I expect the button to be either completely removed, or have a text.

Actual behaviour

The button is printed but has no text. It is difficult to click on the button using the mouse, the click target area is too small.
But if you navigate via keyboard, you can select the button.

Screenshots or screen recording (optional)

Here you can see the label for the button and the focus style, when navigating via keyboard:
the edit button is select but too small to be clearly visible

WordPress information

  • WordPress version: 5.7.2. Not tested with 5.8 beta.
  • Gutenberg version: Gutenberg current trunk
  • Are all plugins except Gutenberg deactivated? yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Twenty Nineteen

Device information

  • Device: Desktop
  • Operating system: Windows 10
  • Browser: Chrome Version 91.0.4472.114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant