Try tooltips on links#12617
Conversation
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.
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
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.