Template editor: duplicate buttons to open the Command Centre and incorrect labeling #51729
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Edit Post
/packages/edit-post
[Type] Bug
An existing feature does not function as intended
Description
When editing a template from the Post Editor, the editor switches to the 'Template Editor'. In this editor mode, the top bar shows two buttons that do the same thing. They both open the Command centre.
I'm not sure what the reasoning behind providing two buttons that do the same thing is. Seems to me that's less than ideal.
Additionally, there's no visual or semantic labelling to tell users what these two buttons actually do. Their labeling doesn't match the actual buttons action. They're labeled, respectively:
For the first button:
This is one more case where an interactive control name is used to communicate the current UI state or mode, or selected value. See for example the lengthy discussion about the "Visibility" and "Publish" labels. I'd like to point out again that this is just a bad practice. Any interactive control (a button in this case) should clearly communicate what it does and should be labeled as such. Instead, using the accessible name for extraneous purposes is a no go.
For the second button:
I'm not sure I can understand how
Command K
can be considered a meaningful label for the button action. That's the related keyboard shortcut, not the actual button action.Worth also noting that in the Site Editor, there's only one button to open the Command centre:
This button has its own problems as well, they're reported at #51460. Anyways, these two separate components should maybe be abstracted a bit and unified in a single component.
Back to the double button and incorrect labeling: we're now a few days from WordPress 6.3 Beta 1. I'm not sure shipping these buttons in their current state is any ideal for the new release, as this appears to be a largely unpolished UI.
Step-by-step reproduction instructions
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
The text was updated successfully, but these errors were encountered: