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

Reusable blocks: "Export as JSON" link improvements #10002

Closed
afercia opened this issue Sep 18, 2018 · 0 comments · Fixed by #10003
Closed

Reusable blocks: "Export as JSON" link improvements #10002

afercia opened this issue Sep 18, 2018 · 0 comments · Fixed by #10003
Assignees
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Sep 18, 2018

Follow up to #9788

When there are saved reusable blocks, a new list is available in the edit.php page to list the posts of type wp_blocks:

screen shot 2018-09-18 at 15 54 07

This page needs to follow the core best practices to make controls and links as accessible as possible. Specifically, with regards to the "Export as JSON" link:

1
The aria-label needs to reference the post (reusable block) name, otherwise when in this page there will be several saved blocks, there will also be several "Export as JSON" links without any context; notice the reference to the post is already used for all similar action links in core. e.g.:

  • Edit “Hello world!” in the classic editor
  • Quick edit “Hello world!” inline
  • Move “Hello world!” to the Trash
  • etc.

In the same way, this new link should contain the reusable block name, e.g.:

  • Export “My address" as JSON

2
For no reason, ever, new links with a href="#" attribute should be introduced in core. For a number of years, WordPress has been progressively removing this kind of "links", as they're not real links: the href attribute is just an incomplete URL fragment identifier, and the link doesn't trigger navigation. A button should be used instead.

Note: I've seen #10000

@afercia afercia added [Type] Bug An existing feature does not function as intended [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) labels Sep 18, 2018
@afercia afercia self-assigned this Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant