Skip to content

Try tooltips on links#12617

Open
afercia wants to merge 22 commits into
WordPress:trunkfrom
afercia:try-tooltips-on-links
Open

Try tooltips on links#12617
afercia wants to merge 22 commits into
WordPress:trunkfrom
afercia:try-tooltips-on-links

Conversation

@afercia

@afercia afercia commented Jul 20, 2026

Copy link
Copy Markdown
Member

See #12528

Use of AI Tools


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

joedolson and others added 18 commits July 14, 2026 15:50
This PR wraps the existing buttons in markup for existing styles and scripts, but doesn't change the function signature to support adding all of the custom markup.

It may be desirable to add a modified path to inject this markup into existing patterns.

This could be done similar to `wp_get_admin_notice()`, which has a bunch of parsers for attributes, but I think this isn't appropriate here. Open to ideas, but I was thinking of something that accepted existing button markup, used the HTML API to inject the additional button markup, then accepted a string for tooltip text.

I don't think this is needed for toggletips, but for existing markup needing tooltips, it may be helpful.

See https://core.trac.wordpress.org/ticket/50921
Uses the HTML API to process passed markup and insert into required pattern. Allows passing existing buttons without needing to add support for custom attributes.

Adds tests to verify markup changes.
Provides a similar queue as the grayed out button. Non-sighted users will be notified that this button is disabled, sighted users have to get that from context: grayed out design & inference from the position of the box. I think that should be sufficient.
Toggle tip case not covered, as a toggle tip should never be disabled.
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props joedolson, afercia.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants