[wp-trac] [WordPress Trac] #51006: Add a mechanism for accessible tooltips in core
WordPress Trac
noreply at wordpress.org
Sun Apr 27 17:23:34 UTC 2025
#51006: Add a mechanism for accessible tooltips in core
-------------------------------------+-------------------------------------
Reporter: joedolson | Owner: joedolson
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: tooltips has-patch | Focuses: ui, accessibility,
needs-unit-tests needs-testing- | javascript
info |
-------------------------------------+-------------------------------------
Changes (by SirLouen):
* keywords: tooltips has-patch needs-testing needs-unit-tests => tooltips
has-patch needs-unit-tests needs-testing-info
Comment:
I'm going to be agnostic on which solution is better, either a Gutenberg
implementation or an almost ready "tooltips" API.
For now, I will try to review and test this patch.
@joedolson your testing instructions are too simple:
{{{#!php
function test_tooltips() {
if ( function_exists( 'add_tooltip' ) ) {
echo '<div class="notice notice-info">';
add_tooltip( 'Test Tooltip' );
echo '<div class="wp-tooltip-container"><button type="button" id
="wp-tooltip-custom-trigger" data-tooltip="This is the content of the
tooltip">Trigger</button></div>';
echo '</div>';
}
}
}}}
But judging by the code reviewed, there is allat more going on here.
Can @rajinsharwar or you provide full info about the "new tooltip API" to
test it thoroughly?
This includes something like a use-case for the hooks provided.
[https://core.trac.wordpress.org/ticket/41757 An example here], on how to
provide a `use-case` to test hooks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51006#comment:57>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list